Repository navigation
ci(go): keep the vet job's build cache on disk - #5112
Conversation
The Go vet and contracts job caches three builds of the tree, about 6 GB for one commit. After the go.sum change in #5047, its restored cache plus the recompiled tree passed the 8 GB tmpfs. Go drops cache writes it has no room for, and route-inventory's go list then failed reading back the cgo file list it had just failed to write, so the job failed on main and on every pull request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
… run from their own head Pull requests run trusted-linux-ci.yml from main, so a workflow input would not reach them until merged. Drop the input and the probe job. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (no client-visible change)
Since the go.sum change in #5047,
ci / Go vet and contractsfails on main and on every pull request. route-inventory reports that the tree does not type-check ("loading compiled Go files from cache: reading srcfiles list: cache entry not found"), and the step then says the inventory is stale. The inventory itself is current.The cause is a full build cache. setup-go mounts the Go build cache on a tmpfs with no size, which gets half of the hosted runner's 16 GB, so 8 GB. The vet job caches three builds of the tree (Linux vet, darwin vet, and the trimmed darwin node build), about 6 GB for one commit. After the go.sum change, the job restores the last saved cache across the go.sum boundary and recompiles nearly everything on top of it. That reaches about 11 GB. Go ignores cache writes that fail, but
go list -compiledwrites each cgo package's source file list and reads it straight back, so route-inventory's package load fails. Main never saves a new cache while the job fails, so every run restores the same stale cache and fails the same way.Approach
setup-go skips the tmpfs for the
vetcache, so that job keeps its build cache on disk, where size is not a problem. The other Go jobs keep the tmpfs; each of them caches one Linux build. The route-inventory check is unchanged.The decision lives in the setup-go action, not in a workflow input:
ci.ymlrunstrusted-linux-ci.ymlfrom main, so a workflow change would not take effect on a pull request until it merged, but pull requests run the actions from their own head.Validation
ci / Go vet and contractsrun restored the same stale cache main restores, skipped the tmpfs, and passed in under 8 minutes; route-inventory reported the inventory current.contracts/api/v2/route-inventory.json,make verify-route-inventorystill exits 1 with the stale-inventory error.Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/pr-5112/
Risks
The vet job's compile output now goes to the runner disk instead of memory, which can make that job a little slower. Only hosted runners are affected. Self-hosted runners never mounted the tmpfs.
Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Keep the vet job's Go build cache on disk in the setup-go action
Changes the tmpfs mount step in action.yml so it is skipped when
inputs.cache-nameisvet. The vet cache is large, and tmpfs runs out of space, which makes cache writes fail. Other cache names still mount~/.cache/go-buildas tmpfs.Macroscope summarized f32a5c8.