Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqllab): infinite running state on disconnect #23669

Merged
merged 1 commit into from
Apr 18, 2023

Conversation

justinpark
Copy link
Member

SUMMARY

If you have an existing sqllab browser tab open and for whatever reason get disconnected from the vpn and issue a query, that query tab will forever be suck in a "running/pending" state and fail to stop.
The issue is that the query request never reaches the server; whereas, it is recorded in local storage.
This commit adds the clearInactiveQuery action to clean up the queries that never connected with the server and then batches the action on QueryAutoRefresh logic.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:

after--infinite-query-running.mov

Before:

before--infinite-query-running.mov

TESTING INSTRUCTIONS

  • Set SQLLAB_BACKEND_PERSISTENCE False
  • Go to SQLLab
  • Disconnect network after SQL Lab fully loaded
  • Run an any query and then close the browser
  • Reconnect internet and then open SQL Lab
  • Check the query result status

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Apr 12, 2023

Codecov Report

Merging #23669 (431e465) into master (976e333) will increase coverage by 0.01%.
The diff coverage is 81.57%.

❗ Current head 431e465 differs from pull request most recent head a92cf71. Consider uploading reports for the commit a92cf71 to get more accurate results

@@            Coverage Diff             @@
##           master   #23669      +/-   ##
==========================================
+ Coverage   68.08%   68.10%   +0.01%     
==========================================
  Files        1920     1920              
  Lines       73984    74006      +22     
  Branches     8092     8094       +2     
==========================================
+ Hits        50374    50400      +26     
+ Misses      21539    21533       -6     
- Partials     2071     2073       +2     
Flag Coverage Δ
javascript 54.13% <73.07%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/reducers/sqlLab.js 35.86% <0.00%> (-1.21%) ⬇️
...d/src/SqlLab/components/QueryAutoRefresh/index.tsx 94.59% <94.11%> (+35.97%) ⬆️
superset-frontend/src/SqlLab/actions/sqlLab.js 64.67% <100.00%> (+0.17%) ⬆️
...erset-frontend/src/SqlLab/components/App/index.jsx 83.33% <100.00%> (ø)
superset/db_engine_specs/base.py 90.78% <100.00%> (-0.08%) ⬇️
superset/db_engine_specs/bigquery.py 70.22% <100.00%> (+0.55%) ⬆️
superset/db_engine_specs/presto.py 87.84% <100.00%> (-0.08%) ⬇️
superset/models/core.py 89.72% <100.00%> (-0.03%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@justinpark justinpark merged commit 0c0d2b3 into apache:master Apr 18, 2023
justinpark added a commit to airbnb/superset-fork that referenced this pull request Apr 18, 2023
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Apr 26, 2023
sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants