From 86e42e2afaf1a52c59083f3c88e1d3ed169fd88e Mon Sep 17 00:00:00 2001 From: William Cai Date: Mon, 22 Jun 2026 12:11:49 +0800 Subject: [PATCH] fix(ci): allow Go toolchain auto-upgrade (GOTOOLCHAIN=auto) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea79490a..57625155 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,9 +52,17 @@ jobs: - name: Build (cpworker C + Go) via Mage working-directory: build + # setup-go@v6 pins GOTOOLCHAIN=local, which forbids fetching a newer + # toolchain when a (transitive) module requires go > the installed + # version. Restore the default 'auto' so the build resolves the + # required toolchain on demand, matching local development. + env: + GOTOOLCHAIN: auto run: go run mage.go -v build:linux - name: Go unit tests + env: + GOTOOLCHAIN: auto run: | set -e for m in cpdaemon cpctl cpgolib; do