Skip to content

Commit 8a45d3c

Browse files
committed
fix: check location before path on cwl_utils File objects
load_inputfile() converts input dicts into cwl_utils File objects where location="SB:..." and path=None. The extract methods only checked .path on objects, silently dropping SB: and LFN: references stored in .location. This caused empty replica maps and sandbox download failures on the worker.
1 parent 428acdc commit 8a45d3c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

diracx-api/src/diracx/api/job_wrapper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ def __extract_file_paths_from_cwl_value(cwl_value: Any) -> list[str]:
144144
path = None
145145
if isinstance(item, dict):
146146
path = item.get("location") or item.get("path")
147+
elif hasattr(item, "location"):
148+
path = item.location or getattr(item, "path", None)
147149
elif hasattr(item, "path"):
148150
path = item.path
149151
if path and isinstance(path, str):
@@ -280,6 +282,8 @@ def __extract_lfns_from_cwl_value(cwl_value: Any) -> list[str]:
280282
path = None
281283
if isinstance(item, dict):
282284
path = item.get("location") or item.get("path")
285+
elif hasattr(item, "location"):
286+
path = item.location or getattr(item, "path", None)
283287
elif hasattr(item, "path"):
284288
path = item.path
285289
if path and isinstance(path, str):

0 commit comments

Comments
 (0)