You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Taragolis (via GitHub)" <gi...@apache.org> on 2023/02/18 19:08:37 UTC

[GitHub] [airflow] Taragolis commented on a diff in pull request #29347: SSH Provider: Add cmd_timeout to ssh connection extra

Taragolis commented on code in PR #29347:
URL: https://github.com/apache/airflow/pull/29347#discussion_r1111094280


##########
airflow/providers/ssh/hooks/ssh.py:
##########
@@ -173,6 +182,14 @@ def __init__(
                 if "conn_timeout" in extra_options and self.conn_timeout is None:
                     self.conn_timeout = int(extra_options["conn_timeout"])
 
+                if self.cmd_timeout is None:
+                    if "cmd_timeout" in extra_options:
+                        self.cmd_timeout = (
+                            int(extra_options["cmd_timeout"]) if extra_options["cmd_timeout"] else None
+                        )
+                    else:
+                        self.cmd_timeout = CMD_TIMEOUT
+

Review Comment:
   This seems like some inconsistent between direct hook parameters and Connection parameters.
   You can turn off cmd timeout only by connection, but not by hook parameters, it always fallback to `CMD_TIMEOUT`
   
   Usual direct hook parameters override connection



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org