[ARVADOS] updated: b1b7794d253c653a370200c2b33d477d3f7f231e

Git user git at public.curoverse.com
Tue Nov 8 15:56:10 EST 2016


Summary of changes:
 sdk/cwl/arvados_cwl/runner.py | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

       via  b1b7794d253c653a370200c2b33d477d3f7f231e (commit)
      from  5c274cd1249ce0f5e0048f8e0974e36deee8c9cc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b1b7794d253c653a370200c2b33d477d3f7f231e
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Nov 8 15:26:44 2016 -0500

    10460: Don't use adjustFileObjs to set secondaryFiles because it traverses secondaryFiles.

diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index fd150d7..ba41d7d 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -120,14 +120,16 @@ def upload_instance(arvrunner, name, tool, job_order):
 
         for t in tool.tool["inputs"]:
             def setSecondary(fileobj):
-                if "__norecurse" in fileobj:
-                    del fileobj["__norecurse"]
-                    return
-                if "secondaryFiles" not in fileobj:
-                    fileobj["secondaryFiles"] = [{"location": substitute(fileobj["location"], sf), "class": "File", "__norecurse": True} for sf in t["secondaryFiles"]]
+                if isinstance(fileobj, dict) and fileobj.get("class") == "File":
+                    if "secondaryFiles" not in fileobj:
+                        fileobj["secondaryFiles"] = [{"location": substitute(fileobj["location"], sf), "class": "File"} for sf in t["secondaryFiles"]]
+
+                if isinstance(fileobj, list):
+                    for e in fileobj:
+                        setSecondary(e)
 
             if shortname(t["id"]) in job_order and t.get("secondaryFiles"):
-                adjustFileObjs(job_order, setSecondary)
+                setSecondary(job_order[shortname(t["id"])])
 
         workflowmapper = upload_dependencies(arvrunner,
                                              name,

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list