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: stop endless loading when dataset no longer exist #16511

Merged
merged 3 commits into from
Aug 30, 2021

Conversation

pkdotson
Copy link
Member

@pkdotson pkdotson commented Aug 30, 2021

SUMMARY

This pr stops the endless loading in the dashboards when a dataset no longer exists and returns proper error info to the user.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

Screen.Recording.2021-08-30.at.10.19.09.AM.mov

after

Screen.Recording.2021-08-30.at.10.21.47.AM.mov

TESTING INSTRUCTIONS

Delete a dataset that has associated chart in a a dashboard.
Go to the dashboard and ensure that the charts do no endlessly load.

ADDITIONAL INFORMATION

  • [x ] Has associated issue: Fixes [dashboard] chart reload forever if delete attached dataset #16431
  • 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 Aug 30, 2021

Codecov Report

Merging #16511 (05f6565) into master (62d8ab7) will decrease coverage by 0.00%.
The diff coverage is 20.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16511      +/-   ##
==========================================
- Coverage   76.63%   76.63%   -0.01%     
==========================================
  Files        1002     1002              
  Lines       53680    53684       +4     
  Branches     6852     6855       +3     
==========================================
+ Hits        41138    41139       +1     
- Misses      12305    12308       +3     
  Partials      237      237              
Flag Coverage Δ
javascript 71.01% <20.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/chart/Chart.jsx 43.33% <20.00%> (-1.31%) ⬇️

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 62d8ab7...05f6565. Read the comment docs.

@junlincc junlincc requested a review from ktmud August 30, 2021 18:12
Copy link
Member

@ktmud ktmud 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 fix!

superset-frontend/src/chart/Chart.jsx Outdated Show resolved Hide resolved
@pkdotson pkdotson requested review from rusackas and suddjian August 30, 2021 18:41
@pkdotson
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

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

Copy link
Member

@rusackas rusackas 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 fix! Code LGTM.

It might at some point be worth considering a UX enhancement to this, where we surface the error more explicitly (as opposed to an "Unexpected Error" that you have to click), or potentially pop a page-level error (rather than only chart-level errors) to alert users to the problem. This is a heck of an improvement, though!

@pkdotson pkdotson changed the title fix: stop endless loading when dataset not longer exist fix: stop endless loading when dataset no longer exist Aug 30, 2021
@pkdotson pkdotson merged commit 960d1e4 into apache:master Aug 30, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

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 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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 preset-io size/XS 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] chart reload forever if delete attached dataset
4 participants