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

feat: custom error SQL Lab timeout #15342

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

Add new custom error messaging when a query times out in SQL Lab.

Timeout exceptions were not bubbling up correctly in SQL Lab, so I fixed the code to make sure they bubble from execute_sql_statement to execute_sql_statements to get_sql_results.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2021-06-23 at 17-05-06  DEV  Superset

TESTING INSTRUCTIONS

I added to my superset_config.py the following config:

SQLLAB_ASYNC_TIME_LIMIT_SEC = 30

Then ran the following query under Postgres:

SELECT pg_sleep(60)

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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 Jun 24, 2021

Codecov Report

Merging #15342 (11da6bf) into master (a330b66) will decrease coverage by 0.07%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15342      +/-   ##
==========================================
- Coverage   77.24%   77.16%   -0.08%     
==========================================
  Files         973      973              
  Lines       50523    50523              
  Branches     6184     6184              
==========================================
- Hits        39025    38985      -40     
- Misses      11292    11332      +40     
  Partials      206      206              
Flag Coverage Δ
hive 81.43% <100.00%> (-0.01%) ⬇️
javascript 71.75% <0.00%> (-0.01%) ⬇️
mysql 81.70% <100.00%> (-0.01%) ⬇️
postgres 81.72% <100.00%> (-0.01%) ⬇️
presto ?
python 82.10% <100.00%> (-0.15%) ⬇️
sqlite 81.34% <50.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...rset-frontend/src/components/ErrorMessage/types.ts 100.00% <ø> (ø)
superset-frontend/src/setup/setupErrorMessages.ts 0.00% <0.00%> (ø)
superset/errors.py 100.00% <100.00%> (ø)
superset/sql_lab.py 83.47% <100.00%> (-0.15%) ⬇️
superset/db_engine_specs/presto.py 84.42% <0.00%> (-5.48%) ⬇️
superset/connectors/sqla/models.py 88.45% <0.00%> (-1.42%) ⬇️
superset/models/core.py 89.76% <0.00%> (-0.27%) ⬇️
...et-frontend/src/components/CertifiedIcon/index.tsx 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a330b66...11da6bf. Read the comment docs.

@betodealmeida betodealmeida merged commit 241ee32 into apache:master Jun 24, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* feat: custom error SQL Lab timeout

* Update test
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* feat: custom error SQL Lab timeout

* Update test
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* feat: custom error SQL Lab timeout

* Update test
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants