-
Notifications
You must be signed in to change notification settings - Fork 350
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
Support for Redis Sentinel #501
Conversation
c951dc8
to
eb4482c
Compare
Interesting followups:
|
3331944
to
4e9ec0f
Compare
4e9ec0f
to
65d137f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See one comment for tls test. once fixed\reimplemented let's merge (probably a matter of rebase)
test/db.test.js
Outdated
@@ -1,79 +0,0 @@ | |||
const path = require('path'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file was added to test ssl connection just recently why it is removed ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question.
I deleted it temporarily because I'll have to figure out how to test that part.
The problem here is — ioredis
gets created using a constructor and not using a function such as Redis.createClient()
sinon
, the stub library we're using, does not support spies on constructors
.
I deleted this test just to verify it was working correctly. I'll now figure out another way to test this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
If the emulate option is working I'm thinking that we can land this massive PR, and break in memory a bit. so it will be another bug to fix it |
The emulate option is working correctly, yes. I'm not really sure we should land this thing into master as it is. I'm imagining somebody that wants to contribute or even simply trying the source code: they would clone the repository, install and run it: they would have a broke experience by default (as in-memory is not working and they would need a Redis instance), which is not very pleasant. I'd rather keep this branch here and resurrect it once |
Just for the record, I am using(developing against) this branch to run EG and I haven't run into any issues when running with a single redis host or the sentinel mode. |
@agonbina thanks for active testing. the only reason we cannot merge it to master is some issues with InMemory mode. Which is implemented as mock of redis client. once fixed it will land into master |
22821e6
to
6029f65
Compare
I've updated the Two points still have to be solved — see here |
020cf71
to
1296d57
Compare
Rebase is going to be fun. |
squash manually, it will be way easier. |
93e8940
to
7def2c9
Compare
…emory to ioredis-mock
9602e31
to
6cdd2bb
Compare
Codecov Report
@@ Coverage Diff @@
## master #501 +/- ##
==========================================
- Coverage 88.61% 88.54% -0.08%
==========================================
Files 114 114
Lines 3540 3553 +13
==========================================
+ Hits 3137 3146 +9
- Misses 403 407 +4
Continue to review full report at Codecov.
|
b27ef79
to
2c8ae64
Compare
LGTM |
Nice to see this was merged! I will switch to using the master branch now 👍 I'm curious as to when is the next release planned? |
@agonbina waiting for multi-auth merge. |
* Replacing redis client to ioredis that support Sentinel; replace in-memory to ioredis-mock * A lot of test fixes
Connects #499
ioredis
Mock library issues
scan
command, which we're using.Solution
emulate
option and use Redis for everything, even for testing on CircleCI (we should do that anyway) 4deacf9Compatibility problems
All methods already return a Promise, there's no need for
promisify/Async
version 5efe867hgetall
reply must be modified to guarantee compatibility 6c12cfdexec
function is using a Pipelining feature and has a different response type fixbluebird
is overriding the default Promise implementation and this is preventing themigrate
framework to work detect a Promise and react accordingly issue 4ad3cfc