Skip to content

Conversation

@ndyakov
Copy link
Member

@ndyakov ndyakov commented Dec 4, 2025

Thanks to the work done by @ccoVeille it was determined that we use features not available in go 1.18 and we decided to gradually move towards 1.23. Initially we will move to 1.21 and with the release of 1.26 we will bump to 1.23. After that, with each new golang version we will jump one version, which means that at the end, our minimal go version will be three versions before the latest release - just a reminder, go officially supports the last two versions (stable and oldstable).

  • Added ci run with min version ( so we can observe incompatible changes with it )
  • update version in examples

@ndyakov ndyakov marked this pull request as ready for review December 4, 2025 15:29
@ndyakov ndyakov requested a review from Copilot December 4, 2025 15:29
Copilot finished reviewing on behalf of ndyakov December 4, 2025 15:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the minimum required Go version from 1.18 to 1.21 across the entire codebase, including all modules, examples, and build scripts. The update includes adding Go 1.21 to the CI test matrix and implementing Go 1.21-compatible alternatives for features that were only added in Go 1.23+.

  • Updated go.mod files across main module, examples, and extras to require Go 1.21
  • Added Go 1.21.x to CI workflow test matrix to ensure compatibility with the minimum supported version
  • Implemented Go 1.21-compatible atomic operations (AND/OR) using CompareAndSwap loops instead of Go 1.23's atomic And/Or methods
  • Replaced slices.Collect(maps.Keys()) with a custom helper function for Go 1.21 compatibility

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Updated minimum Go version from 1.18 to 1.21 for main module
go.sum Updated dependency hashes with additional mod file entries
internal/customvet/go.mod Updated Go version from 1.17 to 1.21
internal/routing/aggregator.go Replaced Go 1.23 atomic And/Or methods with CAS-based implementations for Go 1.21 compatibility
doctests/timeseries_tut_test.go Removed maps/slices imports and added custom mapKeys helper function compatible with Go 1.21
scripts/release.sh Updated go mod tidy compat flag from 1.18 to 1.21
README.md Updated documentation to reflect Go 1.21 as minimum version and added 1.21 to tested versions
.github/workflows/build.yml Added Go 1.21.x to CI test matrix for both benchmark and test jobs
extra/redisprometheus/go.mod Updated Go version from 1.19 to 1.21
extra/redisotel/go.mod Updated Go version from 1.19 to 1.21
extra/rediscmd/go.mod Updated Go version from 1.19 to 1.21
extra/rediscensus/go.mod Updated Go version from 1.19 to 1.21
example/scan-struct/go.mod Updated Go version from 1.18 to 1.21
example/redis-bloom/go.mod Updated Go version from 1.18 to 1.21
example/maintnotifiations-pubsub/go.mod Updated Go version from 1.18 to 1.21
example/lua-scripting/go.mod Updated Go version from 1.18 to 1.21
example/hset-struct/go.mod Updated Go version from 1.18 to 1.21
example/hll/go.mod Updated Go version from 1.18 to 1.21
example/digest-optimistic-locking/go.mod Updated Go version from 1.18 to 1.21
example/del-keys-without-ttl/go.mod Updated Go version from 1.18 to 1.21
example/cluster-mget/go.mod Updated Go version from 1.18 to 1.21

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

bobymicroby
bobymicroby previously approved these changes Dec 5, 2025
Copy link
Member

@bobymicroby bobymicroby left a comment

Choose a reason for hiding this comment

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

LgTm

@ndyakov ndyakov merged commit 674c7b8 into master Dec 5, 2025
34 checks passed
@ndyakov ndyakov deleted the ndyakov/go-version branch December 5, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants