X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b5d352d6099b60db5dcdd9183dcab3e8e17d729e..33f91bb5a4ed93e9cadf21920526daa53351dbea:/sdk/cwl/arvados_cwl/__init__.py diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py index 43082dfb85..7f4b5c7549 100644 --- a/sdk/cwl/arvados_cwl/__init__.py +++ b/sdk/cwl/arvados_cwl/__init__.py @@ -1,4 +1,7 @@ #!/usr/bin/env python +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 # Implement cwl-runner interface for submitting and running work on Arvados, using # either the Crunch jobs API or Crunch containers API. @@ -110,6 +113,7 @@ class ArvCwlRunner(object): fs_access=CollectionFsAccess("", collection_cache=self.collection_cache), num_retries=self.num_retries, overrides=kwargs.get("override_tools")) + kwargs["resolver"] = partial(collectionResolver, self.api, num_retries=self.num_retries) if "class" in toolpath_object and toolpath_object["class"] == "CommandLineTool": return ArvadosCommandTool(self, toolpath_object, **kwargs) elif "class" in toolpath_object and toolpath_object["class"] == "Workflow": @@ -421,14 +425,8 @@ class ArvCwlRunner(object): if kwargs.get("submit"): # Submit a runner job to run the workflow for us. if self.work_api == "containers": - if tool.tool["class"] == "CommandLineTool": + if tool.tool["class"] == "CommandLineTool" and kwargs.get("wait"): kwargs["runnerjob"] = tool.tool["id"] - upload_dependencies(self, - kwargs["name"], - tool.doc_loader, - tool.tool, - tool.tool["id"], - False) runnerjob = tool.job(job_order, self.output_callback, **kwargs).next() @@ -449,8 +447,7 @@ class ArvCwlRunner(object): name=kwargs.get("name"), on_error=kwargs.get("on_error"), submit_runner_image=kwargs.get("submit_runner_image")) - - if not kwargs.get("submit") and "cwl_runner_job" not in kwargs and self.work_api == "jobs": + elif "cwl_runner_job" not in kwargs and self.work_api == "jobs": # Create pipeline for local run self.pipeline = self.api.pipeline_instances().create( body={ @@ -686,7 +683,8 @@ def add_arv_hints(): "http://arvados.org/cwl#PartitionRequirement", "http://arvados.org/cwl#APIRequirement", "http://commonwl.org/cwltool#LoadListingRequirement", - "http://arvados.org/cwl#IntermediateOutput" + "http://arvados.org/cwl#IntermediateOutput", + "http://arvados.org/cwl#ReuseRequirement" ]) def main(args, stdout, stderr, api_client=None, keep_client=None): @@ -753,6 +751,7 @@ def main(args, stdout, stderr, api_client=None, keep_client=None): arvargs.use_container = True arvargs.relax_path_checks = True arvargs.validate = None + arvargs.print_supported_versions = False make_fs_access = partial(CollectionFsAccess, collection_cache=runner.collection_cache)