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

feat: filter parameters from DB API #21248

Merged
merged 16 commits into from
Sep 2, 2022

Conversation

betodealmeida
Copy link
Member

SUMMARY

Filter out some of the parameters from the database connection in the API.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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

@betodealmeida betodealmeida requested review from AAfghahi, eschutho, villebro and dpgaspar and removed request for villebro August 30, 2022 01:31
@codecov
Copy link

codecov bot commented Aug 30, 2022

Codecov Report

Merging #21248 (3078aeb) into master (c3a00d4) will decrease coverage by 0.15%.
The diff coverage is 69.31%.

❗ Current head 3078aeb differs from pull request most recent head 7e87ac7. Consider uploading reports for the commit 7e87ac7 to get more accurate results

@@            Coverage Diff             @@
##           master   #21248      +/-   ##
==========================================
- Coverage   66.44%   66.29%   -0.16%     
==========================================
  Files        1786     1786              
  Lines       68267    68348      +81     
  Branches     7263     7264       +1     
==========================================
- Hits        45357    45308      -49     
- Misses      21041    21170     +129     
- Partials     1869     1870       +1     
Flag Coverage Δ
hive ?
mysql 80.82% <69.23%> (?)
postgres 80.87% <69.23%> (-0.02%) ⬇️
presto ?
python 80.98% <69.23%> (-0.34%) ⬇️
sqlite 79.41% <69.23%> (-0.03%) ⬇️
unit ?

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

Impacted Files Coverage Δ
superset-frontend/src/SqlLab/App.jsx 0.00% <ø> (ø)
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 55.17% <0.00%> (ø)
...ntend/src/SqlLab/components/TableElement/index.tsx 72.30% <0.00%> (ø)
superset-frontend/src/SqlLab/constants.ts 100.00% <ø> (ø)
superset-frontend/src/utils/localStorageHelpers.ts 90.00% <ø> (ø)
superset-frontend/src/views/App.tsx 0.00% <0.00%> (ø)
...aseModal/DatabaseConnectionForm/EncryptedField.tsx 10.00% <0.00%> (ø)
...c/views/CRUD/data/database/DatabaseModal/index.tsx 32.11% <0.00%> (+0.07%) ⬆️
superset/databases/api.py 95.49% <ø> (ø)
superset/models/helpers.py 39.21% <0.00%> (ø)
... and 55 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/L and removed size/M labels Aug 30, 2022
@@ -339,14 +339,6 @@ def get_effective_user(self, object_url: URL) -> Optional[str]:
else None
)

@memoized(
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not working for BigQuery, had to disable.

@@ -639,7 +631,6 @@ def db_engine_spec(self) -> Type[db_engine_specs.BaseEngineSpec]:
return self.get_db_engine_spec(url)

@classmethod
@memoized
Copy link
Member Author

Choose a reason for hiding this comment

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

Same here, not working for BigQuery.

@betodealmeida betodealmeida force-pushed the filter_parameters_from_db branch from 93c20a7 to ec01948 Compare August 30, 2022 05:35
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM

@yousoph
Copy link
Member

yousoph commented Aug 30, 2022

/testenv up

@github-actions
Copy link
Contributor

@yousoph Ephemeral environment spinning up at http://52.12.84.244:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

superset/db_engine_specs/bigquery.py Outdated Show resolved Hide resolved
Copy link
Member

@dpgaspar dpgaspar left a comment

Choose a reason for hiding this comment

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

tests are failing

@betodealmeida betodealmeida force-pushed the filter_parameters_from_db branch from ec01948 to f28bfbc Compare August 30, 2022 14:11
superset/databases/dao.py Outdated Show resolved Hide resolved
@pull-request-size pull-request-size bot added size/XL and removed size/L labels Sep 1, 2022
@betodealmeida betodealmeida force-pushed the filter_parameters_from_db branch 5 times, most recently from da55a5a to 6379dbc Compare September 1, 2022 06:13
@betodealmeida betodealmeida force-pushed the filter_parameters_from_db branch from 6379dbc to 7c5fe05 Compare September 1, 2022 16:14
@jinghua-qa
Copy link
Member

for the skip test, do we have a plan to get it fix and re-enable?

@jinghua-qa
Copy link
Member

/testenv up

@betodealmeida
Copy link
Member Author

for the skip test, do we have a plan to get it fix and re-enable?

I'm not sure why these were timing out, they are unrelated to this PR. I need to take a better look.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2022

@jinghua-qa Ephemeral environment spinning up at http://34.221.65.136:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@jinghua-qa jinghua-qa left a comment

Choose a reason for hiding this comment

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

LGTM

@betodealmeida betodealmeida merged commit 34a79ad into apache:master Sep 2, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 2, 2022

Ephemeral environment shutdown and build artifacts deleted.

@sadpandajoe
Copy link
Member

🏷️ preset:2022.33

betodealmeida added a commit to betodealmeida/incubator-superset that referenced this pull request Sep 2, 2022
betodealmeida added a commit to betodealmeida/incubator-superset that referenced this pull request Sep 2, 2022
sadpandajoe added a commit to preset-io/superset that referenced this pull request Sep 2, 2022
sadpandajoe added a commit to preset-io/superset that referenced this pull request Sep 2, 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/XL 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants