miniwdl
miniwdl copied to clipboard
[Question] Should string-to-file coerced files ensure files exist at coercion or at use/output
For string-to-file coercion, MiniWDL is content with a nonexistent file if the variable is never used. For example:
version 1.1
workflow wf {
input {
File f = "path/to/file"
}
output {
}
}
For Toil, we run a virtualization function for all file types, which ensures that all declared files exist. This means that the above workflow does not work for us.
MiniWDL only complains after this file variable is ever used. For example:
workflow wf {
input {
File f = "path/to/file"
}
output {
File out = f
}
}
or
workflow wf {
input {
File f = "path/to/file"
}
call t {input: f=f}
output {
File out = t.out
}
}
task t {
input {
File f
}
command <<<
ls ~{f}
>>>
output {
File out = stdout()
}
}
With MINIWDL__FILE_IO__ALLOW_ANY_INPUT=True
, both will fail with an error message similar to ...uses nonexistent file/directory: path/to/file...
.
As this behavior is ambiguous according to the spec, do you think this behavior should be allowed? Or should it be ambiguous to the runner, since MiniWDL currently permits this behavior?
This is related to https://github.com/openwdl/wdl/issues/667