[arvados] updated: 2.6.0-567-gbb7f544859

git repository hosting git at public.arvados.org
Thu Sep 7 20:44:03 UTC 2023


Summary of changes:
 sdk/cwl/arvados_cwl/runner.py           |  8 +++++++-
 sdk/python/arvados/commands/arv_copy.py | 10 +++++-----
 2 files changed, 12 insertions(+), 6 deletions(-)

       via  bb7f5448594e55b86efb54a69bd58f886e3833a9 (commit)
      from  8d73d90c86b8da6bf43af42d8038b16a082ec080 (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 bb7f5448594e55b86efb54a69bd58f886e3833a9
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Sep 7 16:43:45 2023 -0400

    20933: Copies collections reported by a-c-r
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index 4d211d3ed6..860f8a1b9a 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -950,11 +950,16 @@ class Runner(Process):
 
 def print_keep_deps_visitor(references, doc_loader, tool):
     def collect_locators(obj):
-        loc = obj.get("location", "") or obj.get("http://arvados.org/cwl#dockerCollectionPDH", "")
+        loc = obj.get("location", "")
 
         g = arvados.util.keepuri_pattern.match(loc)
         if g and g[1] not in references:
             references.append(g[1])
+            return
+
+        loc = obj.get("http://arvados.org/cwl#dockerCollectionPDH", "") or obj.get("acrContainerImage")
+        if loc:
+            references.append(loc)
 
     sc_result = scandeps(tool["id"], tool,
                          set(),
@@ -963,6 +968,7 @@ def print_keep_deps_visitor(references, doc_loader, tool):
                          nestdirs=False)
 
     visit_class(sc_result, ("File", "Directory"), collect_locators)
+    visit_class(tool, ("DockerRequirement", "http://arvados.org/cwl#WorkflowRunnerResources"), collect_locators)
 
 
 def print_keep_deps(tool):
diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py
index 4042674035..3132fbe465 100755
--- a/sdk/python/arvados/commands/arv_copy.py
+++ b/sdk/python/arvados/commands/arv_copy.py
@@ -36,6 +36,7 @@ import logging
 import tempfile
 import urllib.parse
 import io
+import json
 
 import arvados
 import arvados.config
@@ -313,12 +314,11 @@ def copy_workflow(wf_uuid, src, dst, args):
                "ARVADOS_API_TOKEN": src.api_token,
                "PATH": os.environ["PATH"]}
         result = subprocess.run(["arvados-cwl-runner", "--quiet", "--print-keep-deps", "arvwf:"+wf_uuid],
-                                env=env)
-        print(result)
-        exit()
+                                capture_output=True, env=env)
+        locations = json.loads(result.stdout)
 
-        #if locations:
-        #        copy_collections(locations, src, dst, args)
+        if locations:
+            copy_collections(locations, src, dst, args)
 
     # copy the workflow itself
     del wf['uuid']

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list