Skip to content

ADR: Process error: section#7233

Open
bentsherman wants to merge 1 commit into
masterfrom
process-error-section
Open

ADR: Process error: section#7233
bentsherman wants to merge 1 commit into
masterfrom
process-error-section

Conversation

@bentsherman

Copy link
Copy Markdown
Member

This PR adds an ADR for the proposed process error: section, which provides a way to capture and emit domain errors, allowing users to handle them with workflow logic rather than the error strategy.

Signed-off-by: Ben Sherman <bentshermann@gmail.com>
@netlify

netlify Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 1445e6c
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6a303ad76ec8390008fbbd76

Comment on lines +45 to +47
## Solution

Introduce an **`error:` section** for typed processes, with the same syntax as the `output:` section. A domain error is detected structurally -- **a task that succeeds (exit 0) but does not fulfill its declared `output:`** -- and is emitted as an error value instead of triggering the error strategy.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this is sufficient for separating the domain vs infrastructure errors.

See https://nfcore.slack.com/archives/C043FMKUNLB/p1782301366504629 for a relevant discussion.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Left some comments there. That discussion seems to be more about distinguishing between different kinds of execution errors

Comment on lines +80 to +83
aligner ${reads} ${index} > aligned.bam 2> aligner.log || {
rm -f aligned.bam
exit 0
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TODO: wrap exit code wrangling in an error() Bash function for re-use

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.

2 participants