Repository navigation
Conversation
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
August 18, 2026 07:32
887c73e to
012b576
Compare
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
August 27, 2026 03:43
012b576 to
0193ccc
Compare
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
2 times, most recently
from
September 8, 2026 21:37
3641b57 to
6a86205
Compare
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Sep 9, 2026
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Sep 9, 2026
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
September 9, 2026 23:33
6a86205 to
1879875
Compare
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Sep 11, 2026
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Sep 11, 2026
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
September 11, 2026 18:45
1879875 to
254968a
Compare
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Nov 2, 2026
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Nov 4, 2026
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
November 4, 2026 01:21
254968a to
b0eca90
Compare
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Nov 9, 2026
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Nov 15, 2026
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
November 15, 2026 06:52
b0eca90 to
414127c
Compare
rm-you
added a commit
to rm-you/garm
that referenced
this pull request
Nov 15, 2026
The scale set worker decides how many runners to create or remove from its in-memory runner list, which it keeps current from database events. That list can go stale. Start() reads the scale set's instances before it subscribes to instance events, with calls to GitHub in between, so a change in that window is never seen. A runner that finishes deleting then keeps its old entry, holds a max_runners slot until GARM restarts, and its deleted row is never cleaned up. Before each autoscaling tick, reload the scale set's instances from the database and run the existing cleanup on that list. If the reload fails, skip the tick instead of scaling from a stale list. This costs one query per scale set every 5 seconds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A scale set is stored as pending_create, and nothing moves it to created, so it reports pending_create forever, even after its worker has made sure it exists in GitHub and is running. Mark it created once Start() has done that. The state is informational, so a failed update is logged and does not stop the worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rm-you
force-pushed
the
fix/scaleset-delete-reconciliation
branch
from
November 15, 2026 13:03
414127c to
2944f2d
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.
Two scale set worker fixes that #951 doesn't cover.
The runner list can go stale. The worker scales from its in-memory runner list, which it keeps current from database events.
Start()reads the scale set's instances before it subscribes to instance events, with calls to GitHub in between, so a change in that window is never seen. A runner that finishes deleting then keeps its old entry, holds amax_runnersslot until GARM restarts, and its deleted row is never cleaned up. Before each autoscaling tick, the worker now reloads the scale set's instances from the database and runs the existing cleanup on that list. If the reload fails, it skips the tick instead of scaling from a stale list. That's one query per scale set every 5 seconds.Scale sets stay in pending_create. A scale set is stored as
pending_createand nothing moves it tocreated.Start()now marks it created once it has made sure the scale set exists in GitHub. The state is informational, so a failed update is logged and doesn't stop the worker.Earlier versions of this PR also changed how runners being deleted count toward the scaling target. #951 fixes that better, so that part is gone, and the two PRs no longer conflict.
Tests cover the reload replacing a stale entry, cleanup errors not stopping it, a stale runner being replaced exactly once, a failed reload skipping the tick for both scale-up and scale-down, and the state change.
🤖 Generated with Claude Code