[ARVADOS] updated: 2.1.0-1180-g74aa79ebb

Git user git at public.arvados.org
Tue Aug 10 19:44:51 UTC 2021


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 4 ++++
 sdk/cwl/arvados_cwl/arvtool.py  | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

       via  74aa79ebb951a915a8f5aba49852a0119835c579 (commit)
      from  52111b8131b2a17a6f8ec485d571a3d144a74184 (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 74aa79ebb951a915a8f5aba49852a0119835c579
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Tue Aug 10 15:44:27 2021 -0400

    17984: Improve error reporting a bit
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index 04db611fb..2e491fe5b 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -22,6 +22,7 @@ import cwltool.main
 import cwltool.workflow
 import cwltool.process
 import cwltool.argparser
+from cwltool.errors import WorkflowException
 from cwltool.process import shortname, UnsupportedRequirement, use_custom_schema
 from cwltool.utils import adjustFileObjs, adjustDirObjs, get_listing
 
@@ -301,6 +302,9 @@ def main(args, stdout, stderr, api_client=None, keep_client=None,
         if keep_client is None:
             keep_client = arvados.keep.KeepClient(api_client=api_client, num_retries=4)
         executor = ArvCwlExecutor(api_client, arvargs, keep_client=keep_client, num_retries=4)
+    except WorkflowException as e:
+        logger.error(e, exc_info=(sys.exc_info()[1] if arvargs.debug else False))
+        return 1
     except Exception:
         logger.exception("Error creating the Arvados CWL Executor")
         return 1
diff --git a/sdk/cwl/arvados_cwl/arvtool.py b/sdk/cwl/arvados_cwl/arvtool.py
index c79b1e67b..13664a8df 100644
--- a/sdk/cwl/arvados_cwl/arvtool.py
+++ b/sdk/cwl/arvados_cwl/arvtool.py
@@ -19,7 +19,7 @@ def validate_cluster_target(arvrunner, runtimeContext):
     if runtimeContext.project_uuid:
         cluster_target = runtimeContext.submit_runner_cluster or arvrunner.api._rootDesc["uuidPrefix"]
         if not runtimeContext.project_uuid.startswith(cluster_target):
-            raise WorkflowException("Project uuid '%s' must be for target cluster '%s'" % (runtimeContext.project_uuid, cluster_target))
+            raise WorkflowException("Project uuid '%s' should start with id of target cluster '%s'" % (runtimeContext.project_uuid, cluster_target))
 
         try:
             if runtimeContext.project_uuid[5:12] == '-tpzed-':
@@ -29,7 +29,7 @@ def validate_cluster_target(arvrunner, runtimeContext):
                 if proj["group_class"] != "project":
                     raise Exception("not a project, group_class is '%s'" % (proj["group_class"]))
         except Exception as e:
-            raise WorkflowException("Invalid value for project uuid '%s': %s" % (runtimeContext.project_uuid, e))
+            raise WorkflowException("Invalid project uuid '%s': %s" % (runtimeContext.project_uuid, e))
 
 def set_cluster_target(tool, arvrunner, builder, runtimeContext):
     cluster_target_req = None

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list