nextflow-io / nextflow-io/nextflow
Workflow outputs don't work as expected with an early teturn
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 3.5k
- Forks
- 811
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 61
Description
Bug report
Workflow output + return don't interact as expected. Especially relevant with exit being deprecated.
Expected behavior and actual behavior
Expected: An entry workflow that declares an output block and returns early prints its message and exits cleanly, with the publish: section assigning the workflow's outputs.
Actual: The early return skips the publish: section entirely, so the outputs are never assigned, and the run fails with a misleading error.
Steps to reproduce the problem
(With pixi installed)
git clone https://github.com/fg-labs/nf-fgsv.git
cd nf-fgsv && git checkout 48cefbc
pixi run nextflow run main.nf --help
Program output
Nextflow 26.04.6 is available - Please consider updating your version to it
N E X T F L O W ~ version 26.04.2
Launching `main.nf` [drunk_shirley] revision: 343469ecb3
WARN: Static typing is a preview feature -- syntax and behavior may change in future releases
Typical pipeline command:
nextflow run nf-fgsv --input input_file.tsv
that parameter will be printed.
Main workflow parameters
--input [string] Path to a tab-separated values (TSV) sample sheet describing the samples to analyze. The file must have a header row
with the following required columns:
- `sample`: a unique sample identifier containing no whitespace; used as the
`meta.id` that names per-sample outputs.
- `bam`: path to an existing BAM file for the sample (must end in
`.bam`).
See `schemas/input_schema.json` for the full validation rules.
------------------------------------------------------
Workflow output 'sample_outputs' was declared in the output block but not assigned in the workflow
Environment
- Nextflow version: 26.04.6
- Java version: openjdk 17.0.18
- Operating system: macOS 26.5.1
- Bash version: GNU bash 5.2.37
Additional context
Working through manually managing help message with paramsHelp. Need to switch from exit (deprecated) to return.
Breaking change example here: https://github.com/fg-labs/nf-fgsv/commit/48cefbc3daadb8985e860f20639496fb9bdec7ba
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the pixi commands in the issue, using nf-fgsv commit 48cefbc and its main.nf entry point. Trace how an early return interacts with the workflow output and publish sections, then verify that the help message prints, execution exits cleanly, and sample_outputs is assigned rather than producing the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100