This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 093c1cacc72 Fix airflowctl list argument parsing (#72454)
093c1cacc72 is described below

commit 093c1cacc72a550ebea62088b28f81ddb9ad2583
Author: auyua9 <[email protected]>
AuthorDate: Tue Sep 8 02:49:06 2026 +0800

    Fix airflowctl list argument parsing (#72454)
    
    Co-authored-by: auyua9 <[email protected]>
---
 airflow-ctl/src/airflowctl/ctl/cli_config.py         | 2 +-
 airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/airflow-ctl/src/airflowctl/ctl/cli_config.py 
b/airflow-ctl/src/airflowctl/ctl/cli_config.py
index ed21902134a..4a385537eb1 100755
--- a/airflow-ctl/src/airflowctl/ctl/cli_config.py
+++ b/airflow-ctl/src/airflowctl/ctl/cli_config.py
@@ -642,7 +642,7 @@ class CommandFactory:
             "bool": bool,
             "str": str,
             "bytes": bytes,
-            "list": list,
+            "list": string_list_type,
             "dict": json_dict_type,
             "tuple": tuple,
             "set": set,
diff --git a/airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py 
b/airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py
index 5973a7c54d9..8eed0b8108f 100644
--- a/airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py
+++ b/airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py
@@ -341,6 +341,14 @@ class TestCommandFactory:
 
         assert parsed_conf == {"my-key": "my-value"}
 
+    def test_command_factory_parses_comma_separated_list_fields(self):
+        """List fields should parse comma-separated CLI values as whole 
items."""
+        command_factory = CommandFactory()
+
+        list_type = command_factory._python_type_from_string("list")
+
+        assert list_type("dag1, dag2") == ["dag1", "dag2"]
+
     def test_json_dict_type_returns_dict_input_unchanged(self):
         """A dict input is returned as-is without re-parsing."""
         value = {"my-key": "my-value"}

Reply via email to