Skip to content

fix(ci): allow Go toolchain auto-upgrade (GOTOOLCHAIN=auto)#229

Merged
rivercg merged 1 commit into
0.9.xfrom
fix/ci-libpcap-symlink-install
Jun 22, 2026
Merged

fix(ci): allow Go toolchain auto-upgrade (GOTOOLCHAIN=auto)#229
rivercg merged 1 commit into
0.9.xfrom
fix/ci-libpcap-symlink-install

Conversation

@rivercg

@rivercg rivercg commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Problem

The ci workflow has failed on every 0.9.x run since 2026-06-15 — the run
immediately after the actions/setup-go v5→v6 bump (#215). Every run dies during
the Mage build with a bare:

Error: exit status 1

right after the cpworker libpcap install line, with no diagnostic — because
mage runs the Go and C builds concurrently, so the real error interleaves
and 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):

go: go.mod requires go >= 1.26.0 (running go 1.25.0; GOTOOLCHAIN=local)

actions/setup-go@v6 installs Go from cpdaemon/go.mod (1.25.0) and pins
GOTOOLCHAIN=local, which forbids Go from fetching a newer toolchain. A
transitive dependency now requires go ≥ 1.26.0, so the go build fails.
Local development builds fine on go 1.24.1 only because the default
GOTOOLCHAIN=auto silently fetches the required toolchain — the exact behaviour
setup-go@v6 disabled.

Fix

Set GOTOOLCHAIN: auto on the build and Go-test steps so CI resolves the
required toolchain on demand, matching local development.

Verification

  • GOTOOLCHAIN=local locally reproduces the failure
    (go.mod requires go >= 1.25.0 (running go 1.24.1; GOTOOLCHAIN=local)).
  • Default auto builds green — just verify (cpworker C build + Go tests) passes
    on go 1.24.1 via auto-upgrade.
  • The CI run on this PR is the end-to-end confirmation.

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).
@rivercg rivercg force-pushed the fix/ci-libpcap-symlink-install branch from b77f7ae to 86e42e2 Compare June 22, 2026 04:25
@rivercg rivercg changed the title fix(build): make libpcap.so.1 symlink install idempotent and fail loudly fix(ci): allow Go toolchain auto-upgrade (GOTOOLCHAIN=auto) Jun 22, 2026
@rivercg rivercg merged commit 697679f into 0.9.x Jun 22, 2026
1 check passed
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