Hi,
I had problems when using the following task:
task Uniquify{
File file
Int disk_size
command <<<
out=$(python <(echo "print(str(uuid.uuid4()))").g.vcf.gz &&
cp ${file} $out
echo $out > "file_name.txt"
>>>
runtime {
docker: "python:2.7"
memory: "1 GB"
disks: "local-disk " + disk_size + " HDD"
}
output {
File output_gvcf = read_string("file_name.txt")
}
}
The problem is that while the task succeeds, but the output is the local name, and not the delocalized name. Now while this might work in local and SGE back-ends, it failes in GCS since the delocalization needs to know in advance what file will be delocalized.
I think that this should be invalid wdl, so that people who try out their wdl in local and sge backends will not have to debug this feature when moving to cloud. Basically, if the output is of type File, it needs to be known in advance, so if the expression throws an exception (as it must have here) before the task is run, the task cannot be run successfully and a helpful error message should be returned.