From: Peter Amstutz Date: Tue, 2 Aug 2022 16:40:27 +0000 (-0400) Subject: 19280: explicitly include/exclude primary X-Git-Tag: 2.5.0~103^2~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/4e5838bd9e1a7baa5b3e53e97e308140e4b6105f 19280: explicitly include/exclude primary Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py index d2486c164b..d2dfcf26bc 100644 --- a/sdk/cwl/arvados_cwl/runner.py +++ b/sdk/cwl/arvados_cwl/runner.py @@ -417,8 +417,14 @@ def upload_dependencies(arvrunner, name, document_loader, normalizeFilesDirs(sc) - if include_primary and "id" in workflowobj: - sc.append({"class": "File", "location": workflowobj["id"]}) + if "id" in workflowobj: + defrg, _ = urllib.parse.urldefrag(workflowobj["id"]) + if include_primary: + # make sure it's included + sc.append({"class": "File", "location": defrg}) + else: + # make sure it's excluded + sc = [d for d in sc if d.get("location") != defrg] def visit_default(obj): def defaults_are_optional(f):