Skip to content

Fix CI lint for Go 1.25+ module bumps - #34

Merged
froppa merged 3 commits into
masterfrom
cursor/fix-ci-linter-go-version-3c4c
Oct 26, 2026
Merged

froppa merged 3 commits into
masterfrom
cursor/fix-ci-linter-go-version-3c4c

Conversation

@froppa-agent

@froppa-agent froppa-agent commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Root cause

The Test and Lint checks on Dependabot PRs #26–#32 did not fail inside go test or golangci-lint. On 2026-09-28 GitHub never started the jobs:

The job was not started because recent account payments have failed or your spending limit needs to be increased.

Those checks are still the ones blocking merge. Master’s own Test and Lint run succeeded on 2026-10-22, so the billing block is not the current default-branch state. Reproducing each PR on top of master shows what a fresh run would hit.

golangci-lint v2.1.6 is built with Go 1.24. The OpenTelemetry bumps set go 1.25.0 and the validator bump sets go 1.26.0. The pinned linter then exits before it lints anything:

the Go language version (go1.24) used to build golangci-lint is lower than the targeted Go version (1.26.0)

That is the linter / Go version mismatch. Two follow-on failures show up once a new enough linter actually runs, or once the otel SDK moves:

  • Go 1.25 marks reflect.Ptr with //go:fix inline. govet then reports every reflect.Ptr use in kits/configkit/discovery.go. The replacement, reflect.Pointer, already exists on Go 1.24.
  • go.opentelemetry.io/otel/sdk v1.46 defaults its resource schema to semconv 1.43.0. buildResource pinned semconv v1.37.0, so resource.Merge returns ErrSchemaURLConflict and the telemetry tests fail. Resources now use the SDK default schema URL, which matches both sdk 1.39 and 1.46.
  • TestShutdownLifecycle failed 3 of 30 local runs. It sampled a goroutine channel with a non-blocking select after Stop, so the test could fail even though the graceful context was already canceled. It now asserts context.Canceled directly.

Fix

Pin golangci-lint v2.13.0 (built with Go 1.27.0, so it can lint a go 1.26.0 module) in the workflow, Makefile, and mise.toml. The project itself stays on Go 1.24.0.

Verification

On this branch, with Go 1.24.0:

  • go test -count=1 -race -cover -coverpkg=./... ./...
  • go test -count=50 ./kits/shutdownkit/ -run TestShutdownLifecycle
  • go vet ./...
  • golangci-lint v2.13.0 run ./... (0 issues)

Each Dependabot diff merges cleanly onto this branch. Tested locally after that merge (Dependabot branches were not pushed):

PR Dependency Alone, after this fix Against the other bumps
#26 actions/checkout v6 → v7 pass clean with #27 and the module PRs
#27 actions/setup-go v5 → v7 pass clean with #26 and the module PRs
#28 go.uber.org/zap v1.27.0 → v1.28.0 pass conflicts with #29–#32 in go.sum (and go.mod for #29 and #31)
#29 otlpmetricgrpc v1.38.0 → v1.46.0 (also sdk, sdk/metric, metric, trace, otel to v1.46.0, otelhttp to v0.70.0, go 1.25.0) pass conflicts with #28, #30, #31, #32. This is the otel bump to keep
#30 otel/trace v1.39.0 → v1.46.0 (also metric and otel to v1.46.0, go 1.25.0) pass identical tree to #32. Conflicts with #28, #29, #31
#31 validator/v10 v10.27.0 → v10.30.5 (go 1.26.0) pass conflicts with #28, #29, #30, #32
#32 otel/metric v1.39.0 → v1.46.0 superseded by #30 same tree as #30; merging #30 then #32 is a clean no-op

Suggested merge order: this PR, then #26 and #27 in either order, then #29. Skip #30 and #32. #31 and #28 conflict with #29; resolving by keeping go 1.26.0, validator v10.30.5, zap v1.28.0, and the #29 otel modules, then go mod tidy, passes go test ./... and golangci-lint v2.13.0. go get warns that validator v10.30.5 pulls retracted github.com/gabriel-vasile/mimetype v1.4.15. No further code change was required for that combination.

Open in Web Open in Cursor 

golangci-lint v2.1.6 is built with Go 1.24 and refuses the go 1.25 and
1.26 directives that the open module bumps write into go.mod. Pin
v2.13.0, which is built with Go 1.27.

Use reflect.Pointer so the Go 1.25 inline check stays quiet, build
telemetry resources on the SDK schema so the otel 1.46 bump can merge,
and assert shutdown cancellation directly instead of racing a channel.

Co-authored-by: froppa-agent <froppa-agent@users.noreply.github.com>
@froppa-agent
froppa-agent requested a review from froppa as a code owner October 26, 2026 19:28
TestGracefulThenSignalIgnored_NoForce sends SIGTERM to the test process
after canceling graceful. The handler loop exits on graceful Done and
calls signal.Stop, so whenever it wins that race SIGTERM falls back to
its default action and the whole package dies with "signal: terminated"
(reproduced locally on master and on this branch: 2 of 5 -count=20 runs).

Hold a test-owned SIGTERM subscription for the duration of the test so the
signal is always consumed; the assertions on Wait latency and the force
context are unchanged.

Signed-off-by: froppa <5844892+froppa@users.noreply.github.com>
The master ruleset requires a status check named "Test and Lint", but
that is only the workflow name; the jobs report "Lint" and "Test", so no
pull request can satisfy the rule. Add a "Test and Lint" job that needs
both and fails unless both succeeded (including when either is skipped
or cancelled). Lint and Test are unchanged.

Signed-off-by: froppa <5844892+froppa@users.noreply.github.com>
@froppa
froppa merged commit 83a38cb into master Oct 26, 2026
3 checks passed
@froppa
froppa deleted the cursor/fix-ci-linter-go-version-3c4c branch October 26, 2026 21:43
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.

2 participants