Skip to content

Add option to disable printing workflow outputs#7018

Merged
bentsherman merged 1 commit intomasterfrom
improve-print-workflow-output
Apr 13, 2026
Merged

Add option to disable printing workflow outputs#7018
bentsherman merged 1 commit intomasterfrom
improve-print-workflow-output

Conversation

@bentsherman
Copy link
Copy Markdown
Member

This PR adds the ability to disable printing workflow outputs by specifying -output-format none

It also improves the workflow output printing logic by (1) using an onComplete handler instead of an igniter and (2) not printing in the event of a pipeline error

@bentsherman bentsherman requested a review from jorgee April 8, 2026 20:23
@bentsherman bentsherman requested a review from a team as a code owner April 8, 2026 20:23
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 4c3b338
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/69dcf8ee0fac4c00081e700e

@bentsherman bentsherman added this to the 26.04 milestone Apr 8, 2026
@rpetit3
Copy link
Copy Markdown

rpetit3 commented Apr 9, 2026

Playing around with the latest edge release, I wonder if an option to output to a json file might also be useful. (I may have also missed that!)

For a single sample, using -output-format json 2894 lines are the outputs in JSON format, and 113 lines are related to the the pipeline. text produces less, but I think users will still be confused (e.g. "was some debug text left in?).

I think my usage would be to default to none then when debugging switch to json or json file if available.

I do recognize this as super useful information to have on hand to review/testing/debugging.

@bentsherman
Copy link
Copy Markdown
Member Author

For that the idea is to use -q with -output-format json to suppress all other output and just print the JSON. Then you can redirect stdout to a file. This is similar to how nextflow inspect works, except nextflow inspect sets -q automatically

Copy link
Copy Markdown
Contributor

@jorgee jorgee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look fine to me. Just a minor comment, shouldn't be better to set default to none for the CmdRun case to work as in the previous version?

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@bentsherman bentsherman force-pushed the improve-print-workflow-output branch from 0e220f6 to 4c3b338 Compare April 13, 2026 14:08
@bentsherman
Copy link
Copy Markdown
Member Author

Thanks Jorge. Since workflow outputs are still new and we want to promote it, I think it's fine to have it enabled by default. Also for consistency with nextflow module run which prints the human-readble outputs by default.

@bentsherman bentsherman merged commit 791bb44 into master Apr 13, 2026
24 checks passed
@bentsherman bentsherman deleted the improve-print-workflow-output branch April 13, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants