Skip to content

chore(viz)!: remove explore_json endpoints, viz.py and the legacy chart data pipeline - #41750

Merged
rusackas merged 4 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-phase2-removal
Jul 3, 2026
Merged

chore(viz)!: remove explore_json endpoints, viz.py and the legacy chart data pipeline#41750
rusackas merged 4 commits into
remove-legacy-viz-pipelinefrom
legacy-viz-phase2-removal

Conversation

@rusackas

@rusackas rusackas commented Jul 3, 2026

Copy link
Copy Markdown
Member

SUMMARY

Phase 2 of #41714 (targets remove-legacy-viz-pipeline): with all 15 legacy charts migrated to /api/v1/chart/data, this removes the deprecated legacy pipeline at its declared 5.0.0 EOL.

Backend removed:

  • /superset/explore_json/ + /superset/explore_json/data/<cache_key> routes, their viz-only response helpers (generate_json, CSV/XLSX/query/results/samples), and the CSRF exemption
  • superset/viz.py (−2,000 lines) and every importer: get_viz + explore-cache permission checkers in views/utils, Slice.viz + Slice.explore_json_url, the legacy warm-up-cache path, the legacy annotation-data path in the query context processor (annotation source charts now always resolve through their query context), and the BaseViz overload of security_manager.raise_for_access
  • the load_explore_json_into_cache celery task and the async query manager's explore_json job plumbing (GLOBAL_ASYNC_QUERIES chart-data jobs are unaffected)
  • the can_explore_json grant in the public-role permission set and the legacy-prefix redirect entries for the removed routes (the middleware itself stays)

Frontend removed:

  • ChartMetadata.useLegacyApi and every branch keyed on it: chartAction's legacy request/response handling, exportChart's legacy endpoint, ChartClient/StatefulChart explore_json endpoints, DrillBy legacy handling, and the explore panel's "chart type requires a dataset" alert (only reachable for legacy charts on non-table datasources)
  • getURIDirectory now always resolves to /explore/; getLegacyEndpointType/shouldUseLegacyApi helpers and the vendored deck.gl/nvd3 explore-URL utils are gone

Breaking changes (staged in UPDATES.md for UPDATING.md): third-party plugins setting useLegacyApi or importing superset.viz must migrate to buildQuery + the v1 chart data API.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A — removal of an unreachable code path (no registered chart routes to it anymore).

TESTING INSTRUCTIONS

  • pytest tests/unit_tests/ passes (402 tests across the touched modules re-verified; legacy-pipeline tests removed or retargeted).
  • npx jest src/explore src/components/Chart packages/superset-ui-core — 196 tests pass.
  • pre-commit run --all-files green (mypy/ruff/pylint/tsc/eslint).
  • Manual: no chart issues POST /superset/explore_json/ anywhere in the app; exports, drill-by, annotations and cache warm-up all flow through v1.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
  • Introduces new feature or API
  • Removes existing feature or API

🤖 Generated with Claude Code

…rt data pipeline

With every legacy chart migrated to /api/v1/chart/data, this removes
the deprecated pipeline at its declared 5.0.0 EOL:

Backend:
- /superset/explore_json/ and /superset/explore_json/data/<cache_key>
  routes plus their viz-only helpers (generate_json, CSV/XLSX/query/
  results/samples responses) and the CSRF exemption
- superset/viz.py and all remaining importers: the get_viz factory and
  explore-cache permission checkers in views/utils, the Slice.viz
  property and explore_json_url, the legacy warm-up-cache path, the
  legacy annotation-data path in the query context processor, and the
  BaseViz overload of security_manager.raise_for_access
- the load_explore_json_into_cache celery task and the async query
  manager's explore_json job plumbing
- the can_explore_json permission grant for the public role and the
  legacy-prefix redirect entries for the removed routes

Frontend:
- the useLegacyApi flag on ChartMetadata and every branch keyed on it:
  chartAction's legacy request/response handling, exportChart's legacy
  endpoint, ChartClient and StatefulChart explore_json endpoints,
  DrillBy legacy handling, and the explore panel's dataset-required
  alert for legacy charts on non-table datasources
- getURIDirectory now always resolves to /explore/ and the legacy
  endpoint-type helpers are gone

Tests covering the removed pipeline are removed or retargeted; the
LegacyPrefixRedirectMiddleware itself remains for the other legacy
prefixes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bito-code-review

bito-code-review Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at evan@preset.io.

@github-actions github-actions Bot added api Related to the REST API plugins packages labels Jul 3, 2026
@dosubot dosubot Bot added the risk:breaking-change Issues or PRs that will introduce breaking changes label Jul 3, 2026
@netlify

netlify Bot commented Jul 3, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 01ab3dd
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a47d8cd1dd9da00072d12e0
😎 Deploy Preview https://deploy-preview-41750--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

…tatefulChart

Removes the viz kwarg from security manager unit tests, the
can_explore_json permission assertions from the role integration
tests, and an unused registry import left in StatefulChart.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (remove-legacy-viz-pipeline@b60cf4e). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...tend/src/components/Chart/DrillBy/DrillByModal.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                      Coverage Diff                      @@
##             remove-legacy-viz-pipeline   #41750   +/-   ##
=============================================================
  Coverage                              ?   64.80%           
=============================================================
  Files                                 ?     2700           
  Lines                                 ?   147243           
  Branches                              ?    34116           
=============================================================
  Hits                                  ?    95420           
  Misses                                ?    50142           
  Partials                              ?     1681           
Flag Coverage Δ
hive 39.52% <37.50%> (?)
javascript 69.61% <91.66%> (?)
mysql 57.76% <100.00%> (?)
postgres 57.82% <100.00%> (?)
presto 41.10% <37.50%> (?)
python 59.25% <100.00%> (?)
sqlite 57.39% <100.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.

claude added 2 commits July 3, 2026 09:36
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tests

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@rusackas
rusackas merged commit 01b80c5 into remove-legacy-viz-pipeline Jul 3, 2026
57 checks passed
@rusackas
rusackas deleted the legacy-viz-phase2-removal branch July 3, 2026 17:20
rusackas added a commit that referenced this pull request Jul 7, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 7, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 8, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 10, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 13, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 14, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 15, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 15, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 16, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 17, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 20, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 20, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 20, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 21, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 21, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 23, 2026
…rt data pipeline (#41750)

Co-authored-by: Claude Code <noreply@anthropic.com>
rusackas added a commit that referenced this pull request Jul 27, 2026
…rt data pipeline (#41750)

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

api Related to the REST API packages plugins risk:breaking-change Issues or PRs that will introduce breaking changes size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants