eschutho opened a new pull request, #41159:
URL: https://github.com/apache/superset/pull/41159

   ### What was the warning?
   
   Production logs are emitting:
   
   ```
   Superset.explore_json This API endpoint is deprecated and will be removed in 
version 5.0.0
   ```
   
   The deprecation warning gives callers no migration guidance — no URL to 
migrate to.
   
   ### What was changed?
   
   Two `@deprecated(eol_version="5.0.0")` decorators in 
`superset/views/core.py` were missing a `new_target` argument:
   
   - `explore_json_data` (line 240) — serves cached async chart results via 
cache_key
   - `explore_json` (line 297) — serves direct chart data queries
   
   Added `new_target="/api/v1/chart/data"` to both, matching the pattern 
already used by other deprecated endpoints (e.g. `fetch_datasource_metadata`, 
`log`):
   
   ```python
   # before
   @deprecated(eol_version="5.0.0")
   
   # after
   @deprecated(eol_version="5.0.0", new_target="/api/v1/chart/data")
   ```
   
   The production warning will now read:
   
   ```
   Superset.explore_json This API endpoint is deprecated and will be removed in 
version 5.0.0 . Use the following API endpoint instead: /api/v1/chart/data
   ```
   
   ### No behavior change
   
   The endpoints continue to function identically. The only effect is the 
`logger.warning` message now includes the migration URL, giving operators 
actionable guidance.
   
   ### Test plan
   
   - [ ] Verify that calling `/explore_json/` logs the warning with the new 
`new_target` URL appended
   - [ ] Verify that calling `/explore_json/data/<cache_key>` logs the same
   - [ ] Verify both endpoints still return correct responses (no functional 
regression)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to