NBardelot opened a new issue #16364:
URL: https://github.com/apache/airflow/issues/16364


   In SSHHook the timeout argument of the constructor is used to set a 
connection timeout. This is fine.
   
   But in SSHOperator the timeout argument of the constructor is used for 
*both* the timeout of the SSHHook *and* the timeout of the command itself. This 
ambiguous use of the same parameter is very dirty.
   
   I see two ways to clean the behaviour: 
   
   1. Let the SSHHook constructor be the only way to handle the connection 
timeout (thus, if one wants a specific timeout they should explicitely build a 
hook to be passed to the operator using the operator's constructor).
   2. Split the timeout argument in SSHOperator into two arguments conn_timeout 
and cmd_timeout for example.
   
   The choice between 1 and 2 depends on how frequently people are supposed to 
want to change the connection timeout. If it is something very frequent. then 
go for 2. if not go for 1.
   
   BR and thanks for the code!


-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to