Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade go-redis from v8 to v9 #672

Closed
wants to merge 3 commits into from
Closed

Conversation

kumaramit01
Copy link

💸 TL;DR

This PR updates the go-redis library to v9. The v9 go-redis library is backward compatible with Redis 6 and supports Redis 7+. The existing v8 library doesn't support Redis 7. The v8 library fails for cluster slots, ping and error messages.

The managed client implementation has a dependency on v8 go-redis, that required some minor changes. The config options have changed in v9 specifically a new config ConnMaxLifetime that replaces MaxConnAge.

🧪 Testing Steps / Validation

We have tested go-redis with following redis version

Redis Version go-redis version Supported
6.2.13 8.x Yes.
7.0.7 8.x No.
7.2.3 8.x No.
6.2.13 9.x Yes.
7.0.7 9.x Yes.
7.2.3 9.x Yes.

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@kumaramit01 kumaramit01 requested a review from a team as a code owner January 13, 2025 18:51
@kumaramit01 kumaramit01 requested review from fishy, pacejackson and mathyourlife-reddit and removed request for a team January 13, 2025 18:51
Copy link
Member

@fishy fishy left a comment

Choose a reason for hiding this comment

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

this is actually a breaking change, as code using it will need to change their usage of github.com/go-redis/redis/v8 into github.com/redis/go-redis/v9.

in general we just consider all the packages under github.com/reddit/baseplate.go/redis/ as deprecated and tell people to use the new internal redisbp instead. we just didn't mark them as deprecated as that will also break the existing code.

@kumaramit01
Copy link
Author

Discussed offline -the support for v9 is via internal baseplate that has breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants