superset icon indicating copy to clipboard operation
superset copied to clipboard

feat(SIP-192): Labeled Version History + Restore

Open ethan-l-geotab opened this issue 3 weeks ago • 1 comments

SUMMARY

This commit implements the version changes proposed in GitHub issue https://github.com/apache/superset/issues/36145 (SIP-192) to create a way to save a dashboard/chart/dataset state.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

I have a few recordings in the comment sections of the SIP going over how it works.

TESTING INSTRUCTIONS

  1. Save the state of the asset (i'm just going to call them dashboards for now) image
  2. Make changes to the dashboard, add charts, remove charts, change the title
  3. Restore the dashboard
  4. Check to see if it's actually reverted.

ADDITIONAL INFORMATION

  • [x] Has associated issue: https://github.com/apache/superset/issues/36145
  • [ ] Required feature flags: VERSION_CONTROL_ENABLED = True VERSION_RETENTION_LIMIT = 10
  • [x] Changes UI: Properties modal has a new button and modal with the version history info
  • [x] Includes DB Migration (follow approval process in SIP-59)
    • [x] Migration is atomic, supports rollback & is backwards-compatible
    • [x] Confirm DB migration upgrade and downgrade tested
    • [ ] Runtime estimates and downtime expectations provided
  • [x] Introduces new feature or API
  • [ ] Removes existing feature or API

ethan-l-geotab avatar Dec 04 '25 15:12 ethan-l-geotab

Codecov Report

:x: Patch coverage is 39.90385% with 125 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 67.85%. Comparing base (92986c2) to head (6e9f029). :warning: Report is 33 commits behind head on master.

Files with missing lines Patch % Lines
superset/version_control/api.py 30.28% 122 Missing :warning:
superset/models/version_history.py 89.65% 3 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #36424       +/-   ##
===========================================
+ Coverage        0   67.85%   +67.85%     
===========================================
  Files           0      636      +636     
  Lines           0    46946    +46946     
  Branches        0     5100     +5100     
===========================================
+ Hits            0    31853    +31853     
- Misses          0    13826    +13826     
- Partials        0     1267     +1267     
Flag Coverage Δ
hive 43.69% <39.90%> (?)
mysql 66.91% <39.90%> (?)
postgres 66.96% <39.90%> (?)
presto 47.32% <39.90%> (?)
python 67.81% <39.90%> (?)
sqlite 66.67% <39.90%> (?)
unit 100.00% <ø> (?)

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Dec 04 '25 15:12 codecov[bot]