Skip to content

v20260818-012344

Choose a tag to compare

@github-actions github-actions released this 18 Aug 01:25
· 10 commits to main since this release
3e85a5d
Skip offline pet runners during scale-down offline sweep (#8550)

**Impact:** self-hosted runner scale-down Lambda (pet/Mac instances)
**Risk:** low

## What
The scale-down offline sweep no longer deregisters GitHub runners whose
backing EC2 instance is a live "pet" instance. Pet instance IDs are
collected up front and excluded from the org/repo offline-runner
filters.

## Why
Pet instances (e.g. Mac runners) register with GitHub one-shot. When
such a runner briefly reports `offline` while its EC2 instance is still
alive, the offline sweep would deregister it — permanently orphaning the
instance since it never re-registers. Guarding the sweep against pets
still backed by a running instance prevents that.

# Notes
- Adds org and repo test cases asserting a live-but-offline pet is left
registered while regular offline runners are still cleaned up.
- `beforeEach` switched from `jest.clearAllMocks()` to
`jest.resetAllMocks()` so the per-test
`mockResolvedValueOnce`/`mockResolvedValue` setups don't leak between
the new and existing tests.

---------

Signed-off-by: Jean Schmidt <contato@jschmidt.me>