From 22ff4791b5b5258b4ded47496aa69ee02e114b5b Mon Sep 17 00:00:00 2001 From: Abhishek Krishna Date: Wed, 22 Apr 2026 10:32:29 +0530 Subject: [PATCH] ci: unblock Lint job by pinning golangci-lint target Go version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `Lint` job has been failing on master with: can't load config: the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.1) Root cause: `.github/workflows/ci.yml` used `golangci/golangci-lint-action@v6` with `version: latest`, which resolves to `golangci-lint v1.64.8`. That binary is built with Go 1.24, while `go.mod` targets `go 1.26.1`. golangci-lint refuses to load the config when the build-time Go version is lower than the `run.go` target it infers from `go.mod`. Minimal fix: - Add `run.go: "1.24"` to `.golangci.yml` so the version check sees a target equal to the build version and proceeds. - Pin `golangci-lint-action` to `version: v1.64.8` explicitly. The v1 config format we use today is not parsed by golangci-lint v2.x, so future drift of `latest` onto v2 would silently break us again. Non-goals: migrating `.golangci.yml` to the v2 schema. That is a separate, larger PR once a golangci-lint release built with Go 1.26 is available. This unblocks stalled docs PRs: #6, #7, #8 (all UNSTABLE purely because of this lint failure on master). — [kcolbchain](https://kcolbchain.com) / [Abhishek Krishna](https://abhishekkrishna.com) --- .github/workflows/ci.yml | 4 +++- .golangci.yml | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26e140aa..d2116fe3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,9 @@ jobs: - name: Run golangci-lint uses: golangci/golangci-lint-action@v6 with: - version: latest + # Pin to v1.64.8 (last v1 release) to pair with the v1-format + # .golangci.yml. `latest` can drift to v2 and fail config parsing. + version: v1.64.8 args: --timeout=5m skip-cache: true diff --git a/.golangci.yml b/.golangci.yml index ad16370b..05c3124b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,6 +2,10 @@ run: timeout: 5m tests: true # Cache bust: 2025-08-15 + # Pin lint target to Go 1.24 so the analyser (built against Go 1.24 in + # golangci-lint v1.64.x) does not bail out on go.mod's 1.26.1 directive. + # Remove once golangci-lint ships a Go 1.26 binary and we can migrate to v2. + go: "1.24" linters: enable: