[ARVADOS] updated: 1.3.0-2261-gcf447c171
Git user
git at public.arvados.org
Thu Mar 12 19:09:46 UTC 2020
Summary of changes:
sdk/cwl/arvados_cwl/arvworkflow.py | 53 +++++++++++---------------------------
sdk/cwl/setup.py | 2 +-
2 files changed, 16 insertions(+), 39 deletions(-)
via cf447c1718535fe924005db53bed5011c714dd63 (commit)
from 446dffef8db3b0df3367d84d6ab3da1b6c8bcc14 (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 cf447c1718535fe924005db53bed5011c714dd63
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Mar 12 15:06:09 2020 -0400
12409: Fix packing bug in cwltool, bump dependency on cwltool
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/cwl/arvados_cwl/arvworkflow.py b/sdk/cwl/arvados_cwl/arvworkflow.py
index 332dcb607..ba6033364 100644
--- a/sdk/cwl/arvados_cwl/arvworkflow.py
+++ b/sdk/cwl/arvados_cwl/arvworkflow.py
@@ -186,40 +186,16 @@ class ArvadosWorkflow(Workflow):
False)
if self.wf_pdh is None:
- ### We have to reload the document to get the original version.
- #
- # The workflow document we have in memory right now was
- # updated to the internal CWL version. We need to reload the
- # document to go back to its original version, because the
- # version of cwltool installed in the user's container is
- # likely to reject our internal version, and we don't want to
- # break existing workflows.
- #
- # What's going on here is that the updater replaces the
- # documents/fragments in the index with updated ones, the
- # index is also used as a cache, so we need to go through the
- # loading process with an empty index and updating turned off
- # so we have the original un-updated documents.
- #
- loadingContext = self.loadingContext.copy()
- loadingContext.do_update = False
- document_loader = schema_salad.ref_resolver.SubLoader(loadingContext.loader)
- loadingContext.loader = document_loader
- loadingContext.loader.idx = {}
- uri = self.tool["id"]
- loadingContext, workflowobj, uri = fetch_document(uri, loadingContext)
- loadingContext, uri = resolve_and_validate_document(
- loadingContext, workflowobj, uri
- )
- workflowobj, metadata = loadingContext.loader.resolve_ref(uri)
- ###
-
- workflowobj["requirements"] = dedup_reqs(self.requirements)
- workflowobj["hints"] = dedup_reqs(self.hints)
-
- packed = pack(document_loader, workflowobj, uri, metadata)
+ packed = pack(self.doc_loader, self.tool, self.tool["id"], self.metadata)
+
+ for p in packed["$graph"]:
+ if p["id"] == "#main":
+ p["requirements"] = dedup_reqs(self.requirements)
+ p["hints"] = dedup_reqs(self.hints)
def visit(item):
+ if "requirements" in item:
+ item["requirements"] = [i for i in item["requirements"] if i["class"] != "DockerRequirement"]
for t in ("hints", "requirements"):
if t not in item:
continue
@@ -239,9 +215,6 @@ class ArvadosWorkflow(Workflow):
raise WorkflowException("Non-top-level ResourceRequirement in single container cannot have expressions")
if not dyn:
self.static_resource_req.append(req)
- if req["class"] == "DockerRequirement":
- if "http://arvados.org/cwl#dockerCollectionPDH" in req:
- del req["http://arvados.org/cwl#dockerCollectionPDH"]
visit_class(packed["$graph"], ("Workflow", "CommandLineTool"), visit)
@@ -250,9 +223,9 @@ class ArvadosWorkflow(Workflow):
upload_dependencies(self.arvrunner,
runtimeContext.name,
- document_loader,
+ self.doc_loader,
packed,
- uri,
+ self.tool["id"],
False)
# Discover files/directories referenced by the
@@ -329,6 +302,10 @@ class ArvadosWorkflow(Workflow):
if job_res_reqs[0].get("ramMin", 1024) < 128:
job_res_reqs[0]["ramMin"] = 128
+ arguments = ["--no-container", "--move-outputs", "--preserve-entire-environment", "workflow.cwl", "cwl.input.yml"]
+ if runtimeContext.debug:
+ arguments.insert(0, '--debug')
+
wf_runner = cmap({
"class": "CommandLineTool",
"baseCommand": "cwltool",
@@ -348,7 +325,7 @@ class ArvadosWorkflow(Workflow):
}]
}],
"hints": self.hints,
- "arguments": ["--no-container", "--move-outputs", "--preserve-entire-environment", "workflow.cwl#main", "cwl.input.yml"],
+ "arguments": arguments,
"id": "#"
})
return ArvadosCommandTool(self.arvrunner, wf_runner, self.loadingContext).job(joborder_resolved, output_callback, runtimeContext)
diff --git a/sdk/cwl/setup.py b/sdk/cwl/setup.py
index 547584878..5a359d22c 100644
--- a/sdk/cwl/setup.py
+++ b/sdk/cwl/setup.py
@@ -39,7 +39,7 @@ setup(name='arvados-cwl-runner',
# file to determine what version of cwltool and schema-salad to
# build.
install_requires=[
- 'cwltool==2.0.20200303141624',
+ 'cwltool==2.0.20200312183052',
'schema-salad==5.0.20200302192450',
'arvados-python-client{}'.format(pysdk_dep),
'setuptools',
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list