fix(ci): unbreak vulncheck, gate go.mod tidiness, upgrade client-go to v3 - #95
Merged
Merged
Conversation
govulncheck v1.1.4 vendors golang.org/x/tools v0.29.0, whose SSA builder cannot handle sources introduced by the Go 1.27 toolchain and aborts with "panic: unexpected expr: *ast.KeyValueExpr" (exit 2). The vulncheck job has failed on every push since bd6730d moved setup-go from 1.26.8 to 1.27.1, which also blocks build (it needs vulncheck). Only reproducible on linux/amd64; darwin/arm64 analyses the same tree cleanly, so the panic comes from platform-specific sources. v1.8.0 vendors x/tools v0.50.0 and reports "No vulnerabilities found."
Renovate cannot rewrite import paths across a Go major version, so its client-go v3 bump (#94) left a require that nothing imports. Nothing in CI caught it: lint, test and e2e all passed on a go.mod that go mod tidy reverts to the previous state. Runs in lint rather than a new job so build gates on it via its existing needs. -diff reports without writing, so no git diff follow-up is needed.
Go treats v2 and v3 as distinct module paths, so this needs the import rewritten rather than a go.mod version bump. Renovate's attempt (#94) added the v3 module alongside v2 without touching either import, leaving a require that go mod tidy removes. goGitLab.Ptr is deprecated in v3 and carries a //go:fix inline directive, which trips staticcheck SA1019 and a govet inline diagnostic at all 11 call sites. Ptr's body is exactly "return new(v)", so substituting new() is behaviour- and type-identical, and go 1.26 supports new(expr). The remaining v3.0.0 breaking changes do not reach this code: feature flags and group boards are unused, and only the root package is imported. Every service method this client calls is unchanged between the versions.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Three independent fixes, one per commit.
1.
fix(ci)— govulncheck panic on Go 1.27vulncheckhas failed on every push since bd6730d movedsetup-gofrom 1.26.8 to 1.27.1, which also blocksbuild(it declaresneeds: [lint, test, vulncheck]).It was never reporting a vulnerability — govulncheck itself crashed:
The pin at v1.1.4 vendors
x/toolsv0.29.0, whose SSA builder cannot handle sources the Go 1.27 toolchain produces. Bumped to v1.8.0 (x/toolsv0.50.0).Only reproducible on linux/amd64 — darwin/arm64 analyses the same tree cleanly, which is why it never showed up locally.
panic, exit 2No vulnerabilities found., exit 02.
ci— fail lint whengo.modis untidyRenovate cannot rewrite import paths across a Go major version, so #94 left a
requirethat nothing imports. Nothing in CI caught it — lint, test and e2e all passed on ago.modthatgo mod tidyreverts.Added
go mod tidy -diffto thelintjob. Run against #94's tree it exits 1 and names the dead require exactly. It lives inlintrather than a new job sobuildgates on it through its existingneeds.3.
fix(deps)— client-go v2.64.0 → v3.11.0Done properly: imports rewritten, so
go list -m allresolves a single v3 andgo mod tidyis a no-op.goGitLab.Ptris deprecated in v3 and carries a//go:fix inlinedirective, trippingstaticcheck SA1019plus agovet inlinediagnostic at all 11 call sites.Ptr's body is exactlyreturn new(v), so substitutingnew()is behaviour- and type-identical.Remaining v3.0.0 breaking changes don't reach this code: feature flags and group boards are unused, and only the root package is imported. Every service method this client calls is unchanged between versions.
interface.gois untouched — no v3 types leaked into the abstraction seam.Supersedes #94.
Verification
Run on Go 1.27.1, at every commit:
go build ./...go vet ./...go test ./...okgolangci-lint run --max-same-issues=0 ./...go mod tidy -diffgovulncheck ./...(linux/amd64)