Repository navigation
Conversation
…inished Release queued capacity when GitHub assigns or finishes a job. Check that the job still needs a runner before provisioning one so a missed delivery cannot leave a stale request consuming a worker.
Code Review SummaryFlatRun now cancels pending runner requests when GitHub assigns or completes their workflow job, and checks that a job is still queued before creating its JIT configuration. This also catches missed or out-of-order webhook deliveries; failed status lookups fail the local run. Private repositories need Actions read permission for the check. 🚀 Key Improvements
📉 Regressions
💡 Minor Suggestions
|
| if prepare := queued.preparation.Apply; prepare != nil { | ||
| needed, err := prepare(ctx, queued.secrets) | ||
| m.mu.Lock() | ||
| queued.preparation.Key = "" |
There was a problem hiding this comment.
Clearing the key when JIT preparation returns makes this run invisible to cancellation while the worker is still setting up the runtime. If an in_progress or completed webhook arrives in that gap, the stale runner request can still start and consume a worker; keep it cancellable until startup or perform a final status check immediately before launch.
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.
FlatRun clears pending runner requests when GitHub assigns or finishes a job. Before starting a runner, it checks whether the job is still queued so a missed webhook cannot waste a worker. Private repositories need Actions read permission for that check.