Skip to content

fix(views): remove stray space in @deprecated new_target log message#42218

Merged
rusackas merged 1 commit into
masterfrom
fix/explore-json-deprecated-endpoint
Jul 20, 2026
Merged

fix(views): remove stray space in @deprecated new_target log message#42218
rusackas merged 1 commit into
masterfrom
fix/explore-json-deprecated-endpoint

Conversation

@eschutho

Copy link
Copy Markdown
Member

Decisions made that were not in the instructions
None.

What was the warning?

Production logs show Superset.explore_json This API endpoint is deprecated and will be removed in version 5.0.0 — emitted by the shared @deprecated() decorator in superset/views/base.py, used across several endpoints in superset/views/core.py (explore_json, explore_json_data, warm_up_cache, etc).

What changed

When a @deprecated() call site sets new_target, the message concatenation left a stray space before the period:

"...will be removed in version 5.0.0 . Use the following API endpoint instead: /api/v1/chart/data"

instead of the intended:

"...will be removed in version 5.0.0. Use the following API endpoint instead: /api/v1/chart/data"

One-character fix: " . Use..."". Use..." in superset/views/base.py. Added a regression test (test_deprecated_new_target_message_has_no_stray_space) asserting the formatted message has no stray space before the period.

No-behavior-change note

This only touches the deprecation warning's log message text. It does not change the deprecated endpoint's behavior, routing, permissions, or the @deprecated() decorator's once-per-process warning semantics. The explore_json endpoint itself remains deprecated and unchanged — it's an intentional, architectural deprecation and out of scope here. Note #41714 is a separate in-flight effort to remove the legacy explore_json/viz.py pipeline entirely; this PR is just a stopgap message-hygiene fix for current production logs in the meantime.

Test plan

  • tests/unit_tests/views/test_base.py — added test_deprecated_new_target_message_has_no_stray_space; ran the full file (32 tests) locally, all pass.
  • ruff check / ruff format --check clean.
  • Full pre-commit run clean (mypy, ruff, pylint, etc.).

The message concatenation left a stray space before the period
("...version 5.0.0 . Use the following...") whenever new_target was
set (e.g. Superset.explore_json's deprecation warning in production
logs). Cosmetic only, no behavior change.
@bito-code-review

bito-code-review Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Code Review Agent Run #69e703

Actionable Suggestions - 0
Review Details
  • Files reviewed - 2 · Commit Range: 4da0cbe..4da0cbe
    • superset/views/base.py
    • tests/unit_tests/views/test_base.py
  • Files skipped - 0
  • Tools
    • MyPy (Static Code Analysis) - ✔︎ Successful
    • Astral Ruff (Static Code Analysis) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.19%. Comparing base (42a2aed) to head (4da0cbe).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #42218      +/-   ##
==========================================
- Coverage   65.19%   65.19%   -0.01%     
==========================================
  Files        2768     2768              
  Lines      156081   156081              
  Branches    35719    35719              
==========================================
- Hits       101754   101751       -3     
- Misses      52365    52367       +2     
- Partials     1962     1963       +1     
Flag Coverage Δ
hive 38.61% <0.00%> (ø)
mysql 57.86% <100.00%> (ø)
postgres 57.92% <100.00%> (-0.01%) ⬇️
presto 40.55% <0.00%> (ø)
python 59.32% <100.00%> (-0.01%) ⬇️
sqlite 57.54% <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.

@eschutho
eschutho requested a review from rebenitez1802 July 19, 2026 16:27

@rebenitez1802 rebenitez1802 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rusackas
rusackas merged commit 6405327 into master Jul 20, 2026
61 checks passed
@rusackas
rusackas deleted the fix/explore-json-deprecated-endpoint branch July 20, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants