Skip to content

fix(reports): preserve native filters in dashboard report URLs - #45463

Open
endimonan wants to merge 8 commits into
apache:masterfrom
endimonan:fix/report-native-filter-url-encoding
Open

endimonan wants to merge 8 commits into
apache:masterfrom
endimonan:fix/report-native-filter-url-encoding

Conversation

@endimonan

Copy link
Copy Markdown
Contributor

SUMMARY

Fixes #45384.

Dashboard reports can ignore configured native filters when a value such as Company 2 needs Rison quotes. The report model replaces those quotes with %27, then the permalink redirect URL-encodes them again. After the browser decodes the URL, the remaining %27 makes the filter state invalid.

Return raw Rison from the report model and let the existing permalink redirect encode it once. Add regression coverage for spaces, apostrophes, Unicode, URL delimiters and literal percent sequences, including reports with tabs disabled, no selected tab, one tab and multiple tabs.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: the generated dashboard URL contains double-encoded Rison quotes (%2527), and configured filters fail to decode.

After: one URL decode produces valid Rison with the original filter values. Other query parameters and selected tab anchors are preserved.

TESTING INSTRUCTIONS

  • Reproduced before the fix: 8 regression cases failed, 37 tests passed.
  • After the fix: all 540 tests passed across tests/unit_tests/reports/model_test.py, tests/unit_tests/commands/report/test_native_filter_urls.py and tests/unit_tests/commands/report/execute_test.py.
  • Changed-file pre-commit passed, including mypy, Ruff and pylint.
  • The regression tests exercise the report model, report URL generation and the actual permalink redirect; permalink storage and authorization are mocked. SMTP delivery and browser screenshot capture were not exercised locally.

Manual verification: enable ALERT_REPORTS, ALERT_REPORTS_FILTER and, for tabbed reports, ALERT_REPORT_TABS. Configure a dashboard report with a filter value containing a space or apostrophe, such as Company 2 or O'Brien. Run the report and compare its PNG/PDF against the dashboard with the same filter applied. Repeat for a selected tab and multiple tabs.

ADDITIONAL INFORMATION

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 78afff5
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6ae7b5cba071cbf1095ccff3
😎 Deploy Preview https://deploy-preview-45463--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.

@github-actions github-actions Bot added the doc Namespace | Anything related to documentation label Oct 19, 2026
@codeant-ai-for-open-source

codeant-ai-for-open-source Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: a664ba112c8d

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.65%. Comparing base (19bc306) to head (a664ba1).
⚠️ Report is 2 commits behind head on master.

❗ There is a different number of reports uploaded between BASE (19bc306) and HEAD (a664ba1). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (19bc306) HEAD (a664ba1)
python 7 5
postgres 2 1
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #45463       +/-   ##
===========================================
- Coverage   86.09%   65.65%   -20.44%     
===========================================
  Files        3140     3140               
  Lines      219205   219205               
  Branches    51973    51973               
===========================================
- Hits       188723   143922    -44801     
- Misses      27054    71937    +44883     
+ Partials     3428     3346       -82     
Flag Coverage Δ
hive 33.69% <ø> (ø)
mysql 51.47% <ø> (-0.01%) ⬇️
postgres 51.50% <ø> (+<0.01%) ⬆️
presto 35.37% <ø> (ø)
python 51.78% <ø> (-36.80%) ⬇️
sqlite 51.18% <ø> (ø)
unit ?

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.

@github-actions github-actions Bot added the requires:rebase Requires rebasing on top of current master label Nov 12, 2026
@github-actions github-actions Bot removed the requires:rebase Requires rebasing on top of current master label Nov 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Namespace | Anything related to documentation size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ALERT_REPORTS_FILTERS fails to apply filter to emailed dashboard

3 participants