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: error alerts js crash #17015

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Oct 7, 2021

SUMMARY

When template params are malformed in sql lab, we return an error from the backend that doesn't include an error level. This caused the frontend to crash

I think this was likely caused by #16917 or #16852, but i don't have enough context on the backend right now to resolve it there. I figure we should also harden the frontend to handle this case, so i added the check there. @ofekisr, could you follow up your PR and ensure that all errors you pass from the backend contain an ErrorLevel? We have helper functions to construct those errors, so it shouldn't be too difficult

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

CI, write a query with a malformed jinja template param and see the error properly

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

to: @rusackas @pkdotson @graceguo-supercat @michael-s-molina

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.

Thanks for the additional checks!

@codecov
Copy link

codecov bot commented Oct 7, 2021

Codecov Report

Merging #17015 (3d55524) into master (5f73ca8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17015   +/-   ##
=======================================
  Coverage   76.93%   76.94%           
=======================================
  Files        1030     1030           
  Lines       55085    55088    +3     
  Branches     7477     7480    +3     
=======================================
+ Hits        42382    42385    +3     
  Misses      12452    12452           
  Partials      251      251           
Flag Coverage Δ
javascript 70.90% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...nd/src/components/ErrorMessage/BasicErrorAlert.tsx 100.00% <100.00%> (ø)
...rontend/src/components/ErrorMessage/ErrorAlert.tsx 94.44% <100.00%> (+0.21%) ⬆️

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 5f73ca8...3d55524. Read the comment docs.

@etr2460 etr2460 merged commit 03cdbac into apache:master Oct 7, 2021
@ofekisr
Copy link
Contributor

ofekisr commented Oct 7, 2021

@etr2460 yeah...
Please open a slack channel regarding sqllab issues and tag me with all the details you can send, I'll check it tomorrow

@villebro villebro added the v1.4 label Oct 12, 2021
eschutho pushed a commit to preset-io/superset that referenced this pull request Oct 27, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🏷️ 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 v1.4 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants