Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix issue with workflow completion handler being called twice#7191

Merged
bentsherman merged 2 commits into
masterfrom
fix-shutdown-callback-gstring-interpolation
Jun 1, 2026
Merged

Fix issue with workflow completion handler being called twice#7191
bentsherman merged 2 commits into
masterfrom
fix-shutdown-callback-gstring-interpolation

Conversation

@bentsherman

Copy link
Copy Markdown
Member

This PR fixes an issue (reported internally) where the onComplete handler is called twice when trace logging is enabled

When a closure is rendered in a GString, it is actually invoked:

hook = { -> println 'hello!' }
println "$hook"
$ groovy test.groovy
hello!
null

As a result, we need to be careful about printing closures directly. This PR fixes the log messages in Session::shutdown0() and adds a test to confirm it

@bentsherman bentsherman requested a review from jorgee May 30, 2026 19:45
@netlify

netlify Bot commented May 30, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs-staging canceled.

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

@pditommaso

Copy link
Copy Markdown
Member

Groovy craziness !

Comment thread modules/nextflow/src/testFixtures/groovy/test/TestHelper.groovy Outdated
Signed-off-by: Ben Sherman <[email protected]>
@bentsherman bentsherman requested a review from jorgee June 1, 2026 08:53
@bentsherman bentsherman merged commit 93c2122 into master Jun 1, 2026
25 checks passed
@bentsherman bentsherman deleted the fix-shutdown-callback-gstring-interpolation branch June 1, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants