fix(ci): prime module cache before monorel runs GOPROXY=off tidy#78
Merged
Conversation
setup-go alone wasn't enough: monorel v0.12+ runs `go mod tidy` per sub-module with GOPROXY=off, so it can only resolve modules already in the local module cache. On a fresh runner with no cache hit, the tidy step fails with: go.loglayer.dev/transports/cli/v2 imports github.com/mattn/go-isatty: module lookup disabled by GOPROXY=off Two changes per workflow: 1. setup-go now has `cache: true` and `cache-dependency-path: '**/go.sum'` (mirrors ci.yml). On warm cache hits (typical case), modules are pre-extracted into the runner's GOMODCACHE. 2. New "Prime module cache for monorel tidy" step walks every go.mod in the repo and runs `go mod download` per module. This populates the cache from the network on cache-miss runs (e.g., the first run after a sub-module's go.sum changes), so monorel's GOPROXY=off tidy always finds what it needs. Applied to both release-pr.yml and release.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Follow-up to #77. setup-go alone wasn't enough: monorel v0.12+ runs
go mod tidyper sub-module withGOPROXY=off, so it can only resolve modules already in the local module cache. On a fresh runner with no cache hit (any time a sub-module'sgo.sumchanges and the cache key invalidates), tidy fails:Repro: https://github.com/loglayer/loglayer-go/actions/runs/25272377315/job/74096786410
Fix
Two changes per workflow:
cache: trueandcache-dependency-path: '**/go.sum'(mirrorsci.yml). On warm cache hits (typical case), modules are pre-extracted into the runner'sGOMODCACHE.go.modin the repo and runsgo mod downloadper module. This populates the cache from the network on cache-miss runs (e.g., the first run after a sub-module'sgo.sumchanges), so monorel'sGOPROXY=offtidy always finds what it needs.Applied to both
release-pr.ymlandrelease.yml.Upstream
The cleaner fix lives in monorel itself: the action should either prime the cache before tidy, or use the runner's default
GOPROXY(sincego.sumhashes provide the same determinism guaranteeGOPROXY=offaims for). Filed at disaresta-org/monorel#54. Once monorel ships the upstream fix, this priming step can be reverted.Test plan
release-prand the workflow completes successfully.releaseworkflow runs the publish pipeline cleanly.🤖 Generated with Claude Code