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

ClusterOptions needs the callback for getting username and password to pass to the underlying Redis object #2888

Closed
scr-oath opened this issue Feb 9, 2024 · 1 comment

Comments

@scr-oath
Copy link

scr-oath commented Feb 9, 2024

Expected Behavior

When using the GCP MemoryStore redis cluster, the credentials only last for about an hour. therefore, the same option added in #2097 needs to be added to the ClusterOptions and passed through to the underlying NewRedis call's Options object.

Current Behavior

There is only the static Username and Password options on the ClusterOptions; because of this, cluster clients may only be used for up to an hour and then need to be replaced with a new one.

Possible Solution

Add and curry/copy the CredentialsProvider option to the NewRedis call. Maybe also provide an option that provides a method that takes a Context and returns error as suggested in #2681

Steps to Reproduce

Just try to invent a way to change the password periodically and see that you can't without getting very deep in the guts with reflection and changing things around.

Context (Environment)

This is blocking or at least hindering use of this client with GCP MemoryStore redis cluster; possible workaround is to replace the entire client with a frequency more than the expiration duration.

#2097 solved this for redis instance.

Detailed Description

Possible Implementation

Provide the same option in the cluster options and ensure that gets to the underlying redis client's Options.

@scr-oath
Copy link
Author

scr-oath commented Feb 9, 2024

Seems to be a duplicate of #2790

@scr-oath scr-oath closed this as not planned Won't fix, can't repro, duplicate, stale Feb 9, 2024
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

No branches or pull requests

1 participant