From 59ac77450a978b8bcfcbfdcc01b191ea91a2bc86 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Tue, 4 Jun 2024 16:46:00 -0400 Subject: [PATCH] 9964: Update comment Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- sdk/cwl/arvados_cwl/arvcontainer.py | 37 ++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py index 4e298a2788..61ab55f766 100644 --- a/sdk/cwl/arvados_cwl/arvcontainer.py +++ b/sdk/cwl/arvados_cwl/arvcontainer.py @@ -388,18 +388,33 @@ class ArvadosContainer(JobBase): output_glob.clear() if output_glob: - # Tools should either use cwl.output.json or output - # binding glob. Unfortunately one CWL conformance test - # has both, but that test uses cwl.output.json return - # a string, not a File. - # - # It could happen that a tool uses cwl.output.json, - # references a file, but also uses a glob, and that - # would break, because we don't know about it ahead of - # time. However I don't think any conformance tests - # do this and I'd even be inclined to rule that out of - # order in the CWL spec if it came up. + # Tools should either use cwl.output.json or + # outputBinding globs. However, one CWL conformance + # test has both, so we need to make sure we collect + # cwl.output.json in this case. That test uses + # cwl.output.json return a string, but also uses + # outputBinding. output_glob.append("cwl.output.json") + + # It could happen that a tool creates cwl.output.json, + # references a file, but also uses a outputBinding + # glob that doesn't include the file being referenced. + # + # In this situation, output_glob will only match the + # pattern we know about. If cwl.output.json referred + # to other files in the output, those would be + # missing. We could upload the entire output, but we + # currently have no way of knowing at this point + # whether cwl.output.json will be used this way. + # + # Because this is a corner case, I'm inclined to leave + # this as a known issue for now. No conformance tests + # do this and I'd even be inclined to have it ruled + # incompatible in the CWL spec if it did come up. + # That said, in retrospect it would have been good to + # require CommandLineTool to declare when it expects + # cwl.output.json. + container_request["output_glob"] = output_glob ram_multiplier = [1] -- 2.30.2