Repository navigation
ci: add reusable runner VMs with persistent local caches #6040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
a22e907
ci: use local caches on self-hosted runners
kixelated aaedc05
ci: make the merge-queue runner configurable
kixelated f6fddbf
ci: refuse non-queue jobs on persistent local caches
kixelated 31aeaf3
Merge remote-tracking branch 'origin/main' into ci/local-cache
kixelated 33738fc
ci: provide a reusable persistent runner VM
kixelated afaf35f
docs: reference the evaluated host through flake self
kixelated fb6c069
ci: allow the runner to lock 64 MiB for ring tests
kixelated c5ab968
style(ci): format the runner integration test
kixelated a9b7f84
ci: support isolated runner VMs for multiple repositories
kixelated 05e88f2
fix(ci): reject spoofed guest replies and conflicting host NAT
kixelated fa3eb94
Merge origin/main and keep runner checks in nightly CI
kixelated 6d80a01
docs(ci): clarify hosted and persistent queue cache behavior
kixelated 07d5a26
Merge origin/main and preserve hosted R2 caches
kixelated 08a049c
test(ci): cover local and hosted R2 cache selection
kixelated 6f39914
fix(ci): restart persistent runner VMs after unexpected exits
kixelated 7fe7b1f
docs(ci): require external workflow approvals before public runner re…
kixelated 98eb702
Merge remote-tracking branch 'origin/main' into ci/local-cache
kixelated 0d89b96
fix(ci): preserve host networking around runner VMs
kixelated b69acf6
Merge origin/main and retain queue-only runner routing
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Runner VM | ||
|
|
||
| on: | ||
| workflow_call: | ||
| pull_request: | ||
| branches: [release] | ||
| types: [opened, synchronize, reopened, edited, closed] | ||
| paths: | ||
| - "nix/**" | ||
| - "flake.nix" | ||
| - "flake.lock" | ||
| - ".github/justfile" | ||
| - ".github/workflows/runner-vm.yml" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: runner-vm-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| check: | ||
| if: github.event.action != 'closed' | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 30 | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: ./.github/actions/just | ||
| - uses: DeterminateSystems/nix-installer-action@1d87d45818068401a10cf16bdc5f00b24994a83f # main | ||
| with: | ||
| determinate: false | ||
| - run: just gh runner-vm |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this persistent runner is registered to the public MoQ repository, a pull request can modify or add a workflow that targets the runner's default
self-hostedlabel, bypassing this event expression entirely. The fresh evidence beyond the earlier cache finding is that the new refusal exists only inside.github/actions/rust-cache, so the attacker-controlled job can omit that action and directly poison the persistent mbx state later consumed by merge-group jobs. Restrict assignment outside PR-controlled YAML, such as with a runner group limited to a trusted workflow/ref, or do not attach this persistent runner to the public repository.AGENTS.md reference: AGENTS.md:L18-L18
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed: PR-controlled event guards do not constrain runner assignment. Public registration and queue routing remain disabled. The consuming host now refuses registration unless GitHub requires approval for all external contributor workflows, and the shared setup guide documents that policy and the need to review code before approving execution. The maintainer has not yet approved changing the repository policy, so this PR is draft pending that decision.
(written by GPT-6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The maintainer approved the external workflow approval policy, and the repository setting now reads
all_external_contributors. Registration also checks that policy outside PR-controlled YAML and refuses to proceed if it differs. PR checks remain GitHub-hosted; the persistent runner is selected only for merge groups. Maintainers must inspect any workflow and code before approving external execution. The runner remains unregistered andMOQ_QUEUE_RUNNERunset until the host passes deployment verification.(written by GPT-6)