fix(ci): allow Go toolchain auto-upgrade (GOTOOLCHAIN=auto)#229
Merged
Conversation
The ci workflow has failed on every 0.9.x run since 2026-06-15 (the
actions/setup-go v5->v6 bump). setup-go@v6 pins GOTOOLCHAIN=local, which
forbids Go from fetching a newer toolchain when a (transitive) module
requires a go version higher than the one setup-go installed from
cpdaemon/go.mod (1.25.0). A dependency now requires go >= 1.26.0, so the
concurrent 'go build' fails with:
go: go.mod requires go >= 1.26.0 (running go 1.25.0; GOTOOLCHAIN=local)
mage runs the Go and C builds concurrently, so this error interleaved
after the cpworker install lines and masqueraded as a libpcap symlink
failure in the logs.
Set GOTOOLCHAIN=auto on the build and test steps so CI resolves the
required toolchain on demand — matching local development, which builds
green on go 1.24.1 precisely because auto-upgrade is enabled.
Verified locally: GOTOOLCHAIN=local reproduces the failure; the default
auto resolves it ('just verify' green).
b77f7ae to
86e42e2
Compare
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.
Problem
The
ciworkflow has failed on every0.9.xrun since 2026-06-15 — the runimmediately after the
actions/setup-gov5→v6 bump (#215). Every run dies duringthe Mage build with a bare:
right after the cpworker
libpcapinstall line, with no diagnostic — becausemageruns the Go and C builds concurrently, so the real error interleavesand the C-install happens to be the last stdout flushed. It looked like a libpcap
symlink failure; it is not.
Root cause
The actual error (buried in the concurrent output):
actions/setup-go@v6installs Go fromcpdaemon/go.mod(1.25.0) and pinsGOTOOLCHAIN=local, which forbids Go from fetching a newer toolchain. Atransitive dependency now requires go ≥ 1.26.0, so the
go buildfails.Local development builds fine on go 1.24.1 only because the default
GOTOOLCHAIN=autosilently fetches the required toolchain — the exact behavioursetup-go@v6disabled.Fix
Set
GOTOOLCHAIN: autoon the build and Go-test steps so CI resolves therequired toolchain on demand, matching local development.
Verification
GOTOOLCHAIN=locallocally reproduces the failure(
go.mod requires go >= 1.25.0 (running go 1.24.1; GOTOOLCHAIN=local)).autobuilds green —just verify(cpworker C build + Go tests) passeson go 1.24.1 via auto-upgrade.