[arvados] updated: 2.6.0-570-gbed5918049
git repository hosting
git at public.arvados.org
Thu Oct 5 20:09:40 UTC 2023
Summary of changes:
sdk/python/arvados/commands/arv_copy.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
via bed591804938b5be74e9cd2a951890fcff36c7f3 (commit)
from cf25e8bf1af840ddd304e18e789ccb2abc0afd1e (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 bed591804938b5be74e9cd2a951890fcff36c7f3
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Oct 5 15:52:10 2023 -0400
20933: Handle errors when calling arvados-cwl-runner
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py
index 3132fbe465..6431f83d96 100755
--- a/sdk/python/arvados/commands/arv_copy.py
+++ b/sdk/python/arvados/commands/arv_copy.py
@@ -157,6 +157,9 @@ def main():
for d in listvalues(local_repo_dir):
shutil.rmtree(d, ignore_errors=True)
+ if not result:
+ exit(1)
+
# If no exception was thrown and the response does not have an
# error_token field, presume success
if 'error_token' in result or 'uuid' not in result:
@@ -313,8 +316,13 @@ def copy_workflow(wf_uuid, src, dst, args):
env = {"ARVADOS_API_HOST": urllib.parse.urlparse(src._rootDesc["rootUrl"]).netloc,
"ARVADOS_API_TOKEN": src.api_token,
"PATH": os.environ["PATH"]}
- result = subprocess.run(["arvados-cwl-runner", "--quiet", "--print-keep-deps", "arvwf:"+wf_uuid],
- capture_output=True, env=env)
+ try:
+ result = subprocess.run(["arvados-cwl-runner", "--quiet", "--print-keep-deps", "arvwf:"+wf_uuid],
+ capture_output=True, env=env)
+ except (FileNotFoundError, subprocess.CalledProcessError):
+ logger.error('Copying workflows requires arvados-cwl-runner 2.7.1 or later to be installed in PATH.')
+ return
+
locations = json.loads(result.stdout)
if locations:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list