derkuci commented on a change in pull request #20474:
URL: https://github.com/apache/airflow/pull/20474#discussion_r774867255
##########
File path: airflow/providers/ssh/hooks/ssh.py
##########
@@ -242,14 +242,19 @@ def __init__(
ssh_conf.parse(config_fd)
host_info = ssh_conf.lookup(self.remote_host)
if host_info and host_info.get('proxycommand'):
- self.host_proxy =
paramiko.ProxyCommand(host_info['proxycommand'])
+ self.host_proxy_cmd = host_info['proxycommand']
if not (self.password or self.key_file):
if host_info and host_info.get('identityfile'):
self.key_file = host_info['identityfile'][0]
self.port = self.port or SSH_PORT
+ @property
Review comment:
I thought about this but wasn't sure how the hook would be used.
Especially not sure if a proxy (which is actually an SSH session started at its
`__init__`) would become inactive and not usable if we keep it long enough in
the cache. But think about the current behavior (of creating the proxy and
keeping it during the life of `SSHHook`), it is actually the closest.
So I'll make the changes as suggested. Thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]