Lee-W commented on code in PR #74451:
URL: https://github.com/apache/airflow/pull/74451#discussion_r4227761631
##########
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):
Review Comment:
Handles both shape now.
* `args: null` is treated as `[]`.
* A string starting with `[` is parsed as JSON; malformed JSON, or an array
with a non-string item, raises a `ValueError` naming the connection.
* A plain string without a leading `[` is still one argument.
--
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]