Repository navigation
fix(golint): golangci-lint v2.14.0, which reads go1.27.2's export data, and a build that lints - #37
Merged
Merged
Conversation
…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>
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.
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:
The image's own check (
golangci-lint --version) let that build through.Changes
GOLANGCI_LINT_VERSIONmoves 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.go 1.27.0module 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)
--build-arg GOLANGCI_LINT_VERSION=v2.13.2, the build fails at the probe with the three export-data typecheck errors.go mod vendorIndependent 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.