[ARVADOS] updated: a5e42d6963081e7b45a1a0cdc43b4a285e2e5aef

Git user git at public.curoverse.com
Thu Mar 17 16:34:52 EDT 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

       via  a5e42d6963081e7b45a1a0cdc43b4a285e2e5aef (commit)
      from  704612e95f8fb6c12701dce74795828d27b25755 (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 a5e42d6963081e7b45a1a0cdc43b4a285e2e5aef
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Thu Mar 17 16:34:48 2016 -0400

    Improve exception reporting for arvados-cwl-runner, no issue #

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 533d24a..c9dd7d4 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -11,6 +11,7 @@ import cwltool.draft2tool
 import cwltool.workflow
 import cwltool.main
 from cwltool.process import shortname
+from cwltool.errors import WorkflowException
 import threading
 import cwltool.docker
 import fnmatch
@@ -228,8 +229,11 @@ class ArvadosJob(object):
                     self.builder.outdir = outdir
                     self.builder.pathmapper.keepdir = keepdir
                     outputs = self.collect_outputs("keep:" + record["output"])
+            except WorkflowException as e:
+                logger.error("Error while collecting job outputs:\n%s", e, exc_info=(e if self.arvrunner.debug else False))
+                processStatus = "permanentFail"
             except Exception as e:
-                logger.exception("Got exception while collecting job outputs:")
+                logger.exception("Got unknown exception while collecting job outputs:")
                 processStatus = "permanentFail"
 
             self.output_callback(outputs, processStatus)
@@ -353,6 +357,8 @@ class ArvCwlRunner(object):
     def arvExecutor(self, tool, job_order, input_basedir, args, **kwargs):
         events = arvados.events.subscribe(arvados.api('v1'), [["object_uuid", "is_a", "arvados#job"]], self.on_message)
 
+        self.debug = args.debug
+
         try:
             self.api.collections().get(uuid=crunchrunner_pdh).execute()
         except arvados.errors.ApiError as e:
@@ -426,7 +432,7 @@ class ArvCwlRunner(object):
                 if sys.exc_info()[0] is KeyboardInterrupt:
                     logger.error("Interrupted, marking pipeline as failed")
                 else:
-                    logger.exception("Caught unhandled exception, marking pipeline as failed")
+                    logger.error("Caught unhandled exception, marking pipeline as failed.  Error was: %s", sys.exc_info()[0], exc_info=(sys.exc_info()[1] if self.debug else False))
                 self.api.pipeline_instances().update(uuid=self.pipeline["uuid"],
                                                      body={"state": "Failed"}).execute(num_retries=self.num_retries)
             finally:

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list