[ARVADOS] updated: 67ef6afce1dd158938eebcf6bed9d3edeb9d73a0

Git user git at public.curoverse.com
Mon Mar 21 23:01:42 EDT 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

       via  67ef6afce1dd158938eebcf6bed9d3edeb9d73a0 (commit)
      from  9507b78b62a042013a8c80ed82182a2ca6d45912 (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 67ef6afce1dd158938eebcf6bed9d3edeb9d73a0
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Mar 21 23:01:38 2016 -0400

    8654: Handle error on capturing runner output

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index eda5346..1061359 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -286,11 +286,14 @@ class RunnerJob(object):
         def loadref(b, u):
             return document_loader.resolve_ref(u, base_url=b)[0]
 
-        adjustFiles(scandeps("", self.tool.tool,
-                             set(("run",)),
-                             set(("$schemas", "path")),
-                             loadref),
-                    functools.partial(visitFiles, workflowfiles))
+        sc = scandeps("", self.tool.tool,
+                      set(("$import", "run")),
+                      set(("$include", "$schemas", "path")),
+                      loadref)
+        print self.tool.tool
+        print sc
+
+        adjustFiles(sc, functools.partial(visitFiles, workflowfiles))
         adjustFiles(self.job_order, functools.partial(visitFiles, jobfiles))
 
         workflowmapper = ArvPathMapper(self.arvrunner, workflowfiles, "",
@@ -335,13 +338,14 @@ class RunnerJob(object):
         else:
             processStatus = "permanentFail"
 
-        outc = arvados.collection.Collection(record["output"])
-        with outc.open("cwl.output.json") as f:
-            outputs = json.load(f)
-
-        self.arvrunner.output_callback(outputs, processStatus)
-
-        del self.arvrunner.jobs[record["uuid"]]
+        outputs = None
+        try:
+            outc = arvados.collection.Collection(record["output"])
+            with outc.open("cwl.output.json") as f:
+                outputs = json.load(f)
+            self.arvrunner.output_callback(outputs, processStatus)
+        finally:
+            del self.arvrunner.jobs[record["uuid"]]
 
 class ArvPathMapper(cwltool.pathmapper.PathMapper):
     def __init__(self, arvrunner, referenced_files, basedir,

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list