Skip to content

Commit

Permalink
Don't set no_listing in builder init for Workflows (#5149)
Browse files Browse the repository at this point in the history
* Do not reset listingn in workflows

* mypy
  • Loading branch information
stxue1 authored Nov 15, 2024
1 parent 47ac7bf commit 74eaf4b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -4186,6 +4186,16 @@ def main(args: Optional[list[str]] = None, stdout: TextIO = sys.stdout) -> int:
# ToilFsAccess needs to be set up if we want to be able to use
# URLs.
builder = tool._init_job(initialized_job_order, runtime_context)
if not isinstance(tool, cwltool.workflow.Workflow):
# make sure this doesn't add listing items; if shallow_listing is
# selected, it will discover dirs one deep and then again later on
# (when the cwltool builder gets constructed from the job in the
# CommandLineTool's job() method,
# see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L951),
# producing 2+ deep listings instead of only 1.
# ExpressionTool also uses a builder, see https://github.com/common-workflow-language/cwltool/blob/9cda157cb4380e9d30dec29f0452c56d0c10d064/cwltool/command_line_tool.py#L207
# Workflows don't need this because they don't go through CommandLineTool or ExpressionTool
builder.loadListing = "no_listing"

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

0 comments on commit 74eaf4b

Please sign in to comment.