Add support for password-protected sentinels#101
Merged
Conversation
unleashed
reviewed
Jun 7, 2019
| # ["redis_url0", "redis_url1", ..., "redis_urlN"] | ||
| # Or an Array of Hashes with ":host" and ":port" keys: | ||
| # [{ host: "srv0", port: 7379 }, { host: "srv1", port: 7379 }, ...] | ||
| # Or an Array of Hashes with ":host", ":port", and ":password" (optional) keys: |
Contributor
There was a problem hiding this comment.
I assume sentinels don't have a :user?
Contributor
Author
There was a problem hiding this comment.
Contributor
Author
|
It turns out that there was a bug in redis about this: redis/redis-rb#856 |
Monkey-patches a method in Redis::Client::Connector::Sentinel to fix a bug with sentinel passwords. It applies the fix in redis/redis-rb#856. The fix was included in 4.1.2, but we cannot upgrade because that version drops support for ruby < 2.3.0 which we still need to support.
Contributor
Author
|
Added a new commit that monkey patches the Sentinel client class to fix the issue without upgrading the gem. |
unleashed
approved these changes
Jun 7, 2019
Contributor
unleashed
left a comment
There was a problem hiding this comment.
reluctantly approving, I expect this to be solved in the short-term
bors r+
bors Bot
added a commit
that referenced
this pull request
Jun 7, 2019
101: Add support for password-protected sentinels r=unleashed a=davidor Ref: https://issues.jboss.org/browse/THREESCALE-2620 Co-authored-by: David Ortiz <z.david.ortiz@gmail.com>
Contributor
Author
|
I don't like the solution either, but you know we can't drop support for Ruby 2.2.x just yet. |
Contributor
Build succeeded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref: https://issues.jboss.org/browse/THREESCALE-2620