-
Notifications
You must be signed in to change notification settings - Fork 16.5k
Closed
Labels
Description
Apache Airflow Provider(s)
ssh
Versions of Apache Airflow Providers
No response
Apache Airflow version
2.4.1
Operating System
linux
Deployment
Other
Deployment details
No response
What happened
Hi,
SSHOperator documentation states that we should be using cmd_timeout instead of timeout
:param timeout: (deprecated) timeout (in seconds) for executing the command. The default is 10 seconds.
Use conn_timeout and cmd_timeout parameters instead.
But the code doesn't use cmd_timeout at all - and it's still passing self.timeout when running the ssh command:
return self.ssh_hook.exec_ssh_client_command(
ssh_client, command, timeout=self.timeout, environment=self.environment, get_pty=self.get_pty
)
It seems to me that we should self.cmd_timeout here instead. When creating the hook, it correctly uses self.conn_timeout.
I'll try to work on a PR for this.
What you think should happen instead
No response
How to reproduce
No response
Anything else
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable