Skip to content

fix(golint): golangci-lint v2.14.0, which reads go1.27.2's export data, and a build that lints - #37

Merged
slayerjain merged 1 commit into
mainfrom
fix/golint-reads-go-1.27.2
Oct 20, 2026
Merged

slayerjain merged 1 commit into
mainfrom
fix/golint-reads-go-1.27.2

Conversation

@slayerjain

Copy link
Copy Markdown
Member

golint-1.2.46 shipped golangci-lint v2.13.2 on go1.27.2. That version cannot read go1.27.2's export data, so every package fails its typecheck on stdlib imports:

could not import cmp (... export data version 5 is greater than maximum supported version 4)

The image's own check (golangci-lint --version) let that build through.

Changes

  • GOLANGCI_LINT_VERSION moves to v2.14.0, the first version that reads go1.27.2's export data. k8s-proxy's ci.yml already moved to it for the same failure.
  • The image build now ends by running golangci-lint on a small go 1.27.0 module that imports cmp, fmt and slices, using the image's own Go. A linter that cannot read that Go's export data now fails the image build instead of a lint lane. The probe's caches and Go telemetry are removed afterwards.

Testing on .142 (linux/amd64)

  • The image builds with v2.14.0.
  • With --build-arg GOLANGCI_LINT_VERSION=v2.13.2, the build fails at the probe with the three export-data typecheck errors.
  • In the v2.14.0 image, each repo's lint lane was run on main with that repo's config. All report 0 issues:
    • enterprise: linux/amd64, linux/arm64 (gui), windows/arm64 and tools/nativeassets
    • go-fuzzers
    • api-server: whole repo, after go mod vendor
    • integrations: cgo on

Independent review: CLEAN.

After merge: release v1.2.47. The pin round then moves the golint- refs to golint-1.2.47 by digest, alongside the other families' 1.2.46 pins.

…a, and a build that lints

golint-1.2.46 moved to go1.27.2 (golang:1.27.2-bookworm) and kept
golangci-lint v2.13.2, which cannot read that Go's export data: every
package fails its typecheck on its stdlib imports,

  could not import cmp (... cannot decode "cmp", export data version 5 is
  greater than maximum supported version 4)

and --new-from-patch does not filter that out. The image's own check,
`golangci-lint --version`, passed it. k8s-proxy's ci.yml had already met
this on golang:1.27 and moved to v2.14.0.

- GOLANGCI_LINT_VERSION is v2.14.0.
- The image build ends by linting a module that imports the stdlib (cmp,
  fmt, slices), `go 1.27.0` as keploy's are, with this image's Go: a
  golangci-lint that cannot read its export data fails the build, not a
  lint lane. Its caches go with it.

On .142 (linux/amd64): the image builds with v2.14.0, and with
--build-arg GOLANGCI_LINT_VERSION=v2.13.2 its build fails at that lint
with the three typecheck errors above. In the v2.14.0 image, each lint
lane's command over its repo's main, with that repo's config: enterprise
(linux/amd64, linux/arm64 with gui, windows/arm64, tools/nativeassets) 0
issues; go-fuzzers 0 issues; api-server (go mod vendor, the whole repo, not
just --new-from-patch) 0 issues; integrations (cgo on, as its lane) 0 issues.

Signed-off-by: slayerjain <shubhamkjain@outlook.com>
@slayerjain
slayerjain merged commit feb5709 into main Oct 20, 2026
29 checks 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