Bug report
Expected behavior and actual behavior
TowerJsonGenerator should always produce valid JSON. When a value fails to serialize, it logs a warning and writes the field name but no value, so the request body is invalid and the next field follows directly: "params":{"x":},"id":....
This is separate from #7758/#7759, which fixed typed Channel/Value params through ParamsMap.toPlainMap(). A legacy script that assigns a dataflow value to a param still hits it.
Steps to reproduce the problem
params.x = channel.value(1)
workflow { println 'done' }
nextflow run main.nf -with-tower <endpoint>
channel.of(1).collect() and channel.of(1).toList() behave the same. channel.of(1) and channel.fromPath(..) are not affected.
Program output
WARN: Unable to serialize key=workflow.params.x; value=DataflowVariable(value=null); type=groovyx.gpars.dataflow.DataflowVariable -- Cause: Cannot invoke "groovyx.gpars.serial.SerialContext.add(groovyx.gpars.serial.SerialHandle)" because "this.context" is null
Captured begin payload (invalid JSON):
"params":{"x":},"id":"abc123",...
Environment
- Nextflow version: 26.09.2-edge (master 9563c73)
- Java version: 21.0.10
- Operating system: macOS (aarch64)
- Bash version: zsh 5.9
Additional context
The cause is the catch block in TowerJsonGenerator.writeObject (plugins/nf-tower/src/main/io/seqera/tower/plugin/TowerJsonGenerator.groovy), which writes no value after the key has been emitted.
Separately, params.x = channel.empty() blocks the main thread in DataflowQueue.getVal while the generator reads the channel's properties. That is a different failure and is not covered here.
Bug report
Expected behavior and actual behavior
TowerJsonGeneratorshould always produce valid JSON. When a value fails to serialize, it logs a warning and writes the field name but no value, so the request body is invalid and the next field follows directly:"params":{"x":},"id":....This is separate from #7758/#7759, which fixed typed
Channel/Valueparams throughParamsMap.toPlainMap(). A legacy script that assigns a dataflow value to a param still hits it.Steps to reproduce the problem
channel.of(1).collect()andchannel.of(1).toList()behave the same.channel.of(1)andchannel.fromPath(..)are not affected.Program output
Captured begin payload (invalid JSON):
Environment
Additional context
The cause is the catch block in
TowerJsonGenerator.writeObject(plugins/nf-tower/src/main/io/seqera/tower/plugin/TowerJsonGenerator.groovy), which writes no value after the key has been emitted.Separately,
params.x = channel.empty()blocks the main thread inDataflowQueue.getValwhile the generator reads the channel's properties. That is a different failure and is not covered here.