[codex] Shrink GitHub runner job image package#32
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces the packaged (saved OCI tar) size of the GitHub Actions runner-job image to fit workflow-compute’s provider artifact limits by switching to a smaller base image and carrying the Actions runner as a compressed archive that is extracted at container startup.
Changes:
- Replace
ghcr.io/actions/actions-runnerbase withmcr.microsoft.com/dotnet/runtime-deps:8.0-jammy. - Download and store the runner as
/opt/actions-runner/actions-runner.tar.gz, extracting it in a new container entrypoint before launching the job binary. - Add a packaging invariant test to prevent regressions back to inheriting the expanded runner image.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| release_packaging_test.go | Adds invariants asserting the runner-job image carries a compressed runner archive and uses the entrypoint extraction approach. |
| cmd/github-actions-runner-job/entrypoint.sh | New runtime entrypoint that extracts the runner archive on first start and then execs the runner job binary. |
| cmd/github-actions-runner-job/Dockerfile | Switches to a smaller base, downloads the runner archive during build, and wires the new entrypoint + env vars. |
💡 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
ghcr.io/actions/actions-runnerbase with a smaller runtime-deps imageRoot cause
workflow-compute STG dynamic provider package run
28279620866failed while promoting the GitHub runner job runtime.docker saveof the previous image exceeded STG's 1 GiB package artifact limit and/v1/agent-artifacts/.../commitreturned HTTP 413.The previous image inherited the fully expanded official Actions runner filesystem. For workflow-compute package delivery, the important limit is saved OCI tar size, so the runner should be carried compressed and expanded only inside the ephemeral runtime container.
Validation
GOWORK=off go test . -run TestGitHubActionsRunnerJobImageCarriesCompressedRunnerArchive -count=1failed because the Dockerfile inheritedghcr.io/actions/actions-runnerGOWORK=off go test . -run 'TestGitHubActionsRunnerJobImageCarriesCompressedRunnerArchive|TestReleasePublishesGitHubActionsRunnerJobImage' -count=1GOWORK=off go test ./cmd/github-actions-runner-job -count=1GOWORK=off go test ./... -count=1git diff --checkdocker run --specsucceeded, anddocker savemeasured397,696,512bytesdocker savemeasured498,814,464bytes