You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "eschutho (via GitHub)" <gi...@apache.org> on 2026/07/04 16:10:23 UTC
[PR] fix(views): add new_target to deprecated explore_json_data endpoint [superset]
eschutho opened a new pull request, #41771:
URL: https://github.com/apache/superset/pull/41771
### The warning
Production logs (Datadog) show a WARNING fired by the `@deprecated()` decorator on `Superset.explore_json_data`:
```
Superset.explore_json_data This API endpoint is deprecated and will be removed in version 5.0.0
```
Its sibling endpoint, `explore_json`, already got a `new_target="/api/v1/chart/data"` hint added to its `@deprecated()` decorator in #41159 ("add new_target to deprecated explore_json endpoints") — but that PR's diff only touched `explore_json`, missing `explore_json_data` despite the plural title.
`explore_json_data` serves cached async-query results by `cache_key` (populated by `load_explore_json_into_cache` in `superset/tasks/async_queries.py`). The direct modern equivalent is `/api/v1/chart/data/<cache_key>` (`ChartDataRestApi.data_from_cache`), populated by the sibling `load_chart_data_into_cache` task in the same file — both use the same cache backend (`cache_manager.cache`) and the same `generate_cache_key` / `set_and_log_cache` utilities, just for the v1 pipeline instead of the legacy one.
### What changed
One line: added `new_target="/api/v1/chart/data/<cache_key>"` to the `@deprecated()` decorator on `explore_json_data`, matching the existing convention for deprecated endpoints with path params (see `fetch_datasource_metadata`'s `new_target` a few hundred lines down in the same file).
### No behavior change
This only affects the deprecation warning's log message (adds a "use this instead" hint). It does not change the endpoint's routing, permissions, or response behavior. Confirmed via `ruff check` and by tracing the `deprecated()` decorator's closure scoping (`superset/views/base.py`) — each `@deprecated(...)` call site gets its own independent `_warned` flag, so this doesn't interact with `explore_json`'s decorator instance.
### Test plan
- `uvx ruff check superset/views/core.py` — passes
- Confirmed `tests/unit_tests/views/test_base.py::test_deprecated_logs_warning_exactly_once` (the only test exercising `deprecated()`'s warning behavior) is synthetic/generic and unaffected
- Confirmed `test_explore_json_data_invalid_cache_key` (the only test referencing `explore_json_data`) only asserts a 404 on invalid cache keys, unaffected by the decorator change
- Confirmed no conflict with #41714 (open, unrelated legacy-viz removal PR) — it doesn't touch `superset/views/core.py`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(views): add new_target to deprecated explore_json_data endpoint [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #41771:
URL: https://github.com/apache/superset/pull/41771#issuecomment-4883004080
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(views): add new_target to deprecated explore_json_data endpoint [superset]
Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho merged PR #41771:
URL: https://github.com/apache/superset/pull/41771
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(views): add new_target to deprecated explore_json_data endpoint [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #41771:
URL: https://github.com/apache/superset/pull/41771#issuecomment-4883035273
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/41771?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 63.87%. Comparing base ([`43f2816`](https://app.codecov.io/gh/apache/superset/commit/43f2816240659d3b3859ccba0abe118ba37ca853?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`e0aa6c1`](https://app.codecov.io/gh/apache/superset/commit/e0aa6c16006bc952af4a0302c41e5516f75ae66a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #41771 +/- ##
==========================================
- Coverage 64.66% 63.87% -0.80%
==========================================
Files 2685 2685
Lines 148533 148533
Branches 34268 34268
==========================================
- Hits 96054 94871 -1183
- Misses 50720 51912 +1192
+ Partials 1759 1750 -9
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [hive](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `39.18% <100.00%> (ø)` | |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [postgres](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
| [presto](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.72% <100.00%> (ø)` | |
| [python](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.60% <100.00%> (-1.67%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `57.45% <100.00%> (ø)` | |
| [unit](https://app.codecov.io/gh/apache/superset/pull/41771/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/41771?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org