Skip to content

Commit d96e4ac

Browse files
committed
Merge branch 'issues/5114-filesize-sniffing' of github.com:DataBiosphere/toil into issues/5114-filesize-sniffing
2 parents 82fd093 + 6b144c9 commit d96e4ac

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

requirements-server.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
connexion[swagger-ui]>=2.10.0, <3
2-
flask>=2.0,<3
2+
flask>=2.0,<4
33
werkzeug>=2.0,<4
44
flask-cors==5.0.0
55
gunicorn==23.0.0

src/toil/cwl/cwltoil.py

+15-7
Original file line numberDiff line numberDiff line change
@@ -3820,13 +3820,11 @@ def visitSteps(
38203820
# All CWL Process objects (including CommandLineTool) will have tools
38213821
# if they bothered to run the Process __init__.
38223822
return op(cmdline_tool.tool)
3823-
else:
3824-
raise RuntimeError(
3825-
f"Unsupported type encountered in workflow "
3826-
f"traversal: {type(cmdline_tool)}"
3827-
)
3828-
# Satisfy mypy, but this branch should never be reached in practice
3829-
return []
3823+
raise RuntimeError(
3824+
f"Unsupported type encountered in workflow "
3825+
f"traversal: {type(cmdline_tool)}"
3826+
)
3827+
38303828

38313829

38323830
def rm_unprocessed_secondary_files(job_params: Any) -> None:
@@ -4396,6 +4394,16 @@ def main(args: Optional[list[str]] = None, stdout: TextIO = sys.stdout) -> int:
43964394
# ToilFsAccess needs to be set up if we want to be able to use
43974395
# URLs.
43984396
builder = tool._init_job(initialized_job_order, runtime_context)
4397+
if not isinstance(tool, cwltool.workflow.Workflow):
4398+
# make sure this doesn't add listing items; if shallow_listing is
4399+
# selected, it will discover dirs one deep and then again later on
4400+
# (when the cwltool builder gets constructed from the job in the
4401+
# CommandLineTool's job() method,
4402+
# see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L951),
4403+
# producing 2+ deep listings instead of only 1.
4404+
# ExpressionTool also uses a builder, see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L207
4405+
# Workflows don't need this because they don't go through CommandLineTool or ExpressionTool
4406+
builder.loadListing = "no_listing"
43994407

44004408
# make sure this doesn't add listing items; if shallow_listing is
44014409
# selected, it will discover dirs one deep and then again later on

0 commit comments

Comments
 (0)