X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/386e1eefaac2021805f73732b10e9f543c221593..3737e05681b6cfb22ea0af0da08598e458da16f0:/sdk/cwl/arvados_cwl/runner.py diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py index bb4fac2ae9..c55e976924 100644 --- a/sdk/cwl/arvados_cwl/runner.py +++ b/sdk/cwl/arvados_cwl/runner.py @@ -46,6 +46,11 @@ def trim_anonymous_location(obj): if obj.get("location", "").startswith("_:"): del obj["location"] +def remove_redundant_fields(obj): + for field in ("path", "nameext", "nameroot", "dirname"): + if field in obj: + del obj[field] + def find_defaults(d, op): if isinstance(d, list): for i in d: @@ -288,6 +293,12 @@ class Runner(object): self.tool = tool self.job_order = job_order self.running = False + if enable_reuse: + # If reuse is permitted by command line arguments but + # disabled by the workflow itself, disable it. + reuse_req, _ = get_feature(self.tool, "http://arvados.org/cwl#ReuseRequirement") + if reuse_req: + enable_reuse = reuse_req["enableReuse"] self.enable_reuse = enable_reuse self.uuid = None self.final_output = None