Skip to content

Migrate golangci-lint to v2 and update Go version#1965

Merged
umputun merged 8 commits intomasterfrom
golangci-lint-v2-migration
Nov 2, 2025
Merged

Migrate golangci-lint to v2 and update Go version#1965
umputun merged 8 commits intomasterfrom
golangci-lint-v2-migration

Conversation

@umputun
Copy link
Copy Markdown
Owner

@umputun umputun commented Nov 2, 2025

Summary

  • Migrated golangci-lint configuration to v2 format
  • Updated Go version from 1.23.0 to 1.25
  • Updated Docker base images to support Go 1.25
  • Updated CI workflows for Go 1.25 and golangci-lint v2
  • Fixed flaky tests and data races

Changes

  • Updated backend/.golangci.yml to version 2 format
  • Updated backend/go.mod Go version to 1.25
  • Updated backend/_example/memory_store/go.mod to 1.25
  • Updated Dockerfile to use baseimage:buildgo-v1.17.0 (Go 1.25.0) and app-v1.17.0
  • Updated .github/workflows/ci-backend.yml to use Go 1.25 and golangci-lint-action@v7 with v2.6.0
  • Fixed flaky tests using assert.Eventually instead of fixed sleeps
  • Fixed data race in MockDest.closed field access
  • Configuration now uses v2 schema with updated linter settings structure
  • Removed deprecated run.timeout configuration (disabled by default in v2)

Testing

  • All tests pass locally with -race flag
  • Verified fixes for previously flaky tests (TestService_Many, TestMain_WithWebhook)

- migrated .golangci.yml to version 2 format
- updated go.mod from 1.23.0 to 1.24
- removed deprecated run.timeout configuration
- updated go.mod to go 1.25
- updated Dockerfile to use buildgo-v1.17.0 (go 1.25.0)
- updated Dockerfile to use app-v1.17.0
- use assert.Eventually instead of fixed sleep in TestService_Many
- wait for webhook before shutdown in TestMain_WithWebhook
- fixes race conditions exposed by Go 1.25 scheduler changes
- add IsClosed() method with proper locking
- add locking to String() method
- use IsClosed() in tests instead of direct field access
- fixes race condition detected by go test -race
@umputun umputun force-pushed the golangci-lint-v2-migration branch from e46c0fe to 4d6dc70 Compare November 2, 2025 19:46
- merge conditional assignment in example accessor/data.go
- add reminder in CLAUDE.md to always test and lint examples before committing
@umputun umputun requested a review from paskal November 2, 2025 19:59
@umputun umputun merged commit 34ea4c3 into master Nov 2, 2025
3 checks passed
@umputun umputun deleted the golangci-lint-v2-migration branch November 2, 2025 20:17
fedmag added a commit to fedmag/remark42 that referenced this pull request Nov 6, 2025
Migrate golangci-lint to v2 and update Go version (umputun#1965)
@paskal paskal added the backend label Mar 25, 2026
@paskal paskal added this to the v1.15.0 milestone Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants