-
Notifications
You must be signed in to change notification settings - Fork 781
Enabling trace logging and -with-tower change config parsing behavior #7002
Copy link
Copy link
Open
Description
Bug report
When enabling -with-tower or NXF_TRACE=nextflow, the config parsing behavior changes with regards to parameter handling, causing the following error message:
ERROR ~ Unknown config attribute
Our suspicion is that the following switch enables the unexpected behavior:
nextflow/modules/nextflow/src/main/groovy/nextflow/cli/CmdRun.groovy
Lines 408 to 409 in 701c82c
| if( isTowerEnabled || isDataEnabled || log.isTraceEnabled() ) | |
| runner.session.resolvedConfig = ConfigBuilder.resolveConfig(scriptFile.parent, this) |
Expected behavior and actual behavior
Enabling trace logging should not alter Nextflow's behavior. Additionally, config parsing on Seqera platform should match local execution whenever possible in order to ensure reproducibility
Steps to reproduce the problem
tmpdir=$(mktemp -d "/tmp/XXXXXXXX")
cat << EOF > /$tmpdir/main.nf
workflow {
main:
input_ch = Channel.fromList(["a", "b", "c"])
output_ch = input_ch
}
EOF
cat << EOF > /$tmpdir/nextflow.config
trace {
enabled = true
overwrite = true
file = "\${params.publish_dir}/trace.txt"
}
EOF
pushd "$tmpdir" > /dev/null || exit 1
trap 'popd > /dev/null' EXIT
# 24.10.6 always works
## This works
NXF_VER=24.10.9 NXF_TRACE=nextflow nextflow run . --publish_dir foo
NXF_VER=24.10.9 nextflow run . --publish_dir foo
# On 25.10.4, v2 syntax parser works
NXF_SYNTAX_PARSER=v2 NXF_VER=25.10.4 nextflow run . --publish_dir foo
NXF_SYNTAX_PARSER=v2 NXF_VER=25.10.4 NXF_TRACE=nextflow nextflow run . --publish_dir foo
# 25.10.4 with the default parser fails when enabling trace logging _or_ using -with-tower
## This works
NXF_VER=25.10.4 nextflow run . --publish_dir foo
## This fails!
NXF_VER=25.10.4 NXF_TRACE=nextflow nextflow run . --publish_dir foo
## This also fails!
NXF_VER=25.10.4 NXF_TRACE=nextflow nextflow run . -with-tower --publish_dir fooProgram output
ERROR ~ Unknown config attribute `trace.params.publish_dir` -- check config file: /tmp/xPFI1fGC/nextflow.config
-- Check '.nextflow.log' file for details
Apr-03 08:14:12.904 [main] DEBUG nextflow.cli.Launcher - $> nextflow run . --publish_dir foo
Apr-03 08:14:12.998 [main] DEBUG nextflow.cli.CmdRun - N E X T F L O W ~ version 25.10.4
Apr-03 08:14:13.016 [main] TRACE nextflow.plugin.PluginsFacade - Detected NXF_HOME - Using plugins mode=prod
Apr-03 08:14:13.017 [main] TRACE nextflow.plugin.PluginsFacade - Detected NXF_HOME - Using .nextflow/plugins
Apr-03 08:14:13.017 [main] TRACE nextflow.plugin.PluginsFacade - Using default plugins url: https://registry.nextflow.io/api
Apr-03 08:14:13.020 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; embedded=false; plugins-dir=/home/di/.nextflow/plugins; core-plugins: nf-amazon@3.4.4,nf-azure@1.20.2,nf-cloudcache@0.5.0,nf-codecommit@0.5.0,nf-console@1.3.0,nf-google@1.23.5,nf-k8s@1.2.2,nf-tower@1.17.5,nf-wave@1.16.1
Apr-03 08:14:13.040 [main] INFO o.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Apr-03 08:14:13.041 [main] INFO o.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Apr-03 08:14:13.044 [main] INFO org.pf4j.DefaultPluginManager - PF4J version 3.12.0 in 'deployment' mode
Apr-03 08:14:13.058 [main] DEBUG nextflow.util.RetryConfig - Missing nextflow session - using default retry config
Apr-03 08:14:13.183 [main] INFO org.pf4j.AbstractPluginManager - No plugins
Apr-03 08:14:13.606 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /tmp/4wJkmHi2/nextflow.config
Apr-03 08:14:13.608 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /tmp/4wJkmHi2/nextflow.config
Apr-03 08:14:13.621 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Apr-03 08:14:13.674 [main] TRACE nextflow.plugin.PluginsFacade - Detected NXF_HOME - Using plugin defaults
Apr-03 08:14:13.675 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
Apr-03 08:14:13.675 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[]
Apr-03 08:14:13.689 [main] DEBUG n.secret.LocalSecretsProvider - Secrets store: .nextflow/secrets/store.json
Apr-03 08:14:13.691 [main] TRACE nextflow.plugin.PluginsFacade - Discovered extensions for type nextflow.secret.SecretsProvider: nextflow.secret.LocalSecretsProvider@56f730b2
Apr-03 08:14:13.692 [main] DEBUG nextflow.secret.SecretsLoader - Discovered secrets providers: [nextflow.secret.LocalSecretsProvider@56f730b2] - activable => nextflow.secret.LocalSecretsProvider@56f730b2
Apr-03 08:14:13.693 [main] DEBUG nextflow.cli.CmdRun - Applied DSL=2 by global default
Apr-03 08:14:13.706 [main] DEBUG nextflow.cli.CmdRun - Launching `./main.nf` [zen_kimura] DSL2 - revision: 9498f3524e
Apr-03 08:14:13.748 [main] TRACE n.p.e.PluginExtensionProvider - Dataflow default extension methods: branch,buffer,chain,collate,collect,collectFile,combine,concat,count,countFasta,countFastq,countJson,countLines,cross,distinct,filter,first,flatMap,flatten,groupTuple,ifEmpty,join,last,map,max,mean,merge,min,mix,multiMap,randomSample,reduce,set,splitCsv,splitFasta,splitFastq,splitJson,splitText,subscribe,sum,take,tap,toDouble,toFloat,toInteger,toList,toLong,toSortedList,transpose,unique,until,view
Apr-03 08:14:13.753 [main] DEBUG nextflow.Session - Session UUID: d57de08d-9604-47df-8c23-a822249a1306
Apr-03 08:14:13.753 [main] DEBUG nextflow.Session - Run name: zen_kimura
Apr-03 08:14:13.753 [main] DEBUG nextflow.Session - Executor pool size: 42
Apr-03 08:14:13.761 [main] DEBUG nextflow.file.FilePorter - File porter settings maxRetries=3; maxTransfers=50; pollTimeout=null
Apr-03 08:14:13.766 [main] DEBUG nextflow.util.ThreadPoolBuilder - Creating thread pool 'FileTransfer' minSize=10; maxSize=126; workQueue=LinkedBlockingQueue[-1]; allowCoreThreadTimeout=false
Apr-03 08:14:13.770 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /tmp/4wJkmHi2/nextflow.config
Apr-03 08:14:13.771 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /tmp/4wJkmHi2/nextflow.config
Apr-03 08:14:13.774 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `standard`
Apr-03 08:14:13.812 [main] DEBUG nextflow.config.ConfigBuilder - In the following config snippet the attribute `trace.params.publish_dir` is empty:
Apr-03 08:14:13.814 [main] ERROR nextflow.cli.Launcher - Unknown config attribute `trace.params.publish_dir` -- check config file: /tmp/4wJkmHi2/nextflow.config
nextflow.exception.ConfigParseException: Unknown config attribute `trace.params.publish_dir` -- check config file: /tmp/4wJkmHi2/nextflow.config
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.validate(ConfigBuilder.groovy:484)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.validate(ConfigBuilder.groovy:491)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.validate(ConfigBuilder.groovy:491)
at nextflow.config.ConfigBuilder.validate(ConfigBuilder.groovy:471)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.merge0(ConfigBuilder.groovy:440)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.buildConfig0(ConfigBuilder.groovy:395)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.buildGivenFiles(ConfigBuilder.groovy:336)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.selectMethod(IndyInterface.java:355)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.buildConfigObject(ConfigBuilder.groovy:833)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.config.ConfigBuilder.resolveConfig(ConfigBuilder.groovy:924)
at nextflow.cli.CmdRun.run(CmdRun.groovy:409)
at nextflow.cli.Launcher.run(Launcher.groovy:515)
at nextflow.cli.Launcher.main(Launcher.groovy:675)
Environment
- Nextflow version: 25.10.4
- Java version: openjdk 21.0.10 2026-01-20
- Operating system: Linux di-server 6.17.13-1#1 SMP PREEMPT_DYNAMIC PMX 6.17.13-1 x86_64 GNU/Linux
- Bash version: GNU bash, version 5.2.37(1)-release (x86_64-pc-linux-gnu)
Additional context
(Add any other context about the problem here)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels