16382: When packing workflow convert "path" to "location"
authorPeter Amstutz <peter.amstutz@curii.com>
Wed, 24 Jun 2020 20:29:42 +0000 (16:29 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 25 Jun 2020 20:10:33 +0000 (16:10 -0400)
Previously it was being modified in-place and the modification was
propagated to the packed version, that no longer happens so it needs
to re-apply the path->location fix here.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

sdk/cwl/arvados_cwl/runner.py

index 7bb66a158e50646f1fc984df7ea30ccd31528bf3..ea4ecf2b6d78cdefababfa94b923a5f4183338d5 100644 (file)
@@ -437,6 +437,9 @@ def packed_workflow(arvrunner, tool, merged_map):
                 if "id" not in v:
                     raise SourceLine(v, None, Exception).makeError("Embedded process object is missing required 'id' field")
                 cur_id = rewrite_to_orig.get(v["id"], v["id"])
+            if "path" in v and "location" not in v:
+                v["location"] = v["path"]
+                del v["path"]
             if "location" in v and not v["location"].startswith("keep:"):
                 v["location"] = merged_map[cur_id].resolved[v["location"]]
             if "location" in v and v["location"] in merged_map[cur_id].secondaryFiles: