Repository navigation
fix: honor boot grace before scale-down identity lookup - #5583
Merged
Merged
Conversation
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Brend-Smits
approved these changes
Nov 10, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified in the change to defer runner identity lookup during boot grace.
No open issues 🎉
What changed in this PR
This PR makes scale-down honor the compute provider’s boot grace before looking up runners without a valid GitHub runner ID, avoiding premature errors and unnecessary GitHub requests during registration.
Changes:
- Defer identity lookup during boot grace while preserving normal evaluation for runners with valid IDs.
- Add regression coverage for registration during grace and conservative retention after grace expires.
- Disable boot grace in MiniStack smoke tests to preserve immediate-cleanup assertions.
| File | Description |
|---|---|
tests/ministack/run-smoke.sh |
Sets boot grace to zero for immediate cleanup. |
tests/ministack/README.md |
Explains smoke-test timing settings and separate boot-grace coverage. |
lambdas/functions/control-plane/src/scale-runners/scale-down.ts |
Skips identity lookup for booting runners without valid GitHub IDs. |
lambdas/functions/control-plane/src/scale-runners/scale-down.test.ts |
Tests deferred lookup, subsequent registration, and retention after grace expiry. |
Review effort: Balanced
guicaulada
pushed a commit
that referenced
this pull request
Nov 12, 2026
🤖 I have created a release *beep* *boop* --- ## [8.1.1](v8.1.0...v8.1.1) (2026-11-12) ### Bug Fixes * honor boot grace before scale-down identity lookup ([#5583](#5583)) ([e7aa391](e7aa391)) * preserve sensitive bootstrap boundaries in v2 provider selection ([#5588](#5588)) ([1381802](1381802)) * **runners:** Skip runner file ownership change when user_name is unset ([#5574](#5574)) ([2cf37e5](2cf37e5)) * **termination-watcher:** look up the runner by exact name instead of paginating all runners ([#5573](#5573)) ([f6fc4e6](f6fc4e6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: runners-releaser[bot] <194412594+runners-releaser[bot]@users.noreply.github.com>
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.
Scale-down can emit
UNVERIFIABLE_RUNNERfor a healthy instance that is still registering. On v8.1.0 we observed an instance launch at 19:46:33 UTC, an exact-name lookup miss at 19:46:55, and successful JIT registration at 19:47:04. Identity verification currently runs before the boot-grace check, so an expected startup delay is logged as an error and consumes GitHub requests.Defer identity lookup for runners without a valid GitHub runner ID until the compute provider's boot grace expires. Runners with a valid ID continue through normal evaluation, and an exact-name miss after the grace period still retains the instance conservatively.
Regression coverage exercises registration arriving during the grace period and an unresolved identity after grace expiry, asserting that the early sweep makes no GitHub client/lookup calls and does not mark or terminate the instance.