enhance WorkflowRuntime and WorkflowRuntimeBuilder with close handlig and lifecycle management - #1816
Merged
Merged
Conversation
matheusandre1
force-pushed
the
issue1734
branch
2 times, most recently
from
September 30, 2026 17:51
854479c to
11f538b
Compare
…g and lifecycle management Signed-off-by: Matheus André <matheusandr2@gmail.com>
matheusandre1
force-pushed
the
issue1734
branch
from
September 30, 2026 17:57
11f538b to
447544c
Compare
matheusandre1
marked this pull request as ready for review
September 30, 2026 19:02
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1816 +/- ##
============================================
+ Coverage 78.99% 79.09% +0.09%
- Complexity 2591 2600 +9
============================================
Files 264 264
Lines 7770 7778 +8
Branches 815 818 +3
============================================
+ Hits 6138 6152 +14
+ Misses 1269 1266 -3
+ Partials 363 360 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
javier-aliaga
approved these changes
Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
two problems that prevented a clean full restart of
WorkflowRuntime(for example on a Quarkus dev-mode live reload or between tests)WorkflowRuntime.close()blocked for the full 60 second channel timeout. The channel was shut down gracefully while the worker thread still held thegetWorkItemsstream open, soawaitTerminationnever returned early.WorkflowRuntimeBuilder.build()kept returning the closed runtime. The static singleton was never released, so a new builder got back the old instance whose channel was already shut down.Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Closes: #1734
Related: #1631 (
closeNow()proposal, PR #1632) and PR #1727, which fixed the worker loop exit but not this blocking.RELEASE NOTE: FIX
WorkflowRuntime.close()no longer blocks on the open work-item stream, andWorkflowRuntimeBuilder.build()returns a new runtime after the previous one was closed.Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: