Skip to content

ci: keep a Go build cache per go-tests node - #23776

Draft
teddyknox wants to merge 2 commits into
developfrom
claude/go-tests-per-node-build-cache
Draft

teddyknox wants to merge 2 commits into
developfrom
claude/go-tests-per-node-build-cache

Conversation

@teddyknox

@teddyknox teddyknox commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Each of the 12 go-tests nodes now keeps its own Go build cache, so a node stops rebuilding the packages a PR changed on every push. This is a draft until its net effect is measured.

The problem. The 12 nodes share one build-cache key per revision. Cache keys are immutable, so only the first node to finish saves. In develop job 5800161, node 10 uploaded 2.6 GiB and the other eleven skipped, which discarded their new compiles.

What changes. The cache namespace includes the node index. One file, five added lines.

Effect. CI only: the go-tests job's cache restore and save steps.

Expected cost and benefit, not yet measured here. On #23151's pipeline, per-node caches restored 0.3–0.6 GiB in 3–8 s, against 2.6 GiB in 17–25 s per node today. The costs:

  • Every node, including the critical-path node, spends about 6–10 s saving.
  • Storage per push rises from about 2.6 GiB to between about 6 GiB (the sizes above) and 28 GiB (if each node's cache grows to today's shared size).

Testing. All 115 CI checks pass on this PR. That shows the change is correct, not that it is faster: the first pipeline only populates the new keys. Before marking this ready, compare go-tests duration and save sizes on a second pipeline against develop.

Context. This is one of four small PRs that change code CircleCI runs, found while reviewing the RWX pilot (#23151): #23772, #23775, #23776 and #23780. Each stands alone. The additive RWX shadow is #23783. This change was split out of #23775 after ci-config-reviewer flagged the missing numbers; it found no correctness problems.

Tracked in #24044.

🤖 Generated with Claude Code

The 12 go-tests nodes shared one build-cache key per revision. Cache keys
are immutable, so only the first node to finish saved; the other nodes'
new compiles were discarded and rebuilt on the next push. Each node now
restores and saves its own cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@teddyknox teddyknox self-assigned this Nov 10, 2026
@teddyknox teddyknox mentioned this pull request Nov 10, 2026
3 of 5 tasks
@github-actions

Copy link
Copy Markdown
Contributor

Agent approval check

Head branch claude/go-tests-per-node-build-cache matches agent prefix claude/

Current head: e8820a7b82427d41cebd0713d7a686c15f208f14
Human approvals: 0/2

A write-capable human can approve by submitting a native review or by commenting:

/approve e8820a7b82427d41cebd0713d7a686c15f208f14

This branch has not been deployed

No deployments
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.

1 participant