Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set no_listing in builder init for Workflows #5149

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading