Skip to content

Stop button in Chart view doesn't stop running query in Trino, and other databases #35347

@n-pitabread

Description

@n-pitabread

Bug description

When running a query in Chart view or Dashboard view, Clicking "Stop" button does not have effect to the running query. Clicking Stop button, closing tab, refreshing page or going to other page leaves the query running in Trino, and other databases.

How to reproduce the bug

  • Go to 'Chart' view
  • Click on 'Update Chart' to execute query
  • Click on 'Stop' to stop query

Expected results
Running query is cancelled in a database.

Actual results
Nothing happens.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.11

Node version

18 or greater

Browser

Chrome

Additional context

Clicking "Stop" button aborts fetch request, but that doesn't cancel running query in a database since no cancel query is handle on the backend side after the button is clicked unlike the SQL Lab view which cancel the query by sending stop request to backend when clicking "Stop"

To stop a running query we need to terminate query in Trino database.

Similar issue have been posted, but got close #24890

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to the REST APIvalidation:requiredA committer should validate the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions