Skip to content

perf(ci): stop the cache export of pull request image builds - #5113

Merged
dan-petty merged 2 commits into
mainfrom
perf/4646-pr-image-cache
Nov 12, 2026
Merged

dan-petty merged 2 commits into
mainfrom
perf/4646-pr-image-cache

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The Service, Runner and MCP Server image jobs of a pull request now read the BuildKit gha cache of main and write none. GitHub keeps the cache of a pull request in the scope of its merge ref, so no other pull request read these exports. They filled the Actions cache past its 10 GB limit, and GitHub then evicted the layers that the release writes on main.

release.yml writes the cache once for each image, from the Build and Push step of the published image. The Build and Load steps only read it.

The comment of the Runner Image job no longer says that the job shares the builder stage through the cache. #4928 gives each image its own cache scope.

Closes #4646

Change: openspec/changes/archive/2026-11-12-4646-stop-the-cache-export-of-pull/

The image jobs of a pull request read the BuildKit gha cache of main
and write none. The release writes the cache once for each image, from
the build that it publishes. Correct the comment of the Runner Image
job, which said that the job shares the builder stage through the
cache.
@dan-petty dan-petty added type/infra Type infra: the build, CI, images or cluster scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners labels Nov 12, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Measurements

Source: the Actions API and the BuildKit logs of the jobs (devops gh api), 2026-11-12.

Before (main at 3109817)

  • Actions cache (actions/cache/usage, about 14:53Z): 10,705,664,218 bytes in 376 active entries. The cache list: 483 entries, 12.83 GB. BuildKit entries of pull request refs: 415 entries, 11.24 GB. BuildKit entries of refs/heads/main: 11 entries, 0.10 GB. The oldest pull request BuildKit entry was 51 min old.
  • 60 completed pull request runs of ci.yml (12:12Z to 14:49Z), 27 of them built each image:
Job Job mean Build step mean Cache export mean (6 jobs) CACHED steps mean (6 jobs)
Service Image 3.41 min 142 s 67.7 s 4.3
Runner Image 3.28 min 121 s 38.5 s 7.8
MCP Server Image 3.32 min 139 s 50.2 s 10.0

The three jobs took 10.0 runner-min for each push that built the images, and 156 s (2.6 runner-min) of that was the cache export.

After (this pull request, run 43245263598, one sample)

Job Job Build step Cache export CACHED steps
Service Image 2.92 min 102 s none 0
Runner Image 3.07 min 99 s none 0
MCP Server Image 3.12 min 122 s none 0
  • The three jobs took 9.1 runner-min. The job count does not change (3 image jobs).
  • No step was CACHED, because the cache of main holds none of the large layers now. The first release after the merge writes them, and the next pull request reads them.

After the merge

One day after the merge, a comment on #4646 gives the size of the Actions cache, the mean of the Service Image job and the CACHED count of the builder stage.

Owner steps

None. The old pull request entries go out with the eviction of GitHub (7 days with no read, or sooner over the limit).

@dan-petty
dan-petty marked this pull request as ready for review November 12, 2026 15:27
@dan-petty
dan-petty merged commit ba30820 into main Nov 12, 2026
22 checks passed
@dan-petty
dan-petty deleted the perf/4646-pr-image-cache branch November 12, 2026 15:27
dan-petty pushed a commit that referenced this pull request Nov 12, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.119.0](v0.118.0...v0.119.0)
(2026-11-12)


### Features

* **repos:** the claim sets In Progress
([#5111](#5111))
([06ef1c6](06ef1c6))
* **roadmap:** a fix-plan step repairs a plan PR with open findings
([#5104](#5104))
([ca5b16d](ca5b16d))
* **roadmap:** extend stage review rounds while open findings drop
([#5090](#5090))
([bacf713](bacf713))
* **roadmap:** re-anchor a stale citation that matches one line
([#5040](#5040))
([16356d8](16356d8))


### Bug Fixes

* **ci:** keep failed test IDs in the service image shard summary
([#5106](#5106))
([88589ef](88589ef))
* **github:** count each page of a paginated GitHub read
([#5070](#5070))
([908e24a](908e24a))
* **github:** keep the metrics permissions out of the runner Job token
([#5064](#5064))
([fb549ff](fb549ff))
* **github:** pace mutations through the clock seam
([#5063](#5063))
([2bd87bc](2bd87bc))
* **k8s:** delete the CoreDNS files that k3s never applies
([#5055](#5055))
([463f601](463f601))
* **monitoring:** tidy LLM stack windows, units and lines
([#5052](#5052))
([375d724](375d724))
* **roadmap:** a refused kept plan uses no stage gate return
([#4983](#4983))
([b8adbca](b8adbca))
* **roadmap:** count a command as removed only when MUST NOT governs it
([#4985](#4985))
([2e6f407](2e6f407))
* **roadmap:** cut prose after a cited stage command
([#4982](#4982))
([a172563](a172563))
* **roadmap:** name every module of a group with no named test
([#5089](#5089))
([27a0e79](27a0e79))
* **roadmap:** stage returns every open review finding to the planner
([#5067](#5067))
([21b116e](21b116e))
* **roadmap:** the alternatives check reads the tools in use
([#5062](#5062))
([8903233](8903233))
* **roadmap:** the constants gate reads 6_500 and no new value
([#5080](#5080))
([8a7b113](8a7b113))
* **roadmap:** the constants gate reads only a stated value
([#5042](#5042))
([cf4733e](cf4733e))
* **telemetry:** read repository traffic as the GitHub App
([#4932](#4932))
([7c42823](7c42823))
* **tests:** close the UDP, DNS and git gaps of the network floor
([#5101](#5101))
([047ee48](047ee48))
* **tests:** repair the bwrap contract suite and gate it
([#5110](#5110))
([9a0659d](9a0659d)),
closes [#4715](#4715)


### Performance Improvements

* **ci:** build the Service image once for its test shards
([#5079](#5079))
([dcf5bd5](dcf5bd5))
* **ci:** run only the required checks on the release PR
([#5057](#5057))
([8174071](8174071))
* **ci:** stop the cache export of pull request image builds
([#5113](#5113))
([ba30820](ba30820))
* **roadmap:** consolidate keeps its vectors in the shared tiers
([#5099](#5099))
([2a8bf1a](2a8bf1a))


### Code Refactoring

* **roadmap:** one Status writer for every job
([#5109](#5109))
([24cfedc](24cfedc))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ci GitHub Actions workflows, pre-commit hooks, CI gates, and runners type/infra Type infra: the build, CI, images or cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(ci): stop the cache export of pull request image builds

1 participant