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

chore(ssh): Allow users to set TUNNEL_TIMEOUT from config #24202

Merged
merged 6 commits into from
May 24, 2023

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented May 24, 2023

SUMMARY

Creating a new config variable SSH_TUNNEL_TIMEOUT this setting will allow sshtunnel to hold request for this time limit with the VPC.

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

@@ -515,6 +515,7 @@ class D3Format(TypedDict, total=False):
# ----------------------------------------------------------------------
SSH_TUNNEL_MANAGER_CLASS = "superset.extensions.ssh.SSHManager"
SSH_TUNNEL_LOCAL_BIND_ADDRESS = "127.0.0.1"
SSH_TUNNEL_TIMEOUT = 1.0
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe SSH_TUNNEL_TIMEOUT_SECS?

@@ -34,6 +34,7 @@ class SSHManager:
def __init__(self, app: Flask) -> None:
super().__init__()
self.local_bind_address = app.config["SSH_TUNNEL_LOCAL_BIND_ADDRESS"]
TUNNEL_TIMEOUT = app.config["SSH_TUNNEL_TIMEOUT"]
Copy link
Contributor

Choose a reason for hiding this comment

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

does this set the TUNNEL_TIMEOUT constant back to sshtunel? or we still need to invoke sshtunel. TUNNEL_TIMEOUT = "value"
can we add a test for this?

@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #24202 (791a790) into master (c54eedf) will decrease coverage by 11.08%.
The diff coverage is 75.00%.

❗ Current head 791a790 differs from pull request most recent head d6008fb. Consider uploading reports for the commit d6008fb to get more accurate results

@@             Coverage Diff             @@
##           master   #24202       +/-   ##
===========================================
- Coverage   68.30%   57.23%   -11.08%     
===========================================
  Files        1957     1957               
  Lines       75588    75590        +2     
  Branches     8223     8223               
===========================================
- Hits        51633    43264     -8369     
- Misses      21848    30219     +8371     
  Partials     2107     2107               
Flag Coverage Δ
hive 53.36% <75.00%> (+<0.01%) ⬆️
mysql ?
postgres ?
presto 53.29% <75.00%> (+<0.01%) ⬆️
python 59.91% <75.00%> (-22.91%) ⬇️
sqlite ?
unit 53.42% <75.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/extensions/ssh.py 67.50% <66.66%> (+0.83%) ⬆️
superset/config.py 91.42% <100.00%> (-0.55%) ⬇️

... and 305 files with indirect coverage changes

📣 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/M and removed size/S labels May 24, 2023
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 8b0c68c into apache:master May 24, 2023
@hughhhh hughhhh deleted the ssh-timeout-setting branch May 24, 2023 20:25
sadpandajoe added a commit to preset-io/superset that referenced this pull request Jun 7, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 8, 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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants