You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runner pool – captures the error-tracker workflow ID and sends it a Shutdown signal when the runner pool workflow exits
Change-by-change notes
engine/packages/gasoline/src/db/kv/mod.rs
Good fix. The lease-expiry path at line 568 already skips silenced workflows; this change brings the main workflow-fetch path into parity. The implementation is correct:
SilenceTsKey is read in the existing parallel tokio::try_join!, so no extra serial roundtrip is added.
The destructuring position aligns with the new future.
Log message uses tracing::warn! consistent with the adjacent has_output warning.
The combined if has_output || is_silenced lease-clear block avoids duplicating the cleanup.
One minor note: silence_ts_entry is fetched on every poll iteration even for non-silenced workflows. This is fine since it is parallel with the other reads, but worth keeping in mind if silenced-workflow volume ever grows high.
engine/packages/guard/src/lib.rs
Clean removal.rivet_pools::Pools::new already calls install_rustls_provider() (pools.rs:106–108), so the call in guard::start was redundant. This is safe to drop — pools are constructed before start is entered.
Correct. When allocate finds a slot, both sleep_ts and reschedule_ts should be cleared so stale retry timers don't fire after a successful allocation. Previously only sleep_ts was reset, leaving reschedule_ts pointing at an obsolete backoff timestamp.
The error tracker runs in a lupe loop that exits only on a Shutdown signal. Before this PR, the runner pool dispatched the tracker but never sent Shutdown when it exited, leaving the tracker running indefinitely. Capturing error_tracker_wf_id and sending Shutdown at the end of the workflow is the right fix.
Migration caveat: runner pool workflows that were dispatched and completed before this code is deployed will have orphaned error-tracker workflows stuck waiting for a signal that will never arrive. These will need to be cleaned up via the silence mechanism or manual intervention. This is a timing limitation, not a flaw in the fix itself.
The ctx.v(2) version marker on the new signal send is safe. Gasoline tracks each op by its cursor position in history, so reusing version 2 for the new terminal op does not conflict with the earlier ctx.v(2).workflow(error_tracker).dispatch() call.
Summary
All four changes are correct and consistent with surrounding patterns. No blocking concerns. The orphaned-tracker migration side effect is the only non-obvious consequence, and it is limited in scope.
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
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
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: