Observe ephemeral runner completion via GitHub API#41
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves the ephemeral runner provider’s completion detection by observing canonical GitHub Actions workflow/job state via the GitHub API (through the provider sidecar), rather than relying solely on the local runner process/stdout.
Changes:
- Add provider sidecar endpoints + client methods to list workflow runs and workflow run jobs for allowlisted repositories.
- Update
github-actions-runner-jobto poll GitHub for the job assigned to the generated runner name after dispatch, persisting workflow run/job IDs and failing closed on terminal GitHub job failures. - Add/adjust regression tests to cover API-observed completion and terminal failure precedence.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| internal/runner_provider_test.go | Adds coverage for listing workflow runs/jobs and extends the fake runner client for the new API surface. |
| internal/module_runner_provider.go | Extends GitHubRunnerClient, adds run/job types, implements GitHub list calls, and exposes new sidecar HTTP endpoints. |
| cmd/github-actions-runner-job/main.go | Introduces GitHub job polling logic and sidecar calls to observe workflow/job completion by runner name. |
| cmd/github-actions-runner-job/main_test.go | Adds regression tests for API-based completion and failure handling; updates existing tests to satisfy new polling behavior. |
💡 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
github-actions-runner-jobpoll for the GitHub job assigned to the generated runner name after dispatchSTG failure this fixes
GoCodeAlone/workflow-computerun28449575917wfc-stg-ghp-linux-260629fabb6f-1352329e8d5b: run2844965793428449885661showed taskgithub-provider-dogfood-linux-20260630135232stillleasedwithproofs: []Verification
GOWORK=off go test ./cmd/github-actions-runner-job ./internal -run 'EphemeralRunner|RunnerProvider|T915' -count=1GOWORK=off go test -race ./cmd/github-actions-runner-job -count=1GOWORK=off go test ./... -count=1GOWORK=off go build ./cmd/github-actions-runner-jobgit diff --checkSelf-review notes