Fix ephemeral runner label collisions#36
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates ephemeral GitHub runner name/label generation to avoid collisions observed in timestamped dogfood tasks, ensuring each task dispatch targets the correct ephemeral runner.
Changes:
- Reworked
shortEphemeralIDto produce GitHub-safe alphanumeric tokens with a deterministic SHA-256-derived suffix for longer IDs. - Updated deterministic-name tests and added a regression covering the two STG dogfood task IDs that previously collided.
- Updated
github-actions-runner-jobcommand/test expectations to match the new runner name/label shape.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/ephemeral_runner_job.go | Changes the ID-shortening algorithm used to build ephemeral runner names/labels to reduce collisions. |
| internal/ephemeral_runner_job_test.go | Updates expected runner names/labels and adds a regression test for previously colliding task IDs. |
| cmd/github-actions-runner-job/main_test.go | Updates CLI/dispatch expectations for the new runner name/label format. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Fixes ephemeral GitHub runner name/label generation so timestamped workflow-compute dogfood tasks do not collapse to the same runner label.
The STG dogfood runs showed different task IDs reusing
wfc-stg-ghp-linux-runner-l-provider, which let a stale/previous ephemeral runner consume a target workflow while the current provider-side runner waited indefinitely. This keeps the fix inworkflow-plugin-github, where provider-owned runner lifecycle belongs.Changes
Verification
go test ./internal -run 'TestT594EphemeralRunnerJob|TestT594RunnerProviderInvokesEphemeralRunnerJobSpec' -count=1go test ./cmd/github-actions-runner-job -count=1go test ./... -count=1git diff --checkSelf-review
Adversarial self-review checked scope ownership, collision behavior, label charset/length, deterministic tests, boundary placement, and secret/artifact impact. The only issue found was that the initial regression only asserted inequality; it now asserts the exact non-colliding labels for the two observed STG dogfood task IDs.