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(ssh-tunnel): update fields for open tunnel with private + private key passwords #22764

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Jan 17, 2023

SUMMARY

With the new extensions class, we forgot to update the params to match the ssh_tunnel.open_tunnel function.
private_key -> ssh_pkey
ssh_private_key -> ssh_private_key_password

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

@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #22764 (7cec6a2) into master (0870a0b) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master   #22764   +/-   ##
=======================================
  Coverage   67.25%   67.25%           
=======================================
  Files        1876     1876           
  Lines       71819    71819           
  Branches     7864     7864           
=======================================
  Hits        48299    48299           
  Misses      21494    21494           
  Partials     2026     2026           
Flag Coverage Δ
hive 52.59% <0.00%> (ø)
javascript 53.73% <ø> (ø)
mysql 78.57% <0.00%> (ø)
postgres 78.64% <0.00%> (ø)
presto 52.49% <0.00%> (ø)
python 81.88% <0.00%> (ø)
sqlite 77.00% <0.00%> (ø)
unit 51.53% <0.00%> (ø)

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

Impacted Files Coverage Δ
superset/extensions/ssh.py 64.10% <0.00%> (ø)

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

params["private_key"] = private_key
params["private_key_password"] = ssh_tunnel.private_key_password
params["ssh_pkey"] = private_key
params["ssh_private_key_password"] = ssh_tunnel.private_key_password

Choose a reason for hiding this comment

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

Oh! I was reading the docs here: https://sshtunnel.readthedocs.io/en/latest/ thanks!
Also, not a blocker for these changes, but probably worth mentioning we should make sure that when updating a tunnel, if we send a password or private_key/private_key_password, we remove the other login method from the tunnel (the UI is doing it already), otherwise, it will get into the if all the time if both are present, even if password is not the latest login method of the tunnel.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's cut a ticket for this as well on our end

Copy link
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

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

LGTM!

@hughhhh hughhhh merged commit e6271f0 into 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
@mistercrunch mistercrunch deleted the ssh-tunnel-update-params branch March 26, 2024 16:21
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/XS 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants