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: Dashboard report creation error handling #19859

Merged

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Apr 27, 2022

SUMMARY

We hit this error internally because we allow non owners to view dashboards that are in draft mode, but then when the report DAO returned a dashboard not found error, it crashed the page. While the true fix for us is overriding the access controls for draft mode dashboards, this is also a clear bug where the error payload may not contain a name attribute, and thus trying to get the first element of that isn't possible.

TESTING INSTRUCTIONS

CI, will test in our local environment to verify

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 @michael-s-molina @john-bodley

@codecov
Copy link

codecov bot commented Apr 27, 2022

Codecov Report

Merging #19859 (48f4fdc) into master (e3dbe8d) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master   #19859   +/-   ##
=======================================
  Coverage   66.48%   66.48%           
=======================================
  Files        1713     1713           
  Lines       64995    64995           
  Branches     6698     6698           
=======================================
  Hits        43209    43209           
  Misses      20079    20079           
  Partials     1707     1707           
Flag Coverage Δ
javascript 51.15% <0.00%> (ø)

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

Impacted Files Coverage Δ
...rset-frontend/src/components/ReportModal/index.tsx 78.46% <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 e3dbe8d...48f4fdc. Read the comment docs.

@etr2460
Copy link
Member Author

etr2460 commented Apr 27, 2022

This has been verified in our local environment. that said, the error message still isn't ideal, but it's better than a js crash 🤷

@etr2460 etr2460 merged commit ad878b0 into apache:master Apr 27, 2022
hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.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/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants