-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unexecuted CWL jobs with dynamic requirements failing on missing …
…inputs (#5136) * Move condition check into wrapper * Fill in empty conditional --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
367f0ad
commit 0c174eb
Showing
3 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This workflow fills in a required int from an optional int, but only when the | ||
# int is really present. But it also uses the value to compute the conditional | ||
# task's resource requirements, so Toil can't just schedule the task and then | ||
# check the condition. | ||
# See <https://github.com/DataBiosphere/toil/issues/4930#issue-2297563321> | ||
cwlVersion: v1.2 | ||
class: Workflow | ||
requirements: | ||
InlineJavascriptRequirement: {} | ||
inputs: | ||
optional_input: int? | ||
steps: | ||
the_step: | ||
in: | ||
required_input: | ||
source: optional_input | ||
when: $(inputs.required_input != null) | ||
run: | ||
cwlVersion: v1.2 | ||
class: CommandLineTool | ||
inputs: | ||
required_input: int | ||
requirements: | ||
ResourceRequirement: | ||
coresMax: $(inputs.required_input) | ||
baseCommand: "nproc" | ||
outputs: [] | ||
out: [] | ||
outputs: [] |