Repository navigation
Fix CI lint for Go 1.25+ module bumps - #34
Merged
Merged
Conversation
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>
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>
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.
Root cause
The Test and Lint checks on Dependabot PRs #26–#32 did not fail inside
go testor golangci-lint. On 2026-09-28 GitHub never started the jobs: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-lintv2.1.6 is built with Go 1.24. The OpenTelemetry bumps setgo 1.25.0and the validator bump setsgo 1.26.0. The pinned linter then exits before it lints anything: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:
reflect.Ptrwith//go:fix inline. govet then reports everyreflect.Ptruse inkits/configkit/discovery.go. The replacement,reflect.Pointer, already exists on Go 1.24.go.opentelemetry.io/otel/sdkv1.46 defaults its resource schema to semconv 1.43.0.buildResourcepinned semconv v1.37.0, soresource.MergereturnsErrSchemaURLConflictand the telemetry tests fail. Resources now use the SDK default schema URL, which matches both sdk 1.39 and 1.46.TestShutdownLifecyclefailed 3 of 30 local runs. It sampled a goroutine channel with a non-blocking select afterStop, so the test could fail even though the graceful context was already canceled. It now assertscontext.Canceleddirectly.Fix
Pin golangci-lint v2.13.0 (built with Go 1.27.0, so it can lint a
go 1.26.0module) in the workflow, Makefile, andmise.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 TestShutdownLifecyclego vet ./...golangci-lintv2.13.0run ./...(0 issues)Each Dependabot diff merges cleanly onto this branch. Tested locally after that merge (Dependabot branches were not pushed):
actions/checkoutv6 → v7actions/setup-gov5 → v7go.uber.org/zapv1.27.0 → v1.28.0go.sum(andgo.modfor #29 and #31)otlpmetricgrpcv1.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)otel/tracev1.39.0 → v1.46.0 (also metric and otel to v1.46.0,go 1.25.0)validator/v10v10.27.0 → v10.30.5 (go 1.26.0)otel/metricv1.39.0 → v1.46.0Suggested 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, thengo mod tidy, passesgo test ./...and golangci-lint v2.13.0.go getwarns that validator v10.30.5 pulls retractedgithub.com/gabriel-vasile/mimetypev1.4.15. No further code change was required for that combination.