-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix workflows with optional non-default parameter input
where input not provided. Fixes #19328
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 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
12 changes: 12 additions & 0 deletions
12
lib/galaxy_test/workflow/optional_text_param_rescheduling.gxwf-tests.yml
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,12 @@ | ||
- doc: | | ||
Test that scheduling succeeds even if step needs rescheduling | ||
job: | ||
optional_text: | ||
type: raw | ||
value: null | ||
outputs: | ||
out: | ||
class: File | ||
asserts: | ||
- that: has_text | ||
text: "null" |
30 changes: 30 additions & 0 deletions
30
lib/galaxy_test/workflow/optional_text_param_rescheduling.gxwf.yml
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,30 @@ | ||
class: GalaxyWorkflow | ||
inputs: | ||
optional_text: | ||
type: text | ||
optional: true | ||
when: | ||
type: boolean | ||
default: true | ||
outputs: | ||
out: | ||
outputSource: gx_text_optional/inputs_json | ||
steps: | ||
pick_value: | ||
tool_id: pick_value | ||
tool_state: | ||
style_cond: | ||
pick_style: first | ||
type_cond: | ||
param_type: boolean | ||
pick_from: | ||
- value: true | ||
gx_text_optional: | ||
tool_id: gx_text_optional | ||
# the when expression requires pick_value to execute, which recapitulates https://github.com/galaxyproject/galaxy/issues/19328 | ||
when: $(inputs.when) | ||
in: | ||
parameter: | ||
source: optional_text | ||
when: | ||
source: pick_value/boolean_param |