Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove toList() channel operation from inside onComplete block #3304

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

robsyme
Copy link
Contributor

@robsyme robsyme commented Nov 29, 2024

This PR resolves an important bug in the nf-core template, whereby all workflows will hang if the --email parameter is supplied.

The onComplete block will hang if there are any (queue) channel operations inside the block. All values in the onComplete block must be resolved to single values or value channels before the onComplete block starts.

The async channels are not available inside onComplete, so calling the toList() operation will hang forever as the async queue channel will never be completed.

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.91%. Comparing base (eed0598) to head (2475ad1).
Report is 27 commits behind head on dev.

Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

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

Thanks for this fix 🙂 The nf-core subworkflow should be fixed in the modules repo and then updated here, otherwise the changes look good

@robsyme robsyme force-pushed the remove-channel-operations-from-oncomplete branch 3 times, most recently from 9f74724 to e1f07d5 Compare December 2, 2024 21:18
This PR resolves an important bug in the nf-core template, whereby all workflows will hang if the --email parameter is supplied.

The onComplete block will hang if there are any (queue) channel operations inside the block. All values in the onComplete block must be resolved to single values or value channels _before_ the onComplete block starts.

The async channels are not available inside onComplete, so calling the toList() operation will hang forever as the async queue channel will never be completed.
@robsyme robsyme force-pushed the remove-channel-operations-from-oncomplete branch from e1f07d5 to abb0fa2 Compare December 2, 2024 21:21
@mirpedrol
Copy link
Member

Needs nf-core/modules#7129

@mirpedrol mirpedrol added this to the 3.1 milestone Dec 4, 2024
@robsyme
Copy link
Contributor Author

robsyme commented Dec 4, 2024

Maybe we can drop the changes to nf_core/pipeline-template/subworkflows/nf-core/utils_nfcore_pipeline/main.nf to keep this PR focused.

@mirpedrol
Copy link
Member

Maybe we can drop the changes to nf_core/pipeline-template/subworkflows/nf-core/utils_nfcore_pipeline/main.nf to keep this PR focused.

I thought both changes were tied together. But we can also update the subworkflow on a different PR 👍

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