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(explore): Persist URL params to form-data #21792

Merged
merged 1 commit into from
Oct 13, 2022

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Oct 12, 2022

SUMMARY

This PR fixes a regression introduced in #20399 where the URL parameters—which are defined in the request arguments—were not persisted to the form-data, i.e., the code did not adhere the the existing logic defined in the soon to be deprecated legacy endpoint here.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

Added unit tests.

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

@@ -19,7 +19,7 @@
from typing import Any, cast, Dict, Optional

import simplejson as json
from flask import current_app as app
Copy link
Member Author

Choose a reason for hiding this comment

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

No need for misdirection.

@john-bodley john-bodley marked this pull request as ready for review October 12, 2022 22:50
@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Merging #21792 (5d2b738) into master (75e6a04) will increase coverage by 0.74%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #21792      +/-   ##
==========================================
+ Coverage   66.11%   66.86%   +0.74%     
==========================================
  Files        1803     1803              
  Lines       68996    68997       +1     
  Branches     7349     7349              
==========================================
+ Hits        45616    46132     +516     
+ Misses      21487    20972     -515     
  Partials     1893     1893              
Flag Coverage Δ
hive 52.92% <33.33%> (-0.01%) ⬇️
mysql 78.25% <100.00%> (?)
postgres 78.31% <100.00%> (?)
presto 52.82% <33.33%> (-0.01%) ⬇️
python 81.45% <100.00%> (+1.54%) ⬆️
sqlite 76.80% <100.00%> (-0.01%) ⬇️
unit 51.07% <66.66%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/explore/commands/get.py 90.52% <100.00%> (+0.10%) ⬆️
superset/migrations/shared/utils.py 35.48% <0.00%> (-0.59%) ⬇️
superset/models/slice.py 86.13% <0.00%> (-0.07%) ⬇️
superset/db_engine_specs/base.py 89.69% <0.00%> (+0.15%) ⬆️
superset/views/core.py 76.06% <0.00%> (+0.45%) ⬆️
superset/common/query_object.py 94.38% <0.00%> (+0.51%) ⬆️
superset/connectors/sqla/models.py 90.73% <0.00%> (+0.51%) ⬆️
superset/commands/importers/v1/utils.py 93.50% <0.00%> (+1.29%) ⬆️
superset/models/core.py 90.11% <0.00%> (+1.41%) ⬆️
superset/views/base_api.py 98.44% <0.00%> (+1.55%) ⬆️
... and 28 more

📣 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. Thanks for the fix!

@michael-s-molina
Copy link
Member

michael-s-molina commented Oct 13, 2022

Sadly there doesn't seem to be any unit/integration tests which specifically test the GetExploreCommand class.

The tests are in tests/integration_tests/explore/api_tests.py. The API only supports GET.

@john-bodley john-bodley force-pushed the john-bodley--fix-20399 branch from 9f78ee9 to 5d2b738 Compare October 13, 2022 15:47
@john-bodley
Copy link
Member Author

Thanks for the tip @michael-s-molina. I added a test.

@john-bodley john-bodley merged commit b1bf25e into apache:master Oct 13, 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/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants