-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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: Supports form_data param in old Explore endpoint #21469
fix: Supports form_data param in old Explore endpoint #21469
Conversation
url = parse.urlparse(redirect_url) | ||
query = parse.parse_qs(url.query) | ||
query.pop("form_data") | ||
query["form_data_key"] = [form_data_key] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this this an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From urllib.parse
The dictionary keys are the unique query variable names and the values are lists of values for each name.
It's because most web frameworks allow multiple values to be associated with a single field.
Codecov Report
@@ Coverage Diff @@
## master #21469 +/- ##
=======================================
Coverage 66.59% 66.60%
=======================================
Files 1791 1791
Lines 68555 68577 +22
Branches 7319 7319
=======================================
+ Hits 45654 45673 +19
- Misses 21008 21011 +3
Partials 1893 1893
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
(cherry picked from commit 2c7323a)
(cherry picked from commit 2c7323a)
(cherry picked from commit 2c7323a)
SUMMARY
This PR improves the support for the
form_data
param in the old/superset/explore
endpoint. Previously, the old endpoint only redirected the user to the new endpoint with the same original request parameters. Now, ifform_data
is present, the endpoint will persist that information in the cache and replace the parameter withform_data_key
, the new supported format.Example:
will be redirected to
TESTING INSTRUCTIONS
Check that GET requests to the old endpoint are correctly redirected to the new endpoint with the correct parameters.
ADDITIONAL INFORMATION