Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Preserve unknown URL params #21785

Merged
merged 3 commits into from
Oct 12, 2022

Conversation

michael-s-molina
Copy link
Member

SUMMARY

Fixes a bug where unknown URL params were not being preserved in the URL. This fix also resolves a bug where old short URLs in the form of /r/<id> were not opening because it depended on the r query parameter. It may also fix other issues that depend on unknown parameters such as Jinja templating.

Fixes #20825

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2022-10-12.at.11.22.14.AM.mov

TESTING INSTRUCTIONS

1 - Check that unknown parameters are preserved in the URL
2 - Check that old links in the /r/<id> form are supported

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Merging #21785 (2452fef) into master (8f74e46) will decrease coverage by 1.49%.
The diff coverage is 66.66%.

❗ Current head 2452fef differs from pull request most recent head 151ed7e. Consider uploading reports for the commit 151ed7e to get more accurate results

@@            Coverage Diff             @@
##           master   #21785      +/-   ##
==========================================
- Coverage   66.86%   65.36%   -1.50%     
==========================================
  Files        1803     1803              
  Lines       68996    68995       -1     
  Branches     7349     7349              
==========================================
- Hits        46132    45102    -1030     
- Misses      20971    22000    +1029     
  Partials     1893     1893              
Flag Coverage Δ
hive ?
mysql 78.25% <100.00%> (-0.01%) ⬇️
postgres 78.31% <100.00%> (-0.01%) ⬇️
presto ?
python 78.37% <100.00%> (-3.09%) ⬇️
sqlite ?
unit ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../explore/components/ExploreViewContainer/index.jsx 52.74% <33.33%> (ø)
.../explore/exploreUtils/getParsedExploreURLParams.ts 91.42% <100.00%> (ø)
superset/models/slice.py 86.13% <100.00%> (-0.07%) ⬇️
superset/tables/schemas.py 0.00% <0.00%> (-100.00%) ⬇️
superset/columns/schemas.py 0.00% <0.00%> (-100.00%) ⬇️
superset/db_engines/hive.py 0.00% <0.00%> (-85.19%) ⬇️
...set/advanced_data_type/plugins/internet_address.py 16.32% <0.00%> (-79.60%) ⬇️
superset/utils/pandas_postprocessing/boxplot.py 20.51% <0.00%> (-79.49%) ⬇️
superset/charts/post_processing.py 11.76% <0.00%> (-77.95%) ⬇️
...perset/advanced_data_type/plugins/internet_port.py 18.75% <0.00%> (-77.09%) ⬇️
... and 61 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pull-request-size pull-request-size bot added size/M and removed size/S labels Oct 12, 2022
Copy link
Member

@john-bodley john-bodley left a comment

Choose a reason for hiding this comment

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

LGTM. I've verified that both the URL parameters persist and the short links work, however it seems that the URL parameters are not being leveraged by the SQL template, though that's likely a different issue. My hunch is they're not being added to the form-data via the url_params key.

@john-bodley john-bodley merged commit 11d7d6e into apache:master Oct 12, 2022
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Oct 12, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Not able to take URL_PARAM in explore chart
3 participants