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(ssh_tunnel): Rename allow_ssh_tunneling and change the default value to False #22723

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

Antonio-RiveroMartnez
Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez commented Jan 13, 2023

SUMMARY

  • Rename the allow_ssh_tunneling flag so it's now disable_ssh_tunneling, always false except for those DB engines we know it's not supported (Amazon Athena, GSheets and BigQuery so far)
  • Update tests

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

@Antonio-RiveroMartnez Antonio-RiveroMartnez changed the title feat(ssh_tunnel): Change default value for DB engines that supports SSH Tunnels feat(ssh_tunnel): Change default value for allow_ssh_tunneling in the base class Jan 13, 2023
@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #22723 (5a1b8d0) into master (3ed288d) will decrease coverage by 1.53%.
The diff coverage is 100.00%.

❗ Current head 5a1b8d0 differs from pull request most recent head 044e51c. Consider uploading reports for the commit 044e51c to get more accurate results

@@            Coverage Diff             @@
##           master   #22723      +/-   ##
==========================================
- Coverage   67.13%   65.59%   -1.54%     
==========================================
  Files        1869     1869              
  Lines       71656    71658       +2     
  Branches     7822     7822              
==========================================
- Hits        48103    47006    -1097     
- Misses      21526    22625    +1099     
  Partials     2027     2027              
Flag Coverage Δ
hive ?
javascript 53.93% <100.00%> (ø)
mysql 78.05% <100.00%> (+<0.01%) ⬆️
postgres 78.12% <100.00%> (+<0.01%) ⬆️
presto ?
python 78.17% <100.00%> (-3.19%) ⬇️
sqlite ?
unit ?

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

Impacted Files Coverage Δ
superset/databases/api.py 89.94% <ø> (-2.80%) ⬇️
superset/db_engine_specs/postgres.py 96.55% <ø> (-0.03%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 44.46% <100.00%> (ø)
superset/db_engine_specs/athena.py 70.00% <100.00%> (-19.66%) ⬇️
superset/db_engine_specs/base.py 80.90% <100.00%> (-8.23%) ⬇️
superset/db_engine_specs/bigquery.py 60.95% <100.00%> (-8.65%) ⬇️
superset/db_engine_specs/gsheets.py 45.58% <100.00%> (-30.71%) ⬇️
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%) ⬇️
... and 74 more

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

@@ -193,7 +193,7 @@ class BaseEngineSpec: # pylint: disable=too-many-public-methods
engine_aliases: Set[str] = set()
drivers: Dict[str, str] = {}
default_driver: Optional[str] = None
allow_ssh_tunneling = False
allow_ssh_tunneling = True
Copy link
Member

@eschutho eschutho Jan 13, 2023

Choose a reason for hiding this comment

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

This is kind of a nit, but I think your first inclination to make the default value False was a good one and follows convention. Can we instead flip the behavior, so something like disable_ssh_tunneling = False

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh! Ok, yeah, makes sense, let me change it

- Change the default value of allow_ssh_tunneling flag so it's always true except for those DB engines we know it's not supported
- Change the allow_ssh_tunneling for disable_ssh_tunneling to follow convention as before when the flag was set by default to false
@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 16, 2023
@Antonio-RiveroMartnez Antonio-RiveroMartnez changed the title feat(ssh_tunnel): Change default value for allow_ssh_tunneling in the base class feat(ssh_tunnel): Rename allow_ssh_tunneling and change the default value to False Jan 17, 2023
Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

looks great, thanks @Antonio-RiveroMartnez!

@eschutho eschutho merged commit ad758c0 into apache:master Jan 18, 2023
@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.

3 participants