Open stevekm opened 1 year ago
I think the plan is to make exec
code automatically resolve against the task directory so that you don't need to reference it at all. See #2628
yea I saw that one as well but did not see any references there or elsewhere to the breakage when using -resume
so was not clear what the intended plans for these functionalities were. Thanks
would be really great if some day exec
became on par with script
and then maybe we can reduce reliance on external custom scripts and instead get more done native with Groovy while still benefiting from the Nextflow process features.
looks like it also breaks when -work-dir
is an S3 bucket
@stevekm I think that was fixed in the latest edge release
@bentsherman based on the date of your comment, I am assuming you mean the Version 23.05.0-edge release. Following that, version 23.04.2 was released. I am fairly new to Nextflow so I am not sure if the updates in the edge released made into the official 23.04.2 release, but the issue persists in 23.04.2 (version I am currently using). I have not tried with the latest release yet, but when I use the -resume
flag, the task.workDir
variable is null
Sorry, I was only talking about the S3 work dir. The original issue about the work dir being null hasn't been fixed yet.
Bug report
Expected behavior and actual behavior
When using a Nextflow process with the
exec
scope, we are required to use thetask.workDir
object in order to write out files to the current work directory. (source)However, when
-resume
is used,task.workDir
becomesnull
and causes the pipeline to breakSteps to reproduce the problem
I have a demo workflow that uses
exec
to write a file here;https://github.com/stevekm/nextflow-demos/blob/master/metaMap-write-JSON/main.nf
The offending process looks like this;
Program output
It works fine without
-resume
;However, if
-resume
is used, it breaks;Environment
Additional context
related: https://github.com/nextflow-io/nextflow/issues/2059