Is your feature request related to a problem?
Yes. go.mod still pins the Redis client to github.com/go-redis/redis/v8 v8.11.5:
github.com/go-redis/redis/v8 v8.11.5
The v8 line is no longer maintained upstream. The github.com/go-redis/redis project moved to v9 long ago (v9.x is the current release series), and v8 is missing security and stability fixes that only land in v9. Projects using go-micro for Redis-backed stores/brokers are also forced to keep the unmaintained v8 dependency in their dependency graph (or hold two versions if they already use v9).
Describe the solution you'd like
Upgrade the Redis client from v8 to v9:
- Update
go.mod (and go.sum) to github.com/go-redis/redis/v9 (latest v9.x).
- Replace all
github.com/go-redis/redis/v8 import paths with github.com/go-redis/redis/v9 across the repository.
- Adapt to the v9 API changes (context-first: every command takes
context.Context as the first argument, and updated NewClient/NewFailoverClient option signatures).
- Run
go mod tidy and make sure go build ./... and go vet ./... pass.
Describe alternatives you've considered
- Keeping v8: not viable long term since v8 is unmaintained upstream.
- Migrating to another Redis client (e.g.
redis/go-redis/v9 is the same project; alternatives like rueidis would be a much bigger change): unnecessary scope for this issue.
Use case
Anyone using the redis-backed store (store/redis) or redis broker in go-micro. After the upgrade they get the maintained v9 client and a single unified go-redis/redis/v9 version in their dependency graph instead of an unmaintained v8.
Implementation ideas (optional)
- Bump the module in
go.mod and run go mod tidy.
- Mechanical import path replacement (
sed -i 's|github.com/go-redis/redis/v8|github.com/go-redis/redis/v9|g') across the repo.
- Fix compile errors introduced by the v9 API changes (pass
context.Context to commands; update constructor calls).
- Run the existing store/broker tests to verify.
Additional context
Current dependency in master go.mod: github.com/go-redis/redis/v8 v8.11.5.
Checklist
Helpful Resources
Is your feature request related to a problem?
Yes.
go.modstill pins the Redis client togithub.com/go-redis/redis/v8 v8.11.5:The
v8line is no longer maintained upstream. Thegithub.com/go-redis/redisproject moved to v9 long ago (v9.x is the current release series), and v8 is missing security and stability fixes that only land in v9. Projects using go-micro for Redis-backed stores/brokers are also forced to keep the unmaintained v8 dependency in their dependency graph (or hold two versions if they already use v9).Describe the solution you'd like
Upgrade the Redis client from v8 to v9:
go.mod(andgo.sum) togithub.com/go-redis/redis/v9(latest v9.x).github.com/go-redis/redis/v8import paths withgithub.com/go-redis/redis/v9across the repository.context.Contextas the first argument, and updatedNewClient/NewFailoverClientoption signatures).go mod tidyand make surego build ./...andgo vet ./...pass.Describe alternatives you've considered
redis/go-redis/v9is the same project; alternatives like rueidis would be a much bigger change): unnecessary scope for this issue.Use case
Anyone using the redis-backed store (
store/redis) or redis broker in go-micro. After the upgrade they get the maintained v9 client and a single unifiedgo-redis/redis/v9version in their dependency graph instead of an unmaintained v8.Implementation ideas (optional)
go.modand rungo mod tidy.sed -i 's|github.com/go-redis/redis/v8|github.com/go-redis/redis/v9|g') across the repo.context.Contextto commands; update constructor calls).Additional context
Current dependency in
mastergo.mod:github.com/go-redis/redis/v8 v8.11.5.Checklist
Helpful Resources