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(sqllab): custom url params disappeared #23952

Conversation

justinpark
Copy link
Member

SUMMARY

SQLLab supports the custom url parameters using jinja template. However the custom url parameters are gone when user consists with the copied url(or saved query link). The bug is caused by the broken url update logic.

This commit fixes the logic to include the custom url parameters while updating new url.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:

after--redirection-fix.mov

Before:

before--redirection-fix.mov

TESTING INSTRUCTIONS

  • save a query (or copy link)
  • pasted the url in the browser address input box and then add extra custom parameters
  • check the updated url whether it includes the custom parameters

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 May 5, 2023

Codecov Report

Merging #23952 (0b329a5) into master (841726d) will increase coverage by 0.00%.
The diff coverage is 94.44%.

❗ Current head 0b329a5 differs from pull request most recent head 9f0c994. Consider uploading reports for the commit 9f0c994 to get more accurate results

@@           Coverage Diff           @@
##           master   #23952   +/-   ##
=======================================
  Coverage   68.18%   68.19%           
=======================================
  Files        1941     1941           
  Lines       75240    75242    +2     
  Branches     8158     8157    -1     
=======================================
+ Hits        51305    51308    +3     
+ Misses      21852    21851    -1     
  Partials     2083     2083           
Flag Coverage Δ
javascript 54.49% <50.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/datasource/api.py 100.00% <ø> (ø)
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 50.00% <50.00%> (+0.52%) ⬆️
superset/advanced_data_type/api.py 100.00% <100.00%> (ø)
superset/annotation_layers/annotations/api.py 89.31% <100.00%> (ø)
superset/annotation_layers/api.py 86.32% <100.00%> (ø)
superset/async_events/api.py 100.00% <100.00%> (ø)
superset/available_domains/api.py 100.00% <100.00%> (ø)
superset/cachekeys/api.py 96.15% <100.00%> (ø)
superset/charts/api.py 85.71% <100.00%> (ø)
superset/charts/data/api.py 88.95% <100.00%> (ø)
... and 36 more

... and 1 file with indirect coverage changes

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

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@justinpark justinpark merged commit d23df35 into apache:master May 8, 2023
justinpark added a commit to airbnb/superset-fork that referenced this pull request May 16, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants