Skip to content

feat(termination-watcher): support additional GitHub Apps - #5467

Open
guicaulada wants to merge 1 commit into
mainfrom
gc/feat/janitor-multi-app
Open

guicaulada wants to merge 1 commit into
mainfrom
gc/feat/janitor-multi-app

Conversation

@guicaulada

@guicaulada guicaulada commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Termination-watcher deregistration currently uses only the first GitHub App credential, and its Terraform wiring omits the additional-App manifest. Configured additional Apps therefore cannot contribute quota to termination cleanup or its SQS retry path.

Load all credentials through the existing manifest-backed store. Select an App using observed installation quota, skip Apps in a one-minute throttling cooldown when another is available, and use a random initial offset for unknown quotas. Keep App JWT and installation-token authentication paired, resolve installation access for the requested owner, and try another configured App if authentication fails. Each termination or retry operation selects an App; authenticated-operation failures retain existing error handling. Single-App configurations remain supported.

Pass the optional manifest reference and credential parameter ARNs through termination-watcher Terraform, including automatic forwarding from multi-runner. Grant scoped GetParameter access for the manifest and GetParameters access for batched credential reads. Omit the optional environment key when no manifest is configured. Deregistration retries retain the configured GHES endpoint.

Validation: 52 termination-watcher package tests and three mocked Terraform tests pass. Coverage includes additional-App deregistration, paired credentials, quota exhaustion, secondary-limit cooldown, authentication fallback, manifest/IAM wiring, disabled deregistration, and single-App defaults. Runtime TypeScript, ESLint, Prettier, Terraform formatting, generated documentation, Lambda bundle build, and diff checks pass. No live GitHub/AWS changes were performed. TFLint is unavailable locally; existing package-wide coverage thresholds remain unchanged.

This PR targets main and changes only termination-watcher authentication, configuration, permissions, and retries.

@guicaulada
guicaulada force-pushed the gc/feat/janitor-multi-app branch from 89ee01e to bfe90f4 Compare September 23, 2026 14:36
@guicaulada guicaulada changed the title feat: use additional GitHub Apps for runner deregistration and reconciliation feat(termination-watcher): support additional GitHub Apps Sep 23, 2026
@guicaulada
guicaulada changed the base branch from gc/feat/registration-janitor to main September 23, 2026 14:36
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@guicaulada
guicaulada marked this pull request as ready for review September 23, 2026 14:44
@guicaulada
guicaulada requested review from a team as code owners September 23, 2026 14:44

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant