fix(ci): redirect Go caches to a per-job temp dir#2774
Open
danceratopz wants to merge 1 commit into
Open
Conversation
Self-hosted runners persist `$GOMODCACHE` (`/data/gh-home/go/pkg/mod`)
across jobs, so the `actions/setup-go` cache restore extracts a tarball
on top of files that already exist and emits hundreds of `tar: Cannot
open: File exists` lines before bailing out with `Failed to restore`.
The build still succeeds because the on-disk modules are reused, but
the log noise is alarming and the ~500 MB cache download is wasted.
Set `GOMODCACHE` and `GOCACHE` to `${{ runner.temp }}/go/...` before
each `setup-go` invocation so the cache always lands in an empty,
job-scoped directory. Behaviour on GitHub-hosted runners is unchanged;
self-hosted runners stop colliding without losing the GHA cache.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2774 +/- ##
================================================
Coverage 88.17% 88.17%
================================================
Files 577 577
Lines 35659 35659
Branches 3490 3490
================================================
Hits 31442 31442
Misses 3654 3654
Partials 563 563
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
marioevz
approved these changes
May 11, 2026
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.
🗒️ Description
The
fill (benchmark)job in therelease_fixture_featureworkflow (and any other CI step that runsactions/setup-goon aself-hosted-ghrrunner) emits hundreds of error lines like:Example: https://github.com/ethereum/execution-specs/actions/runs/25045144626/job/73358194540#step:5:2143
The self-hosted runner pool persists
$GOMODCACHE(/data/gh-home/go/pkg/mod) across jobs, so whenactions/setup-goextracts the GHA module-cache tarball it lands on top of files that already exist.taraborts each one withFile exists, the cache restore is skipped, and the job continues using the on-disk modules. The build still succeeds, but the log noise is alarming and the ~500 MB cache download is wasted.The same job ran cleanly in
tests-benchmark@v0.0.7(Feb 2026) on the same runner labels, confirming the persistent$GOMODCACHEonly began colliding recently.tests-benchmark@v0.0.8happened to runbuild-benchmark-genesisin the hostedcombinejob under the split-mode release path, so it didn't hit this either.This change exports
GOMODCACHEandGOCACHEto\${{ runner.temp }}/go/...immediately before everysetup-goinvocation in the affected workflows / composite actions:.github/actions/build-benchmark-genesis/action.yaml.github/actions/build-evm-client/geth/action.yaml.github/workflows/hive-execute.yaml.github/workflows/hive-consume.yamlrunner.tempis wiped at the end of each job, so the cache always lands in an empty, job-scoped directory. Behaviour on GitHub-hosted runners is unchanged; self-hosted runners stop colliding without losing the GHA cache.🔗 Related Issues or PRs
N/A.
✅ Checklist
```console
just static
```