Skip to content

chore: update golangci-lint to v2.13 for go1.27 compatibility - #972

Open
thaJeztah wants to merge 3 commits into
prometheus:mainfrom
thaJeztah:bump_golangci
Open

chore: update golangci-lint to v2.13 for go1.27 compatibility#972
thaJeztah wants to merge 3 commits into
prometheus:mainfrom
thaJeztah:bump_golangci

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
  • fix linting

  • ci: remove obsolete GODEBUG settings

    Remove the x509sha1 and tls10default compatibility settings from the
    test environment. Neither is supported by the minimum tested Go version,
    and x509sha1 causes binaries built with recent Go versions to fail at
    startup.

  • chore: update golangci-lint to v2.13 for go1.27 compatibility

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah

thaJeztah commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

Ah; it doesn't like a GODEBUG, because it's deprecated in go1.24, and go1.27 now rejects obsolete ones 🤔

golangci/golangci-lint info checking GitHub for tag 'v2.13.1'
golangci/golangci-lint info found version: 2.13.1 for v2.13.1/linux/amd64
golangci/golangci-lint info installed /home/runner/go/bin/golangci-lint
>> running golangci-lint
/home/runner/go/bin/golangci-lint run  ./...
fatal error: removed GODEBUG "x509sha1" set to old value "1" in environment (https://go.dev/doc/godebug#go-124)

goroutine 1 [running, locked to thread]:
runtime.fatal({0xfea13f16230, 0x62})
	runtime/panic.go:1267 +0x74
runtime.main()
	runtime/proc.go:224 +0x2aa
runtime.goexit({})
	runtime/asm_amd64.s:1264 +0x1
make: *** [Makefile.common:205: common-lint] Error 2

Remove the x509sha1 and tls10default compatibility settings from the
test environment. Neither is supported by the minimum tested Go version,
and x509sha1 causes binaries built with recent Go versions to fail at
startup.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Comment thread Makefile.common
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v2.12.2
GOLANGCI_LINT_VERSION ?= v2.13.1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is managed and synced from upstream Prometheus.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GOLANGCI_LINT_VERSION ?= v2.13.1
GOLANGCI_LINT_VERSION ?= v2.12.2

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. It's probably best to just apply the pending fixes and we'll pick up the Makefile.common update soon when we apply the latest version upstream.

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