Skip to content

Add support for password-protected sentinels#101

Merged
bors[bot] merged 3 commits intomasterfrom
support-sentinels-passwords
Jun 7, 2019
Merged

Add support for password-protected sentinels#101
bors[bot] merged 3 commits intomasterfrom
support-sentinels-passwords

Conversation

@davidor
Copy link
Copy Markdown
Contributor

@davidor davidor commented Jun 7, 2019

@davidor davidor requested a review from unleashed June 7, 2019 12:58
# ["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:
Copy link
Copy Markdown
Contributor

@unleashed unleashed Jun 7, 2019

Choose a reason for hiding this comment

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

I assume sentinels don't have a :user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@davidor davidor changed the title Add support for password-protected sentinels [DON'T MERGE] Add support for password-protected sentinels Jun 7, 2019
@davidor
Copy link
Copy Markdown
Contributor Author

davidor commented Jun 7, 2019

It turns out that there was a bug in redis about this: redis/redis-rb#856
They included the fix in redis-rb 4.1.2, but that version also drops support for Ruby < 2.3.0, so we cannot merge this.

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.
@davidor davidor changed the title [DON'T MERGE] Add support for password-protected sentinels Add support for password-protected sentinels Jun 7, 2019
@davidor
Copy link
Copy Markdown
Contributor Author

davidor commented Jun 7, 2019

Added a new commit that monkey patches the Sentinel client class to fix the issue without upgrading the gem.

Copy link
Copy Markdown
Contributor

@unleashed unleashed left a comment

Choose a reason for hiding this comment

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

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>
@davidor
Copy link
Copy Markdown
Contributor Author

davidor commented Jun 7, 2019

I don't like the solution either, but you know we can't drop support for Ruby 2.2.x just yet.
Created an issue so we don't forget about this: #102

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Jun 7, 2019

Build succeeded

@bors bors Bot merged commit 83c822c into master Jun 7, 2019
@bors bors Bot deleted the support-sentinels-passwords branch June 7, 2019 16:01
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