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

feat: Adds Bar chart migration logic #28602

Merged

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented May 20, 2024

SUMMARY

This PR adds the Bar chart migration logic (legacy ➡️ ECharts). Users can execute this migration using the CLI command and disable the legacy version with the VIZ_TYPE_DENYLIST configuration. Both Bar Chart (legacy) and Time-series Bar Chart (legacy) can be migrated using this command.

Note: Given that the Bar Chart (legacy) supports multiple values in the x-axis and the ECharts version supports a single value, the migration uses the first value in the x-axis and subsequent values as dimensions. For this specific case, the migrated version might look different because it will contain multiple series. Users can manually adjust the chart using a custom SQL if the old behavior is desired.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshot 2024-05-20 at 09 34 09 Screenshot 2024-05-20 at 09 34 50 Screenshot 2024-05-20 at 09 29 06 Screenshot 2024-05-20 at 09 29 27

TESTING INSTRUCTIONS

1 - Upgrade a Bar Chart (legacy) and Time-series Bar Chart (legacy) chart using the CLI command
2 - Check the new chart
3 - Downgrade a Bar Chart (legacy) and Time-series Bar Chart (legacy) chart using the CLI command
4 - Check the legacy chart

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

@michael-s-molina michael-s-molina requested a review from a team as a code owner May 20, 2024 12:35
@github-actions github-actions bot added the risk:db-migration PRs that require a DB migration label May 20, 2024
@dosubot dosubot bot added the viz:charts:bar Related to the Bar chart label May 20, 2024
Copy link

codecov bot commented May 20, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 83.50%. Comparing base (76d897e) to head (2ef285b).
Report is 152 commits behind head on master.

Files Patch % Lines
superset/cli/viz_migrations.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #28602       +/-   ##
===========================================
+ Coverage   60.48%   83.50%   +23.02%     
===========================================
  Files        1931      522     -1409     
  Lines       76236    37513    -38723     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    31327    -14787     
+ Misses      28017     6186    -21831     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 49.09% <33.33%> (-0.07%) ⬇️
javascript ?
mysql 77.15% <33.33%> (?)
postgres 77.26% <33.33%> (?)
presto 53.64% <33.33%> (-0.16%) ⬇️
python 83.50% <93.33%> (+20.02%) ⬆️
sqlite 76.71% <33.33%> (?)
unit 58.99% <93.33%> (+1.36%) ⬆️

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.

@michael-s-molina michael-s-molina removed the risk:db-migration PRs that require a DB migration label May 20, 2024
@michael-s-molina michael-s-molina merged commit e17724a into apache:master May 28, 2024
38 checks passed
EnxDev pushed a commit to EnxDev/superset that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L viz:charts:bar Related to the Bar chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants