Skip to content

[9.3](backport #4052) chore: update Go version to 1.26.1#4056

Open
mergify[bot] wants to merge 1 commit into9.3from
mergify/bp/9.3/pr-4052
Open

[9.3](backport #4052) chore: update Go version to 1.26.1#4056
mergify[bot] wants to merge 1 commit into9.3from
mergify/bp/9.3/pr-4052

Conversation

@mergify
Copy link

@mergify mergify bot commented Mar 18, 2026

Summary

  • Update Go toolchain version to 1.26.1 across the project
  • Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built with Go 1.25 and can't lint Go 1.26.1 code)
  • Disable newly introduced revive rules that flag pre-existing code patterns
  • Fix 3 prealloc issues by preallocating slices with known capacity

Changes

Go version bump

File From To
.go-version 1.25.5 1.26.1
go.mod 1.25.5 1.26.1
scripts/update_assets_md/go.mod 1.24.0 1.26.1
docs/version.asciidoc 1.25.4 1.26.1
bin/.go-1.25.5.pkg renamed bin/.go-1.26.1.pkg
bin/go .go-1.25.5.pkg .go-1.26.1.pkg
bin/gofmt .go-1.25.5.pkg .go-1.26.1.pkg

golangci-lint upgrade

File From To
bin/.golangci-lint-2.4.0.pkg renamed bin/.golangci-lint-2.11.3.pkg
bin/golangci-lint .golangci-lint-2.4.0.pkg .golangci-lint-2.11.3.pkg
.golangci.yaml Disable 6 new revive rules

Prealloc fixes

  • internal/resources/fetching/fetchers/azure/assets_enricher.go
  • internal/resources/providers/awslib/rds/provider.go
  • internal/resources/providers/gcplib/inventory/provider.go

Test plan

## Summary
- Update Go toolchain version to 1.26.1 across the project
- Upgrade golangci-lint from 2.4.0 to 2.11.3 (required — 2.4.0 was built
with Go 1.25 and can't lint Go 1.26.1 code)
- Disable newly introduced revive rules that flag pre-existing code
patterns
- Fix 3 prealloc issues by preallocating slices with known capacity

## Changes

### Go version bump
| File | From | To |
|------|------|----|
| `.go-version` | 1.25.5 | 1.26.1 |
| `go.mod` | 1.25.5 | 1.26.1 |
| `scripts/update_assets_md/go.mod` | 1.24.0 | 1.26.1 |
| `docs/version.asciidoc` | 1.25.4 | 1.26.1 |
| `bin/.go-1.25.5.pkg` | renamed | `bin/.go-1.26.1.pkg` |
| `bin/go` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |
| `bin/gofmt` | `.go-1.25.5.pkg` | `.go-1.26.1.pkg` |

### golangci-lint upgrade
| File | From | To |
|------|------|----|
| `bin/.golangci-lint-2.4.0.pkg` | renamed |
`bin/.golangci-lint-2.11.3.pkg` |
| `bin/golangci-lint` | `.golangci-lint-2.4.0.pkg` |
`.golangci-lint-2.11.3.pkg` |
| `.golangci.yaml` | — | Disable 6 new revive rules |

### Prealloc fixes
- `internal/resources/fetching/fetchers/azure/assets_enricher.go`
- `internal/resources/providers/awslib/rds/provider.go`
- `internal/resources/providers/gcplib/inventory/provider.go`

## Test plan
- [ ] CI pipeline passes with the new Go version
- [ ] Linter passes (`golangci-lint run` exits 0)
- [ ] Build and unit tests succeed

(cherry picked from commit 535c223)
@mergify mergify bot requested a review from a team as a code owner March 18, 2026 14:34
@mergify mergify bot added the backport label Mar 18, 2026
@mergify mergify bot assigned olegsu Mar 18, 2026
@mergify mergify bot mentioned this pull request Mar 18, 2026
3 tasks
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.

1 participant