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

Allow nested inputs when corresponding meta setting is set to true #5562

Merged
merged 1 commit into from
Jul 9, 2020

Conversation

rhpvorderman
Copy link
Collaborator

@rhpvorderman rhpvorderman commented Jul 1, 2020

This implements part of the spec change that handles inputs openwdl/wdl#359

A rewrite from #5523 .

This foregoes the restriction that the specs requires that all required inputs should be set at the top-level workflow.

It does enable using bubbled up inputs when the meta flag is set.

The restrictions should be enabled on biscayne. But I have no idea how to implement that in this code base. Some help is needed. For now implementing this in the new base at least implements part of the spec.

This implements part of the spec change that handles inputs openwdl/wdl#359
@rhpvorderman rhpvorderman added Comply with language spec WDL Community Contribution A pull request from the Cromwell open-source community labels Jul 1, 2020
@kv076 kv076 requested review from cjllanwarne and aednichols July 7, 2020 14:58
@aednichols
Copy link
Collaborator

Thanks for the updated PR, we will take a look (should we close #5523?)

Copy link
Contributor

@cjllanwarne cjllanwarne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correctly wired through to me

@rhpvorderman
Copy link
Collaborator Author

rhpvorderman commented Jul 8, 2020

@aednichols #5523 can be closed if this is merged. Maybe keep the branch around in case we want to adhere to the spec for WDL 2.0?

val allowNestedInputs: Boolean = {
meta.get("allowNestedInputs").flatMap {
case x: MetaValueElementBoolean => Option(x.value)
case _ => None
Copy link
Contributor

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

   meta {allowNestedInputs: "I like turtles"}

would silently set allowNestedInputs to false? Should there be a warning or error if the wrong type (something other than MetaValueElementBoolean) was specified?

Copy link
Collaborator Author

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 set allowNestedInputs 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 or false. 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 😉).

@aednichols
Copy link
Collaborator

@rhpvorderman this is good to merge, you can do it yourself or we will do it for you if we don't hear back by, say, Thursday evening

@rhpvorderman
Copy link
Collaborator Author

Thanks all for the reviews!

@rhpvorderman rhpvorderman merged commit c885fb5 into develop Jul 9, 2020
@aednichols aednichols deleted the inputstuff branch August 4, 2020 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution A pull request from the Cromwell open-source community Comply with language spec WDL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants