Skip to content

feat(compare): migrate compare charts to echarts_timeseries_line and drop the legacy plugin - #41738

Merged
rusackas merged 2 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-t3-compare
Jul 3, 2026
Merged

feat(compare): migrate compare charts to echarts_timeseries_line and drop the legacy plugin#41738
rusackas merged 2 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-t3-compare

Conversation

@rusackas

@rusackas rusackas commented Jul 3, 2026

Copy link
Copy Markdown
Member

SUMMARY

Tier 3 of #41714 (targets remove-legacy-viz-pipeline): retire the nvd3 Time-series Percent Change (compare) chart by migrating saved charts to the ECharts Line Chart (echarts_timeseries_line).

  • New MigrateCompareChart processor — the shared TimeseriesChart base already handles the whole nvd3 timeseries control mapping (including normalizing the legacy absolute comparison type), so the subclass only declares the source/target viz types. Registered with the superset viz-migrations CLI and covered by a unit test.
  • Alembic revision e5f6a7b8c9d0 (chained after the bubble migration) with the standard MySQL MEDIUMTEXT widening and reversible form_data_bak backups.
  • Removes the nvd3 Compare plugin, its MainPreset/preset registrations, the NVD3CompareTimeSeriesViz backend class, and the cumulative-line branch of the shared NVD3 renderer.
  • Behavior note for UPDATING.md: the nvd3 renderer's interactive re-basing (clicking a point to re-base percent change) is not preserved by the ECharts line chart.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Saved Percent Change charts re-open as ECharts Line Charts.

TESTING INSTRUCTIONS

  • pytest tests/unit_tests/migrations/viz/nvd3_compare_chart_to_echarts_test.py passes.
  • npm run test -- plugins/legacy-preset-chart-nvd3 passes.
  • Manual: superset db upgrade then open a formerly-compare chart — renders as an ECharts line chart; superset db downgrade restores the original form_data.

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: proportional to the number of saved compare slices; no downtime expected
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

@dosubot dosubot Bot added change:backend Requires changing the backend viz:charts:timeseries Related to Timeseries labels Jul 3, 2026
@bito-code-review

Copy link
Copy Markdown
Contributor

AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).

…drop the legacy plugin

Adds a MigrateCompareChart processor (the shared TimeseriesChart base
already handles the timeseries control mapping, including normalizing
the legacy 'absolute' comparison type), registers it with the viz
migration CLI, and adds the Alembic revision with the standard MySQL
MEDIUMTEXT widening and reversible form_data backups. The nvd3 Compare
plugin, its registrations, the NVD3CompareTimeSeriesViz backend class
and the cumulative-line renderer branch are removed.

The nvd3 renderer's interactive re-basing (clicking a point to re-base
percentages) is not preserved by the ECharts line chart; noted for
UPDATING.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added risk:db-migration PRs that require a DB migration plugins labels Jul 3, 2026
@rusackas
rusackas force-pushed the legacy-viz-t3-compare branch from 3ab32c2 to 35d9d50 Compare July 3, 2026 07:38
Comment thread superset/migrations/shared/migrate_viz/processors.py
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (remove-legacy-viz-pipeline@ea90b59). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...nd/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.ts 0.00% 1 Missing ⚠️
superset/cli/viz_migrations.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##             remove-legacy-viz-pipeline   #41738   +/-   ##
=============================================================
  Coverage                              ?   64.77%           
=============================================================
  Files                                 ?     2702           
  Lines                                 ?   149087           
  Branches                              ?    34475           
=============================================================
  Hits                                  ?    96574           
  Misses                                ?    50753           
  Partials                              ?     1760           
Flag Coverage Δ
hive 39.20% <75.00%> (?)
javascript 69.63% <0.00%> (?)
mysql 57.85% <75.00%> (?)
postgres 57.91% <75.00%> (?)
presto 40.75% <75.00%> (?)
python 59.30% <75.00%> (?)
sqlite 57.49% <75.00%> (?)
unit 100.00% <ø> (?)

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

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

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

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rusackas
rusackas merged commit b60cf4e into remove-legacy-viz-pipeline Jul 3, 2026
58 checks passed
@rusackas
rusackas deleted the legacy-viz-t3-compare branch July 3, 2026 15:07
rusackas added a commit that referenced this pull request Jul 7, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 7, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 8, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 10, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 13, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 14, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 15, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 15, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 16, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 17, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 20, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 20, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 20, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 21, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 21, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 23, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 27, 2026
…drop the legacy plugin (#41738)

Co-authored-by: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:backend Requires changing the backend plugins risk:db-migration PRs that require a DB migration size/XXL viz:charts:timeseries Related to Timeseries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants