Gracefully fail claimed executions even if the supervisor process was pruned#559
Merged
rosa merged 1 commit intorails:mainfrom Jun 13, 2025
Merged
Conversation
jeremy
commented
May 7, 2025
Member
Author
jeremy
left a comment
There was a problem hiding this comment.
Not happy with this fix since 1. it may be a work-around masking that supervisor process pruning should be resilient to sleep/resume interference and 2. the test case is synthetic at best, but perhaps it's a useful starting point.
| def wait_for_failed_executions(count, timeout: 1.second) | ||
| wait_for(timeout: timeout) { SolidQueue::FailedExecution.count == count } | ||
| end | ||
| end |
Member
Author
There was a problem hiding this comment.
This test isn't strictly necessary. I was using it to guide debugging and understanding.
|
|
||
| supervisor = SolidQueue::Supervisor.allocate | ||
|
|
||
| supervisor.send(:handle_claimed_jobs_by, terminated_fork, status) |
Member
Author
There was a problem hiding this comment.
This test is terribly synthetic, I'm afraid. Just explicitly constructs the situation that's encountered in the wild (nil Supervisor#process) rather than realistically (actually pruning the process).
055cb3a to
849dcfd
Compare
… pruned e.g. due to sleep/wake in a dev app
849dcfd to
e74e695
Compare
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.
e.g. due to sleep/wake in a dev app
Fixes #430