Conversation
golangci-lint v1.64.8 predates Go 1.26 by nearly a year and cannot read its export data format, failing with: could not decode ..., export data version 4 is greater than maximum supported version 2 Confirmed via golangci-lint's own changelog that go1.26 support (golangci-lint#6271) first shipped in v2.9.0. Verified independently against a real Prow CI run (stolostron/console, ACM-42591 validation PR): switching to v2.13.2 clears the export-data error completely. v1 and v2 use incompatible config schemas, so backend/.golangci.yml is migrated via golangci-lint's own migrate command rather than hand-edited. The migration tool correctly drops errcheck, gosimple, govet, ineffassign, staticcheck, and unused from the explicit enable list (now part of v2's default set) and moves gci under the new formatters section. Also fixes the 3 real staticcheck findings the version bump surfaces (previously masked by the export-data crash, not new bugs): - aggregate/status.go: simplify a negated boolean (De Morgan's law) - auth/auth.go: TLSClientConfig is embedded in rest.Config; the explicit selector was redundant - vmproxy/units.go: error strings should not be capitalized or end in punctuation (six occurrences, ST1005) Note: the version bump also surfaces 3 new unused findings in internal/clusterinfo/clusterinfo_test.go and internal/informers/factory_test.go (test helpers that appear to be declared but never referenced), from the recent partial-discovery work in stolostron#66. Left those alone since they are outside this fix's scope and worth a second look from whoever wrote that test. Signed-off-by: Randy Bruno Piverger <21374229+Randy424@users.noreply.github.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.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.
Purpose
While validating ACM-42591's CI/CD pipeline changes against a real Prow run,
ci/prow/checkfailed with:Traced this to
golangci-lint v1.64.8predating Go 1.26 by nearly a year. Confirmed via golangci-lint's own changelog that Go 1.26 support (golangci-lint#6271) first shipped in v2.9.0. This is not an environment problem, the runner image already has Go, it's purely the linter binary being too old to read Go 1.26's export data format.What this does
GOLANGCI_LINT_VERSIONtov2.13.2inscripts/golangci-lint-backend.sh(note the/v2/in the install path, v2 is a separate Go module)backend/.golangci.ymlto the v2 config schema via golangci-lint's ownmigratecommand (v1/v2 use incompatible schemas)aggregate/status.go: simplify a negated boolean expressionauth/auth.go: drop a redundant.TLSClientConfig.selector (it's embedded inrest.Config)vmproxy/units.go: error strings should not be capitalized or end in punctuation (6 occurrences)Verified
go build ./cmd/console: cleango test ./...: all 25 packages passgolangci-lint run: 0 issues on the files this touchesci/prow/checkwent from failing to passing with this exact changeOne thing worth a look, not fixed here
The version bump also surfaces 3 new
unusedfindings, ininternal/clusterinfo/clusterinfo_test.goandinternal/informers/factory_test.go(test helpers that look declared but never referenced), from the recent partial-discovery work in #66. Left those alone since they're outside this fix's scope, might be worth a second look from whoever wrote that test.🤖 Generated with Claude Code