Closed mahesh-panchal closed 2 years ago
This is the point where task.xxx
variables get ignored
This has been implemented as an experimental feature 62ded3421.
The cache is invalidated when any task directive variable is modified by setting a new value via the nextflow config.
This feature is considered experimental and needs to be enabled by setting the following variable
export NXF_ENABLE_CACHE_INVALIDATION_ON_TASK_DIRECTIVE_CHANGE=true
Is this in a new snapshot or how can I test this?
Yes, run first this command to refresh your snapshot copy
NXF_VER=21.10.0-SNAPSHOT CAPSULE_RESET=true nextflow info
then
NXF_VER=21.10.0-SNAPSHOT nextflow run .. etc
This works for me using the script above.
$ NXF_VER=21.10.0-SNAPSHOT CAPSULE_RESET=true nextflow info
CAPSULE: Downloading dependency io.nextflow:nf-httpfs:jar:21.10.0-20211101.112009-4
CAPSULE: Downloading dependency io.nextflow:nextflow:jar:21.10.0-20211101.112009-4
CAPSULE: Downloading dependency io.nextflow:nf-commons:jar:21.10.0-20211101.112009-4
Version: 21.10.0-SNAPSHOT build 5639
Created: 01-11-2021 11:20 UTC (12:20 CEST)
System: Mac OS X 10.16
Runtime: Groovy 3.0.9 on OpenJDK 64-Bit Server VM 11.0.9.1+1-LTS
Encoding: UTF-8 (UTF-8)
$ NXF_VER=21.10.0-SNAPSHOT nextflow run main.nf -resume
N E X T F L O W ~ version 21.10.0-SNAPSHOT
Launching `main.nf` [sleepy_williams] - revision: 9021b457ad
[b6/62c24b] process > FOO [100%] 1 of 1, cached: 1 ✔
$ export NXF_ENABLE_CACHE_INVALIDATION_ON_TASK_DIRECTIVE_CHANGE=true
$ NXF_VER=21.10.0-SNAPSHOT nextflow run main.nf -resume
N E X T F L O W ~ version 21.10.0-SNAPSHOT
Launching `main.nf` [dreamy_sax] - revision: 9021b457ad
executor > local (1)
[fa/6bb5ed] process > FOO [100%] 1 of 1 ✔
Thank you.
Changed this to default behaviour in the upcoming 21.12.0-edge. Therefore the change of any directive invalidates the tasks cache on resume by default. see 967c1adff.
The NXF_ENABLE_CACHE_INVALIDATION_ON_TASK_DIRECTIVE_CHANGE can still be used to turn this behaviour off.
Bug report
Expected behavior and actual behavior
When providing configuration settings via
process.ext.<something>
, updating the config and using-resume
continues to use the cached version instead of the updatedext.<something>
value. The expected behaviour is that when the config changes, the appropriate process is rerun.Steps to reproduce the problem
main.nf
:nextflow.config:
Steps to reproduce:
nextflow run main.nf
nextflow.config
to useprocess.ext.prefix = hola
nextflow run main.nf -resume
Program output
(edit
nextflow.config
) then:Environment
Additional context
The aim was to try and use
process.ext.args
in nf-core workflows to provide tool-specific parameters. See https://github.com/nf-core/rnaseq/pull/701 for more info.