Skip to content

Commit

Permalink
CWL: Fix --no-container & prepull (#5188)
Browse files Browse the repository at this point in the history
* CWL container prepull: no reason to if extensions are enabled, they are now supported by cwl-utils 0.36+

* CWL container prepull: skip if --no-containers is specified

* Use checksumming revsort test

---------

Co-authored-by: Adam Novak <anovak@soe.ucsc.edu>
  • Loading branch information
mr-c and adamnovak authored Jan 17, 2025
1 parent 2307445 commit 55d4048
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements-cwl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ ruamel.yaml>=0.15,<=0.19
ruamel.yaml.clib>=0.2.6
networkx!=2.8.1,<4
CacheControl[filecache]
cwl-utils>=0.32
cwl-utils>=0.36
11 changes: 2 additions & 9 deletions src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -4336,15 +4336,8 @@ def main(args: Optional[list[str]] = None, stdout: TextIO = sys.stdout) -> int:
raise

# Attempt to prepull the containers
if not options.no_prepull:
if not options.enable_ext:
# The CWL utils parser does not support cwltool extensions and will crash if encountered, so don't prepull if extensions are enabled
# See https://github.com/common-workflow-language/cwl-utils/issues/309
try_prepull(uri, runtime_context, expected_config.batchSystem)
else:
logger.debug(
"Not prepulling containers as cwltool extensions are not supported."
)
if not options.no_prepull and not options.no_container:
try_prepull(uri, runtime_context, expected_config.batchSystem)

options.tool_help = None
options.debug = options.logLevel == "DEBUG"
Expand Down
5 changes: 5 additions & 0 deletions src/toil/test/cwl/cwlTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ def test_run_revsort_nochecksum(self) -> None:
"revsort.cwl", partial(self._tester, main_args=["--no-compute-checksum"])
)

def test_run_revsort_no_container(self) -> None:
self.revsort(
"revsort.cwl", partial(self._tester, main_args=["--no-container"])
)

def test_run_revsort2(self) -> None:
self.revsort("revsort2.cwl", self._tester)

Expand Down

0 comments on commit 55d4048

Please sign in to comment.