feat(buildrunner): add GitHub Actions backend#208
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new githubactions BuildRunner backend that triggers and manages speculative builds via GitHub Actions workflow_dispatch, and wires the example orchestrator to select this backend via environment configuration.
Changes:
- Added a GitHub Actions–backed
buildrunner.BuildRunnerimplementation that dispatches a workflow and uses the workflow run ID for Status/Cancel. - Added Bazel targets and unit tests for the new backend.
- Updated documentation and the example orchestrator to support
BUILD_RUNNER=githubactionswith env-based configuration.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| submitqueue/extension/buildrunner/README.md | Documents available BuildRunner backends, including the new githubactions option. |
| submitqueue/extension/buildrunner/githubactions/README.md | Adds setup docs, required workflow inputs, and example orchestrator env configuration. |
| submitqueue/extension/buildrunner/githubactions/githubactions.go | Implements the GitHub Actions BuildRunner + factory, including Trigger/Status/Cancel behavior. |
| submitqueue/extension/buildrunner/githubactions/client.go | Adds a small REST client wrapper for workflow dispatch, run status lookup, and cancellation. |
| submitqueue/extension/buildrunner/githubactions/githubactions_test.go | Adds tests validating dispatch payloads, run-id handling, status mapping, and cancel behavior. |
| submitqueue/extension/buildrunner/githubactions/BUILD.bazel | Adds Bazel build/test rules for the new package. |
| example/submitqueue/orchestrator/server/main.go | Switches the example server to use a BuildRunner factory and adds githubactions selection + HTTP client setup. |
| example/submitqueue/orchestrator/server/BUILD.bazel | Wires the new githubactions dependency into the example orchestrator build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
5fc9195 to
1e922d5
Compare
1e922d5 to
add1958
Compare
441c37e to
377e50b
Compare
|
|
||
| ## Backends | ||
|
|
||
| - `noop`: local-development backend that immediately succeeds every build. |
There was a problem hiding this comment.
this is removed, may need to update the text here
There was a problem hiding this comment.
Updated in 453829c — replaced the retired noop bullet with fake (the local-development backend; succeeds unless a head change URI carries a failure marker).
| var _ buildrunner.Factory = (*factory)(nil) | ||
|
|
||
| // NewFactory constructs a queue-aware GitHub Actions BuildRunner factory. | ||
| func NewFactory(params FactoryParams) (buildrunner.Factory, error) { |
There was a problem hiding this comment.
factory shouldn't be implemented here but rather be left for implementer/integrator
There was a problem hiding this comment.
Good call — removed NewFactory/FactoryParams from the githubactions package in 453829c. Per-queue factory wiring now lives in the integrator/wiring layer (matching the buildkite backend); the extension package keeps only the impl + Params. Reworked the corresponding test to construct the runner via NewBuildRunner.
… list Address review feedback on #208: - Remove NewFactory/FactoryParams from the githubactions package. Per-queue factory wiring belongs in the integrator/wiring layer (matching the buildkite backend); the extension package keeps only the impl + Params. Reworked the corresponding test to construct the runner via NewBuildRunner. - README: replace the retired `noop` backend bullet with `fake`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
This PR adds a GitHub Actions implementation of BuildRunner.
They key detail to note is that starting with API version 2026-03-10, the workflow dispatch API synchronously returns a
workflow_run_idas documented here. Prior versions did not return this workflow id.With this
workflow_run_id, we can poll for status and cancel workflow runs via API to implement BuildRunner.Validation
✅
make fmt && make build && make test && make e2e-test