Pin golangci-lint to avoid nilness panic on main - #6393
Merged
Conversation
golangci-lint v2.13.0 bundles honnef.co/go/tools v0.8.0-rc.1, whose nilness fact analyzer panics with "unhandled builtin recover" while analyzing github.com/getsentry/sentry-go, breaking CI on main. Pin to the last known-good release until upstream ships a fix. Signed-off-by: Samuele Verzi <samu@stacklok.com>
rdimitrov
previously approved these changes
Aug 20, 2026
golangci-lint 2.12.2's bundled type-checker cannot parse a generic-method signature in Go 1.27's math/rand/v2, which 'stable' now resolves to. Run the lint job on the Go version go.mod actually targets so the pinned golangci-lint release can type-check the stdlib. Signed-off-by: Samuele Verzi <samu@stacklok.com>
jhrozek
approved these changes
Aug 20, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6393 +/- ##
==========================================
+ Coverage 77.66% 77.73% +0.06%
==========================================
Files 748 748
Lines 71826 71826
==========================================
+ Hits 55787 55836 +49
+ Misses 16034 15985 -49
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 20, 2026
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.
Summary
CI on
mainis failing:golangci-lintpanics during thestaticcheck/nilnessfact analysis withinternal error: unhandled builtin recoverwhile analyzing
github.com/getsentry/sentry-go(a dependency ofpkg/sentry). See the failing run:https://github.com/stacklok/toolhive/actions/runs/32346960123/job/96357620328
Root cause:
.github/workflows/lint.ymlused to pingolangci-lint-action'sversioninput (v2.0.1), but that pin wassilently dropped when the action was bumped to v8.0.0. Since then, CI
floats to golangci-lint's latest release.
v2.13.0(released2026-08-19) bundles a release-candidate build of staticcheck
(
honnef.co/go/tools@v0.8.0-rc.1), which crashes on this codebase.This is an upstream bug —
pkg/sentry/sentry.goitself never callsrecover().golangci-lint-action'sversioninput back tov2.12.2, thelast stable release before the regression, until upstream ships a
fix.
Fixes #
Type of change
Test plan
task test)task test-e2e)task lint-fix)Confirmed via
gh release listthatv2.12.2(2026-05-06) predatesthe
v2.13.0(2026-08-19) release that introduced the staticcheck RCdependency, and that this repo has no
replacedirective affectinghub.lumenfield.work/getsentry/sentry-go. This is a CI-only config change;correctness will be confirmed by this PR's own lint job running
against the pinned version.
Special notes for reviewers
Once golangci-lint ships a release with a fixed
honnef.co/go/toolsversion, the
version: v2.12.2pin (and its explanatory comment)should be removed so CI floats to latest again.
Generated with Claude Code