Repository navigation
fix(engine): replace outdated agents one at a time (RIG-10331) - #25
Merged
rigel-nemo[bot] merged 10 commits intoNov 16, 2026
Conversation
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Co-authored-by: Matt Wilkinson <matt@rigel.build>
Author
Review all-clear:
|
| Round | Head | High | Medium | Low |
|---|---|---|---|---|
| 1 | 7ac6d973 |
2 | 3 | 4 |
| 2 | dd5d5ed5 |
1 | 1 | 5 |
| 3 | 81b51ff8 |
1 | 0 | 4 |
| 4 | 40e5bb0c |
0 | 1 | 2 |
| 5 | 505ac0c6 |
0 | 0 | 1 |
- Round 1: a timed-out replacement released the gate and cascaded through the pool; a long busy drain reaped fresh boots. Fixed by re-arming the gate and reaping each agent by its own age.
- Round 2: a quiet pool stalled the rollout; the zero-timeout semantics had drifted. Fixed: a quiet pool advances, and main's cleanup behaviour is restored.
- Round 3: a deploy error released the gate while work was pending. Fixed: the gate releases with no replacement attempt only when the pool is quiet (no routed pending work, at least
MinAgents). - Round 4: the deploy-failure test only covered
MinAgents. Fixed withMinAgents=1; the test fails when the pending check is inverted. - Accepted lows: the wait on a busy drained agent only warns and has no time limit; the rollout pauses while work routes to the pool.
Verification at 505ac0c6 on macpro2013: gofmt -l . reports nothing, go vet ./... passes, and go test -count=1 ./... passes. rjc rebased it to dba58093; the interdiff is empty.
|
Checks read:
|
rigel-nemo Bot
pushed a commit
that referenced
this pull request
Nov 16, 2026
chore(release): 1.5.0-rigel.5 (RIG-10331) Ships same-cycle outdated-agent replacement (#25). Refs RIG-10331 Co-authored-by: Matt Wilkinson <matt@rigel.build>
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.
What does this do
The autoscaler now replaces outdated agents one at a time and keeps the pool's capacity. A pool with
MaxAgents=1gets its replacement in the same reconcile cycle. The next outdated agent drains only after a replacement connects.Why do we need it
With
MaxAgents=1, the rollout drained the only agent and created its replacement a cycle later, so image builds hitpending-unmatched-timeout(main run #28568).Summary
MaxAgents. A replacement is identified by agent ID, so a reused name does not count as new.AgentCreationTimeout(falling back toAgentInactivityTimeout) is reaped and retried. The gate stays closed and each failure logs a warning with a counter. When both timeouts are zero, the gate has no bound and logs one warning.MinAgents. A deploy error therefore cannot retire the pool one agent per cycle. Busy-pool surge or deferral is not changed here; it waits on RIG-10357.Verification
This repo has no devenv, so rbuild cannot gate it. On macpro2013 at
505ac0c6, withCGO_ENABLED=0and Go 1.27.3:gofmt -l .reports no files.go vet ./...passes.go test -count=1 ./...passes in every package, including the eight new rollout tests.Test_reconcile_deployFailureKeepsDrainGatefails.505ac0c6, found 0 high, 0 medium, 1 low.Risks
Accepted: waiting on a busy drained agent has no time limit and only warns. The rollout also pauses while other pools take this pool's pending work; that fails safe. Rollback: revert this PR and keep the
1.5.0-rigel.4image.Spec impact
Spec-impact: none — fork engine behaviour; Orion's topology spec does not describe rollout internals
Refs RIG-10331
Co-authored-by: Matt Wilkinson matt@rigel.build