-
Notifications
You must be signed in to change notification settings - Fork 104
Add Redis-Sentinel support #4979
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
base: master
Are you sure you want to change the base?
Conversation
return Ok(()); | ||
} | ||
|
||
self.manager.recycle(conn, metrics).await |
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.
I don't know if it would recycle pool to sentinels or to master node.
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.
Hi, thank you for the contribution! On the Rust side this looks totally reasonable, there is just one nitpick I have about &String
/&Vec
.
The bigger issue is that you would need to test it and ideally write an integration test for it.
9924a3f
to
cb5603e
Compare
@loewenheim, thank you! I guess it's ready now. |
5366813
to
85852b6
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.
This looks very good now. There's just one adjustment that should be made to the test; if you like I can make the adjustment.
envelope, | ||
) | ||
|
||
assert response, "Failed to send event" |
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 test should ideally assert that the envelope actually makes it to the consumer.
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.
I just copy-pasted assert from another test and hope it will work.
For some reason test task failed in another place already https://github.com/getsentry/relay/actions/runs/16779236326/job/47578602499?pr=4979#step:10:3171
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.
I've seen similar empty outcomes during my tests but I thought it was because of difference in test environment
https://github.com/getsentry/relay/actions/runs/16779236326/job/47578602499?pr=4979#step:10:2855
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.
could it be because of redis crate bump?
Update deadpool-redis and it's dependencies to obtain fix for deadpool-rs/deadpool#416
e7c8b64
to
3915832
Compare
Fixes: #2875
Fixes: #4980
Hi.
This PR adds basic structures to support redis-sentinel.
I didn't test it with real redis instances yet.
As well as I didn't write docs.
It is my first ever rust code and I have no idea what is going on.
Could you look at it and suggest improvements?
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.