Repository navigation
fix(scale-down): scope cached clients by selected GitHub App - #5466
Merged
Merged
Conversation
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
from
September 23, 2026 14:36
c404f77 to
576ac85
Compare
Contributor
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Quota attribution is missing for pre-installation lookups and failed GitHub requests.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Updates scale-down GitHub App selection, client caching, and quota attribution for multi-App cleanup workflows.
Changes:
- Re-selects Apps before cache lookup and scopes clients by App, runner type, and owner.
- Adds App-specific quota instrumentation.
- Adds tests for App reselection, client reuse, and attribution.
| File | Summary |
|---|---|
lambdas/functions/control-plane/src/scale-runners/scale-down.ts |
Updates client selection, caching, and quota hooks. |
lambdas/functions/control-plane/src/scale-runners/scale-down.test.ts |
Tests multi-App selection and quota attribution. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
2 times, most recently
from
September 24, 2026 13:54
35ea122 to
8c1013a
Compare
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
from
October 5, 2026 14:03
8c1013a to
e1847ee
Compare
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
from
October 14, 2026 12:35
e1847ee to
1f965ab
Compare
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
2 times, most recently
from
October 19, 2026 14:27
4be2486 to
0922d62
Compare
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
from
October 26, 2026 12:46
0922d62 to
17944d3
Compare
guicaulada
force-pushed
the
gc/fix/scale-down-multi-app-cleanup
branch
from
October 27, 2026 15:20
17944d3 to
facd803
Compare
Brend-Smits
approved these changes
Oct 27, 2026
guicaulada
pushed a commit
that referenced
this pull request
Nov 3, 2026
🤖 I have created a release *beep* *boop* --- ## [8.1.0](v8.0.0...v8.1.0) (2026-10-29) ### Features * add stateless registration cleanup with multi-App support ([#5465](#5465)) ([5959d43](5959d43)) * **termination-watcher:** support additional GitHub Apps ([#5467](#5467)) ([eefcb1e](eefcb1e)) ### Bug Fixes * **lambda:** bump undici from 6.29.0 to 6.29.1 in /lambdas ([#5554](#5554)) ([94f46c7](94f46c7)) * **scale-down:** clean EC2 runners incrementally and isolate failures ([#5463](#5463)) ([60a4c66](60a4c66)) * **scale-down:** scope cached clients by selected GitHub App ([#5466](#5466)) ([bbd92fe](bbd92fe)) * **termination-watcher:** grant kms:Decrypt for GitHub App parameters ([#5562](#5562)) ([7b54664](7b54664)) --- 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 caches installation clients by owner. Scope that cache by selected GitHub App, runner type, and owner, and select the App before checking the cache so a changed selection uses the corresponding client.
Preserve the shared request-level failover added in #5523. Installation lookup and token creation stay inside its client factory; the shared failover layer handles quota observation and metrics, avoiding duplicate response hooks in scale-down.
Validation: all 403 control-plane tests, runtime TypeScript, ESLint, and diff checks pass. The regression verifies selection changes for the same owner and client reuse within each App. No AWS deployment or live runner cleanup was performed.