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: Change 500 error to 422 in Sql Lab #17292

Merged
merged 1 commit into from
Oct 29, 2021

Conversation

AAfghahi
Copy link
Member

@AAfghahi AAfghahi commented Oct 29, 2021

SUMMARY

The stop query function is currently only enabled for certain databases and not others. Currently we are sending a 500 Error when a user hits the stop query button. This PR changes that to a 422 while we enable the feature for all databases.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-10-29 at 5 03 33 PM

TESTING INSTRUCTIONS

Run a query in Athena (or anything not postgres or mysql)
hit the stop query button
check network tab.

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

@AAfghahi AAfghahi changed the title fix (SQL Lab): Change 500 error to 422 fix: Change 500 error to 422 in Sql Lab Oct 29, 2021
@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #17292 (e5e301c) into master (faf7c74) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17292      +/-   ##
==========================================
+ Coverage   76.96%   76.97%   +0.01%     
==========================================
  Files        1037     1037              
  Lines       55606    55616      +10     
  Branches     7588     7588              
==========================================
+ Hits        42796    42811      +15     
+ Misses      12560    12555       -5     
  Partials      250      250              
Flag Coverage Δ
hive 81.55% <100.00%> (+0.02%) ⬆️
mysql 81.97% <100.00%> (+0.02%) ⬆️
postgres 81.98% <100.00%> (+0.02%) ⬆️
presto 81.84% <100.00%> (+0.02%) ⬆️
python 82.48% <100.00%> (+0.02%) ⬆️
sqlite 81.66% <100.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
superset/exceptions.py 91.26% <100.00%> (ø)
superset/views/core.py 76.95% <100.00%> (+0.01%) ⬆️
superset/connectors/sqla/models.py 87.39% <0.00%> (-0.08%) ⬇️
superset/cli.py 54.92% <0.00%> (+2.07%) ⬆️

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 faf7c74...e5e301c. Read the comment docs.

@hughhhh
Copy link
Member

hughhhh commented Oct 29, 2021

Can we get a test to verify this in python?

@AAfghahi
Copy link
Member Author

@hughhhh 100% I was going to do that when I got back :)

@eschutho
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@eschutho Ephemeral environment spinning up at http://54.245.154.1:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

There are no existing tests for the api endpoint so @AAfghahi will fast follow with a new test in a separate PR

@eschutho
Copy link
Member

I tested it on the ephemeral and got the expected results.

@eschutho eschutho merged commit 8a27c67 into apache:master Oct 29, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

AAfghahi added a commit that referenced this pull request Jan 10, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/XS 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants