-
Notifications
You must be signed in to change notification settings - Fork 361
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
Optional value was not set and no 'default' attribute was provided #3927
Comments
@DavyCats thank you for the report. Would you mind posting the WDL that you're using to induce the error? (Or if it contains sensitive information, a minimal repro case.) |
@aednichols It happens in two workflows that I have tried, both can be found here: https://github.com/biowdl/aligning/tree/BIOWDL-61 (align-bwamem.wdl and align-star.wdl). |
Thanks @DavyCats I think that this is really two issues in one:
|
@cjllanwarne I cannot find an explicit statement regarding this in the SPECs either, but there are some sections which suggest that no default is required for optional values. Most importantly, here the statement is made that a placeholder for an optional input can be instantiated in two ways: as a value, or nothing (no defaults are defined in the example). For draft-2 workflows this was handled as such, if an optional input was not assigned a value, its placeholder was (effectively) replaced by an empty string. |
@DavyCats thanks for checking that - I think you're right, and we should definitely fix this in our 1.0 support. Thanks! |
It looks like cromwell doesn't properly handle optional variables in tasks. If they are undefined this error occurs: "Optional value was not set and no 'default' attribute was provided". Setting a default (either in the input block or like so:
~{default="" optionalValue}
) will cause the workflow to run, but this seems to me to go entirely against the reason for having an optional datatype to begin with.It also looks like setting an optional with default to
null
in the input JSON is ignored, which is in conflict with the SPECs here.I'm getting this error when using WDL version 1.0 (draft-3). The error occurs in both cromwell version 33 and 34.
Full stacktrace:
The text was updated successfully, but these errors were encountered: