You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All of len_in_body_out, len_in_input_out, and len_in_output should be 0, but when processed inside the task body/input, select_all runs on the string representation instead of the file representation; only processing it in the output does it check that those file paths exist.
String to file coercion also behaves differently depending if it is within a task or a workflow; the above WDL is mostly in a task, as the same code does not work in a workflow:
@stxue1 Thanks, I think there are two slightly separate topics here:
The language in the spec about a File? with a nonexistent path successfully evaluating to None/null is scoped to the task output section and (IMO) not applicable outside that context. It's a convenience so that we don't have to write an explicit if/then/else statement in the task output declaration. I don't think it's a good idea to apply elsewhere.
Taking a look at the SPEC again, it does look like coercion to None for nonexistent optional files is scoped to task outputs. So my previous first complaint isn't really an issue. However, would it be a good idea to apply this behavior for workflow outputs as well?
If converting File? types to None happens at output, then running select_all on an array with nonexistent coerced files will always return something different if not ran at the output step. For now, this behavior seems to be what the spec wants, but sounds incorrect as those File? types should be None regardless. I'll probably open an issue on openwdl for this.
When a file is declared as optional, the value should be null if the file does not exist. In an array of optional files, this should mean those nonexistent file entries should become null.
When coercing from string to file, this check for file existence seems to be inconsistent depending on how the WDL is written:
With
MINIWDL__FILE_IO__ALLOW_ANY_INPUT=True miniwdl run test.wdl
, this returns:All of
len_in_body_out
,len_in_input_out
, andlen_in_output
should be 0, but when processed inside the task body/input, select_all runs on the string representation instead of the file representation; only processing it in the output does it check that those file paths exist.String to file coercion also behaves differently depending if it is within a task or a workflow; the above WDL is mostly in a task, as the same code does not work in a workflow:
The text was updated successfully, but these errors were encountered: