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

guan404ming 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 5136c6c41bf Use plain ifs to normalize configured artifact roots 
(#73944)
5136c6c41bf is described below

commit 5136c6c41bfc0f6b9e12b37d038a5fe45148a0e5
Author: Jason(Zhe-You) Liu <[email protected]>
AuthorDate: Wed Sep 30 20:40:05 2026 +0800

    Use plain ifs to normalize configured artifact roots (#73944)
---
 task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py 
b/task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py
index b60aa94144b..ec6e6419cba 100644
--- a/task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py
+++ b/task-sdk/src/airflow/sdk/coordinators/_bundle_metadata.py
@@ -113,13 +113,18 @@ def convert_configured_roots(
     """Normalize configured roots while rejecting explicitly empty values."""
     if isinstance(value, _UnsetArtifactRoots):
         return []
-    values = [value] if isinstance(value, (str, os.PathLike)) else (value or 
[])
+    if isinstance(value, (str, os.PathLike)):
+        values = [value]
+    elif value:
+        values = value
+    else:
+        values = []
     if not values or any(not os.fspath(v).strip() for v in values):
         raise ValueError(
             "Artifact roots must contain at least one path when provided, and 
each path must be non-empty; "
             "omit the option to use the task's Dag bundle."
         )
-    return convert_roots(value)
+    return convert_roots(values)
 
 
 def validate_schema_version(instance, _, value) -> str:

Reply via email to