Skip to content

Conversation

doc-sheet
Copy link

@doc-sheet doc-sheet commented Jul 27, 2025

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.

return Ok(());
}

self.manager.recycle(conn, metrics).await
Copy link
Author

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.

Copy link
Contributor

@loewenheim loewenheim left a 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.

@doc-sheet doc-sheet force-pushed the sentinel branch 2 times, most recently from 9924a3f to cb5603e Compare August 6, 2025 13:36
@doc-sheet doc-sheet marked this pull request as ready for review August 6, 2025 13:36
@doc-sheet doc-sheet requested a review from a team as a code owner August 6, 2025 13:36
@doc-sheet
Copy link
Author

@loewenheim, thank you! I guess it's ready now.

@doc-sheet doc-sheet force-pushed the sentinel branch 2 times, most recently from 5366813 to 85852b6 Compare August 6, 2025 14:04
Copy link
Contributor

@loewenheim loewenheim left a 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"
Copy link
Contributor

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.

Copy link
Author

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

Copy link
Author

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

Copy link
Author

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
@doc-sheet doc-sheet force-pushed the sentinel branch 2 times, most recently from e7c8b64 to 3915832 Compare August 7, 2025 09:39
@doc-sheet doc-sheet marked this pull request as draft August 15, 2025 18:41
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.

deadpool-redis update Redis sentinel support
2 participants