Lee-W commented on code in PR #74451:
URL: https://github.com/apache/airflow/pull/74451#discussion_r4227757145


##########
providers/common/ai/src/airflow/providers/common/ai/hooks/mcp.py:
##########
@@ -239,7 +239,23 @@ def get_conn(self) -> Any:
             args = extra.get("args", [])
             if isinstance(args, str):
                 args = [args]
+            if not isinstance(args, list) or not all(isinstance(arg, str) for 
arg in args):
+                raise ValueError(
+                    f"'args' in extra for connection {self.mcp_conn_id!r} must 
be a string or a "
+                    f"list of strings, got {args!r}."
+                )
             timeout = extra.get("timeout", 10)
+            # ``None`` and ``0`` are kept valid: fastmcp's 
``normalize_timeout_to_seconds``
+            # treats both as "no init timeout".

Review Comment:
   `init_timeout=None` is replaced by `settings.client_init_timeout` before 
normalizing. A `null` timeout is now mapped to `0` before building the toolset, 
and the comment is updated to say why.



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

Reply via email to