-
Notifications
You must be signed in to change notification settings - Fork 360
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
Allow nested inputs when corresponding meta setting is set to true #5562
Merged
+76
−13
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
28 changes: 28 additions & 0 deletions
28
...s/validate/wdl_draft3/valid/supplied_optional_subwf_sub_inputs_meta_enabled/import_me.wdl
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,28 @@ | ||
version 1.0 | ||
|
||
workflow sub_wf { | ||
input { | ||
Int y | ||
} | ||
# Calls foo but doesn't provide an 'x'. That's fine because the input was optional, but now the outer WF cannot override it. | ||
call foo { input: y = y } | ||
|
||
# No outputs, but we don't want that to be the error: | ||
output { } | ||
meta {allowNestedInputs: true} | ||
} | ||
|
||
task foo { | ||
input { | ||
Int? x | ||
Int y | ||
} | ||
command { | ||
} | ||
output { | ||
Int z = y | ||
} | ||
runtime { | ||
docker: "ubuntu:latest" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...subwf_sub_inputs_meta_enabled/supplied_optional_subwf_sub_inputs_meta_enabled.inputs.json
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,4 @@ | ||
{ | ||
"supplied_optional_subwf_sub_inputs.y": 5, | ||
"supplied_optional_subwf_sub_inputs.sub_wf.foo.x": 5 | ||
} |
14 changes: 14 additions & 0 deletions
14
...ptional_subwf_sub_inputs_meta_enabled/supplied_optional_subwf_sub_inputs_meta_enabled.wdl
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,14 @@ | ||
version 1.0 | ||
|
||
import "import_me.wdl" | ||
|
||
workflow supplied_optional_subwf_sub_inputs { | ||
input { | ||
Int y | ||
} | ||
# Shouldn't (strictly) be able to call this sub-workflow because the inputs are not passed through | ||
call import_me.sub_wf {input: y=y} | ||
meta { | ||
allowNestedInputs: true | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TOL (Talking Out Loud, not gating approval of this PR): Is it the case that specifying
would silently set
allowNestedInputs
tofalse
? Should there be a warning or error if the wrong type (something other thanMetaValueElementBoolean
) was specified?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meta {allowNestedInputs: "I like turtles"}
Will indeed setallowNestedInputs
to false. I see no problem here, as it is clearly not the intention of the WDL writer to enable a feature.Booleans are always
true
orfalse
. I do not think extra code is needed to evaluate cases such as"true"
,"false"
,0
,1
etc. If people start complaining at this behavior we can easily change it later. For now, I see no reason for the extra effort and code complexity (also I am lazy 😉).