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

update sshtunnel version #18684

Merged
merged 1 commit into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow/providers/ssh/hooks/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def get_tunnel(
)
else:
tunnel_kwargs.update(
host_pkey_directories=[],
host_pkey_directories=None,
)

client = SSHTunnelForwarder(self.remote_host, **tunnel_kwargs)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def write_version(filename: str = os.path.join(*[my_dir, "airflow", "git_version
ssh = [
'paramiko>=2.6.0',
'pysftp>=0.2.9',
'sshtunnel>=0.1.4,<0.2',
'sshtunnel>=0.3.2,<0.5',
]
statsd = [
'statsd>=3.3.0, <4.0',
Expand Down
12 changes: 7 additions & 5 deletions tests/providers/ssh/hooks/test_ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def test_tunnel_without_password(self, ssh_mock):
ssh_proxy=None,
local_bind_address=('localhost',),
remote_bind_address=('localhost', 1234),
host_pkey_directories=[],
host_pkey_directories=None,
logger=hook.log,
)

Expand Down Expand Up @@ -351,7 +351,7 @@ def test_tunnel_with_private_key(self, ssh_mock):
ssh_proxy=None,
local_bind_address=('localhost',),
remote_bind_address=('localhost', 1234),
host_pkey_directories=[],
host_pkey_directories=None,
logger=hook.log,
)

Expand All @@ -374,7 +374,7 @@ def test_tunnel_with_private_key_passphrase(self, ssh_mock):
ssh_proxy=None,
local_bind_address=('localhost',),
remote_bind_address=('localhost', 1234),
host_pkey_directories=[],
host_pkey_directories=None,
logger=hook.log,
)

Expand All @@ -397,7 +397,7 @@ def test_tunnel_with_private_key_ecdsa(self, ssh_mock):
ssh_proxy=None,
local_bind_address=('localhost',),
remote_bind_address=('localhost', 1234),
host_pkey_directories=[],
host_pkey_directories=None,
logger=hook.log,
)

Expand Down Expand Up @@ -430,7 +430,9 @@ def test_tunnel(self):
args=["python", "-c", HELLO_SERVER_CMD],
stdout=subprocess.PIPE,
)
with subprocess.Popen(**subprocess_kwargs) as server_handle, hook.create_tunnel(2135, 2134):
with subprocess.Popen(**subprocess_kwargs) as server_handle, hook.get_tunnel(
local_port=2135, remote_port=2134
):
server_output = server_handle.stdout.read(5)
assert b"ready" == server_output
socket = socket.socket()
Expand Down