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

Adds support for Redis 7 via redisVersion metadata in all redis components #2085

Closed
wants to merge 5 commits into from

Conversation

berndverst
Copy link
Member

Description

Adds support for Redis 7 via redisVersion metadata in all redis components

When setting redisVersion to 7 / v7 or greater the new Redis Go SDK v9 will be used. For Redis 6 and below the v8 SDK will be used.

Issue reference

#1909

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

@berndverst berndverst requested review from a team as code owners September 15, 2022 21:52
@berndverst berndverst added this to the v1.9 milestone Sep 15, 2022
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #2085 (6acc590) into master (595e448) will decrease coverage by 0.33%.
The diff coverage is 16.71%.

❗ Current head 6acc590 differs from pull request most recent head 1608281. Consider uploading reports for the commit 1608281 to get more accurate results

@@            Coverage Diff             @@
##           master    #2085      +/-   ##
==========================================
- Coverage   37.86%   37.52%   -0.34%     
==========================================
  Files         193      193              
  Lines       24554    24721     +167     
==========================================
- Hits         9297     9277      -20     
- Misses      14543    14663     +120     
- Partials      714      781      +67     
Impacted Files Coverage Δ
internal/component/redis/metadata.go 0.00% <0.00%> (ø)
internal/component/redis/redis.go 0.00% <0.00%> (ø)
state/redis/redis_query.go 47.87% <0.00%> (-2.77%) ⬇️
pubsub/redis/redis.go 12.50% <6.31%> (-7.66%) ⬇️
bindings/redis/redis.go 16.94% <18.75%> (+2.24%) ⬆️
lock/redis/standalone.go 39.88% <33.33%> (-13.11%) ⬇️
state/redis/redis.go 34.94% <36.74%> (+0.09%) ⬆️
configuration/azure/appconfig/appconfig.go 41.89% <0.00%> (-22.64%) ⬇️
secretstores/gcp/secretmanager/secretmanager.go 43.92% <0.00%> (-12.84%) ⬇️
...are/http/routerchecker/routerchecker_middleware.go 54.54% <0.00%> (-10.84%) ⬇️
... and 60 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Bernd Verst <[email protected]>
@berndverst berndverst marked this pull request as draft September 15, 2022 22:24
@berndverst
Copy link
Member Author

More work needed to make certification tests pass.

if err != nil {
return err
}

r.ctx, r.cancel = context.WithCancel(context.Background())

_, err = r.client.Ping(r.ctx).Result()
if r.legacyRedis {
_, err = r.clientv8.Ping(r.ctx).Result()
Copy link
Member

@artursouza artursouza Sep 19, 2022

Choose a reason for hiding this comment

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

Is there a way to use Go lang to avoid these if checks? Could we declare an interface containing the methods we use here and declare a reference to that? Then, the only difference would be which instanced is referenced but they would both implement the same interface.

@artursouza artursouza modified the milestones: v1.9, v1.10 Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants