[ARVADOS] updated: 7a194de4a1ea6638c2500fe89979d3610f37e1f2
Git user
git at public.curoverse.com
Tue Sep 27 16:30:33 EDT 2016
Summary of changes:
sdk/cwl/arvados_cwl/arvworkflow.py | 4 ++--
sdk/cwl/arvados_cwl/runner.py | 13 +++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
via 7a194de4a1ea6638c2500fe89979d3610f37e1f2 (commit)
from 60d5347a73a24638b57715c5f5d9c56d84a9e57e (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 7a194de4a1ea6638c2500fe89979d3610f37e1f2
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Sep 27 16:30:27 2016 -0400
10129: Rename del_listing to trim_listing and add docstring about what it is
for.
diff --git a/sdk/cwl/arvados_cwl/arvworkflow.py b/sdk/cwl/arvados_cwl/arvworkflow.py
index 3bb0a34..f4ce446 100644
--- a/sdk/cwl/arvados_cwl/arvworkflow.py
+++ b/sdk/cwl/arvados_cwl/arvworkflow.py
@@ -11,7 +11,7 @@ from cwltool.pathmapper import adjustFileObjs, adjustDirObjs
import ruamel.yaml as yaml
-from .runner import upload_docker, upload_dependencies, del_listing
+from .runner import upload_docker, upload_dependencies, trim_listing
from .arvtool import ArvadosCommandTool
logger = logging.getLogger('arvados.cwl-runner')
@@ -23,7 +23,7 @@ def upload_workflow(arvRunner, tool, job_order, project_uuid, update_uuid):
packed = pack(document_loader, workflowobj, uri, tool.metadata)
- adjustDirObjs(job_order, del_listing)
+ adjustDirObjs(job_order, trim_listing)
main = [p for p in packed["$graph"] if p["id"] == "#main"][0]
for inp in main["inputs"]:
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index aafe7c3..07f85bb 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -23,7 +23,16 @@ logger = logging.getLogger('arvados.cwl-runner')
cwltool.draft2tool.ACCEPTLIST_RE = re.compile(r"^[a-zA-Z0-9._+-]+$")
-def del_listing(obj):
+def trim_listing(obj):
+ """Remove 'listing' field from Directory objects that are keep references.
+
+ When Directory objects represent Keep references, it redundant and
+ potentially very expensive to pass fully enumerated Directory objects
+ between instances of cwl-runner (e.g. a submitting a job, or using the
+ RunInSingleContainer feature), so delete the 'listing' field when it is
+ safe to do so.
+ """
+
if obj.get("location", "").startswith("keep:") and "listing" in obj:
del obj["listing"]
if obj.get("location", "").startswith("_:"):
@@ -135,7 +144,7 @@ class Runner(object):
self.job_order.get("id", "#"),
False)
- adjustDirObjs(self.job_order, del_listing)
+ adjustDirObjs(self.job_order, trim_listing)
if "id" in self.job_order:
del self.job_order["id"]
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list