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

chore(chart-data): add post processing error message to response #23734

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

villebro
Copy link
Member

@villebro villebro commented Apr 19, 2023

SUMMARY

When calling the chart data endpoint with an incorrect post processing operation, the error would get swallowed due to the reraised exception not containing a message. This adds that message from the original exception. I also checked that this was the only instance where a QueryObjectValidationError was not passing on a message, either a new one or the one from the original exception. We also add a test that would previously have failed due to the response being a 200 without the error message.

AFTER

Now the 400 response of the incorrect request tells what the issue is:
image

BEFORE

Previously the message was swallowed along with a 200 status code:
image

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 19, 2023

Codecov Report

Merging #23734 (2b18f19) into master (44557f5) will decrease coverage by 1.69%.
The diff coverage is 100.00%.

❗ Current head 2b18f19 differs from pull request most recent head 5289046. Consider uploading reports for the commit 5289046 to get more accurate results

@@            Coverage Diff             @@
##           master   #23734      +/-   ##
==========================================
- Coverage   68.11%   66.42%   -1.69%     
==========================================
  Files        1922     1922              
  Lines       74102    74102              
  Branches     8100     8100              
==========================================
- Hits        50474    49224    -1250     
- Misses      21550    22800    +1250     
  Partials     2078     2078              
Flag Coverage Δ
hive 53.25% <100.00%> (+0.05%) ⬆️
mysql 79.23% <100.00%> (+<0.01%) ⬆️
postgres 79.31% <100.00%> (+<0.01%) ⬆️
presto ?
python 79.65% <100.00%> (-3.51%) ⬇️
sqlite 77.80% <100.00%> (+<0.01%) ⬆️
unit ?

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

Impacted Files Coverage Δ
superset/common/query_context_processor.py 89.38% <100.00%> (+0.81%) ⬆️

... and 91 files with indirect coverage changes

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

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for adding the useful info to the response message!

@villebro villebro merged commit 306fb22 into apache:master Apr 19, 2023
@villebro villebro deleted the villebro/post-proc-error branch April 19, 2023 15:49
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/S 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants