Fix: handle empty publishedValues in PublishOp.onComplete for optional outputs#6979
Conversation
Signed-off-by: jorgee <jorge.ejarque@seqera.io>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
|
Current implementation is printing the optional outputs with |
Signed-off-by: Ben Sherman <bentshermann@gmail.com>
|
Thanks Jorge. This issue has actually been reported in other places as well. It comes from the fact that some operations can produce an empty dataflow value, which is invalid since a dataflow value should always contain a value (even if null). Most of these cases are addressed by typed processes and typed workflows, and could be avoided in legacy code using In this case, we could add a post-processing step to ProcessEntryHandler to impute empty dataflow values with Printing |
Summary
NoSuchElementException: Cannot access first() element from an empty ListinPublishOp.onCompletewhen a process has optional output channels that produce no files.first()call with an empty-list check, returningnullwhen no values were published on a value channelFixes #6978
Test plan
nextflow module runon a module with optional outputs that produce no files (e.g.nf-core/trimgalorewith parameters that skip optional outputs)🤖 Generated with Claude Code