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): Dashboard import commands not correctly replacing charts #25102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lindenh
Copy link
Contributor

@lindenh lindenh commented Aug 28, 2023

SUMMARY

Similar to #22208, the dashboard import commands would not replace charts when the overwrite flag was true, charts would be merged into one dashboard. This change fixes the command in the exact same way as that PR.

Fixes #22127

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Create a dashboard with a chart.
  2. Export the dashboard for import later.
  3. Modify the dashboard to remove the first chart and add a new one.
  4. Import the saved dashboard earlier (via UI OR /api/v1/dashboard/import)
  5. Notice both charts are in the dashboard

ADDITIONAL INFORMATION

  • Has associated issue: Import dashboard/assets with overwrite flag does not replace dashboards #22127
  • 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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@john-bodley john-bodley added the review:checkpoint Last PR reviewed during the daily review standup label Aug 28, 2023
@mdeshmu
Copy link
Contributor

mdeshmu commented Aug 29, 2023

Please fix pre-commit by running pre-commit run --all-files

@lindenh
Copy link
Contributor Author

lindenh commented Aug 29, 2023

Done, sorry about that!

@john-bodley john-bodley removed the review:checkpoint Last PR reviewed during the daily review standup label Aug 29, 2023
@FiiL123
Copy link

FiiL123 commented Oct 28, 2024

Is there a plan to have this released anytime soon ? @lindenh @betodealmeida ?

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 65.45%. Comparing base (76d897e) to head (ae920f5).
Report is 902 commits behind head on master.

Files with missing lines Patch % Lines
...perset/commands/dashboard/importers/v1/__init__.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #25102      +/-   ##
==========================================
+ Coverage   60.48%   65.45%   +4.96%     
==========================================
  Files        1931      533    -1398     
  Lines       76236    38609   -37627     
  Branches     8568        0    -8568     
==========================================
- Hits        46114    25271   -20843     
+ Misses      28017    13338   -14679     
+ Partials     2105        0    -2105     
Flag Coverage Δ
hive 48.96% <16.66%> (-0.20%) ⬇️
javascript ?
presto 53.44% <16.66%> (-0.37%) ⬇️
python 65.45% <16.66%> (+1.96%) ⬆️
unit 60.93% <16.66%> (+3.30%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rusackas
Copy link
Member

rusackas commented Oct 30, 2024

Is there a plan to have this released anytime soon ? @lindenh @betodealmeida ?

We can't merge it until tests are passing, but hopefully that can happen soon if @lindenh has bandwidth!

@denodo-research-labs
Copy link
Contributor

denodo-research-labs commented Nov 13, 2024

This affecting us too. We distribute dashboards (with their charts) to different users, and when a user "installs" a new version of a dashboard by importing it with the "overwrite" option, and this new version of the dashboard contains modifications to one or some of the dashboard's charts, those charts are not updated at all.

No need to add or remove charts, just any modifications like changes in the charts' queries will not be performed.

Right now we are asking our users to manually delete the old dashboard plus all its related charts one by one before importing the new version, which is a very inconvenient operation for large dashboards.

@lindenh
Copy link
Contributor Author

lindenh commented Nov 14, 2024

Sorry- I'll fix this right after #30887 gets in. Trying to avoid conflicts made by my own changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import dashboard/assets with overwrite flag does not replace dashboards
7 participants