Skip to content

feat(buildrunner): add GitHub Actions backend#208

Merged
behinddwalls merged 2 commits into
mainfrom
wua/github-actions-buildrunner
Jun 8, 2026
Merged

feat(buildrunner): add GitHub Actions backend#208
behinddwalls merged 2 commits into
mainfrom
wua/github-actions-buildrunner

Conversation

@albertywu

@albertywu albertywu commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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_id as 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

Copilot AI review requested due to automatic review settings June 5, 2026 18:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.BuildRunner implementation 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=githubactions with 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.

Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go Outdated
Comment thread example/submitqueue/orchestrator/server/main.go Outdated
@albertywu albertywu force-pushed the wua/github-actions-buildrunner branch from 5fc9195 to 1e922d5 Compare June 5, 2026 18:31
Copilot AI review requested due to automatic review settings June 5, 2026 18:36
@albertywu albertywu force-pushed the wua/github-actions-buildrunner branch from 1e922d5 to add1958 Compare June 5, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go
Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go Outdated
Comment thread submitqueue/extension/buildrunner/githubactions/client.go
Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go
Comment thread submitqueue/extension/buildrunner/githubactions/client.go
Copilot AI review requested due to automatic review settings June 5, 2026 18:44
@albertywu albertywu marked this pull request as ready for review June 5, 2026 18:46
@albertywu albertywu requested review from a team, behinddwalls and sbalabanov as code owners June 5, 2026 18:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go
Copilot AI review requested due to automatic review settings June 5, 2026 18:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comment thread submitqueue/extension/buildrunner/githubactions/client.go
Comment thread submitqueue/extension/buildrunner/githubactions/client.go
Copilot AI review requested due to automatic review settings June 5, 2026 19:40
@albertywu albertywu review requested due to automatic review settings June 5, 2026 19:40
@CLAassistant

CLAassistant commented Jun 5, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Copilot AI review requested due to automatic review settings June 5, 2026 20:43
@albertywu albertywu force-pushed the wua/github-actions-buildrunner branch from 441c37e to 377e50b Compare June 5, 2026 20:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Comment thread submitqueue/extension/buildrunner/README.md Outdated
Comment thread submitqueue/extension/buildrunner/githubactions/README.md
Comment thread submitqueue/extension/buildrunner/githubactions/client.go
Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go
Comment thread submitqueue/extension/buildrunner/README.md Outdated
Comment thread submitqueue/extension/buildrunner/githubactions/githubactions.go Outdated
… 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>
@behinddwalls behinddwalls enabled auto-merge June 6, 2026 14:25
@behinddwalls behinddwalls added this pull request to the merge queue Jun 8, 2026
Merged via the queue into main with commit c1f1532 Jun 8, 2026
15 checks passed
@behinddwalls behinddwalls deleted the wua/github-actions-buildrunner branch June 8, 2026 15:57
gsturges pushed a commit that referenced this pull request Jun 9, 2026
## 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_id` as
documented
[here](https://docs.github.com/en/rest/actions/workflows?apiVersion=2026-03-10#create-a-workflow-dispatch-event).
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`

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

4 participants