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: implement specific errors for SQL Lab #15206

Merged
merged 5 commits into from
Jun 23, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

This PR adds custom errors to some of SQL Lab error responses:

  • Run async query when results backend not configured
  • Run DML when disabled in database
  • Invalid CTAS
  • Invalid CVAS

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2021-06-16 at 10-18-04  DEV  Superset

Screenshot 2021-06-16 at 17-17-38  DEV  Superset

Screenshot 2021-06-16 at 14-59-51  DEV  Superset

Screenshot 2021-06-16 at 15-01-02  DEV  Superset

TESTING INSTRUCTIONS

Updated unit tests and tested manually.

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 17, 2021

Codecov Report

Merging #15206 (db70804) into master (c7c6375) will decrease coverage by 0.25%.
The diff coverage is 70.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15206      +/-   ##
==========================================
- Coverage   77.25%   77.00%   -0.26%     
==========================================
  Files         971      973       +2     
  Lines       50308    50493     +185     
  Branches     6140     6182      +42     
==========================================
+ Hits        38867    38880      +13     
- Misses      11237    11407     +170     
- Partials      204      206       +2     
Flag Coverage Δ
hive ?
javascript 71.75% <0.00%> (-0.06%) ⬇️
mysql 81.69% <81.48%> (-0.01%) ⬇️
postgres 81.71% <81.48%> (-0.01%) ⬇️
presto ?
python 81.80% <81.48%> (-0.45%) ⬇️
sqlite 81.34% <81.48%> (-0.01%) ⬇️

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/views/core.py 75.54% <25.00%> (+0.08%) ⬆️
superset/sql_lab.py 83.62% <89.47%> (+1.39%) ⬆️
superset/errors.py 100.00% <100.00%> (ø)
superset/db_engines/hive.py 0.00% <0.00%> (-82.15%) ⬇️
superset/db_engine_specs/hive.py 69.20% <0.00%> (-17.21%) ⬇️
superset/connectors/connector_registry.py 78.68% <0.00%> (-7.59%) ⬇️
superset/db_engine_specs/presto.py 83.36% <0.00%> (-6.53%) ⬇️
...ters/FiltersConfigModal/FiltersConfigForm/state.ts 91.11% <0.00%> (-5.56%) ⬇️
... and 43 more

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 c7c6375...db70804. Read the comment docs.

Copy link
Member

@hughhhh hughhhh left a comment

Choose a reason for hiding this comment

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

🚀

Results backend needed for asynchronous queries is not configured.
```

Your instance of Superset doesn't have a results backend configured, which is needed for asynchronous queries. Please contact an administrator for further assistance.
Copy link
Member

Choose a reason for hiding this comment

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

Can we point them to the docs on how to configure this as well?

@betodealmeida betodealmeida merged commit 4b00c15 into apache:master Jun 23, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* RESULTS_BACKEND_NOT_CONFIGURED_ERROR

* DML_NOT_ALLOWED_ERROR

* INVALID_CxAS_QUERY_ERROR

* Fix lint

* Add more tests
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* RESULTS_BACKEND_NOT_CONFIGURED_ERROR

* DML_NOT_ALLOWED_ERROR

* INVALID_CxAS_QUERY_ERROR

* Fix lint

* Add more tests
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* RESULTS_BACKEND_NOT_CONFIGURED_ERROR

* DML_NOT_ALLOWED_ERROR

* INVALID_CxAS_QUERY_ERROR

* Fix lint

* Add more tests
@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.

None yet

3 participants