chore(viz)!: remove explore_json endpoints, viz.py and the legacy chart data pipeline - #41750
Conversation
…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 Automatic Review Skipped - Branch Excluded |
✅ Deploy Preview for superset-docs-preview ready!
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 Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tests Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
…rt data pipeline (#41750) Co-authored-by: Claude Code <noreply@anthropic.com>
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 declared5.0.0EOL.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 exemptionsuperset/viz.py(−2,000 lines) and every importer:get_viz+ explore-cache permission checkers inviews/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 theBaseVizoverload ofsecurity_manager.raise_for_accessload_explore_json_into_cachecelery task and the async query manager's explore_json job plumbing (GLOBAL_ASYNC_QUERIESchart-data jobs are unaffected)can_explore_jsongrant in the public-role permission set and the legacy-prefix redirect entries for the removed routes (the middleware itself stays)Frontend removed:
ChartMetadata.useLegacyApiand every branch keyed on it: chartAction's legacy request/response handling,exportChart's legacy endpoint,ChartClient/StatefulChartexplore_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)getURIDirectorynow always resolves to/explore/;getLegacyEndpointType/shouldUseLegacyApihelpers and the vendored deck.gl/nvd3 explore-URL utils are goneBreaking changes (staged in UPDATES.md for UPDATING.md): third-party plugins setting
useLegacyApior importingsuperset.vizmust migrate tobuildQuery+ 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-filesgreen (mypy/ruff/pylint/tsc/eslint).POST /superset/explore_json/anywhere in the app; exports, drill-by, annotations and cache warm-up all flow through v1.ADDITIONAL INFORMATION
🤖 Generated with Claude Code