Skip to content
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

[redis-sentinel] adding integration with SDK scaffolding/testing facilities. (again) #66

Merged
merged 9 commits into from
Jul 19, 2017

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Jun 26, 2017

What does this PR do?

Adds redis-sentinel using SDK testing/scaffolding.

Motivation

Community interest in redis-sentinel. (cc. @krasnoukhov)

Testing Guidelines

An overview on testing
is available in our contribution guidelines.

@truthbk truthbk changed the title Jaime/redis sentinel [redis-sentinel] adding integration with SDK scaffolding/testing facilities. (again) Jun 26, 2017
@truthbk
Copy link
Member Author

truthbk commented Jun 26, 2017

@krasnoukhov Not sure what happened to Travis, but it was attempting to build the wrong PR. Anyway's, closed the old PR and opened this one instead. I'll make sure the CI is green, update the manifest, and merge it ASAP. After that, you'll be the man in charge of redis-sentinel if that still sounds good to you! :)

@krasnoukhov
Copy link

@truthbk Sounds good.

What about this thing I brought up on previous PR? I can create a new PR for that once this one is merged: #5 (comment)

I'm not sure I'll be able to follow this project completely due to a high noise ratio, so would you be so kind of mentioning me on incoming redis-sentinel issues so I'll be able to take care of them?

Thank you

@truthbk truthbk force-pushed the jaime/redis-sentinel branch 2 times, most recently from 0c7d25e to 22950b6 Compare July 5, 2017 13:26
@truthbk
Copy link
Member Author

truthbk commented Jul 5, 2017

@krasnoukhov I added a very basic integration test with an actual redis_sentinel, etc. Could you please review and check if it all makes sense to you? This is now quite close to being mergeable (I might have a couple of questions for you).

Thank you!

NOTE: please ignore the hbase errors, we have to fix those. Thank you.

pending = stats.get('pending-commands', stats.get('link-pending-commands'))
if pending is not None:
self.gauge(
'redis.sentinel.pending_commands',

Choose a reason for hiding this comment

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

Do you think it would make more sense if this was called link_pending_commands instead? I think it would be beneficial to be consistent with latest redis-provided name link-pending-commands

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually hit that issue when testing, so I'm all for this change. I'll rename.

@krasnoukhov
Copy link

Hey @truthbk, looks good overall, I just left one comment. Let me know if I can help

pending = stats.get('pending-commands', stats.get('link-pending-commands'))
if pending is not None:
self.gauge(
'redis.sentinel.pending_commands', pending,

Choose a reason for hiding this comment

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

Same with link_pending_commands

pending = stats.get('pending-commands', stats.get('link-pending-commands'))
if pending is not None:
self.gauge(
'redis.sentinel.pending_commands', pending, tags=['master'] + master_tags

Choose a reason for hiding this comment

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

Same with link_pending_commands

redis.sentinel.last_ok_ping_latency,gauge,,second,,number of seconds since last OK ping,,redis_sentinel,last ok latency
redis.sentinel.ok_sentinels,gauge,,instance,,number of sentinels up and running,,redis_sentinel,ok sentinels
redis.sentinel.ok_slaves,gauge,,instance,,number of slaves up and running,,redis_sentinel,ok slaves
redis.sentinel.pending_commands,gauge,,command,,number of pending sentinel commands,,redis_sentinel,pending commands

Choose a reason for hiding this comment

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

I believe this should be changed to link_pending_commands as well

@truthbk
Copy link
Member Author

truthbk commented Jul 18, 2017

@krasnoukhov thanks for the review, and good eye.... We should probably refactor all that common code at some point, it's error-prone. Anyways, I'll leave it as it is for now.

@krasnoukhov
Copy link

LGTM @truthbk 👍

truthbk added 9 commits July 19, 2017 11:33
[redis-sentinel] bring up infrastructure.

[redis-sentinel][test] basic integration tests working.

Still a relatively weak effort, but at least we have the integration
tests working. We will probably need some mocked tests for the
multiple sentinel scenario, as the current infra just brings up
a single sentinel.
@truthbk truthbk force-pushed the jaime/redis-sentinel branch from bca0992 to 193dddd Compare July 19, 2017 09:37
@truthbk
Copy link
Member Author

truthbk commented Jul 19, 2017

@krasnoukhov one last 👍 before merging? I am labeling you as the maintainer for the check in the manifest. Is that still OK with you. Once you give me the OK, we're all game! 🙇

@krasnoukhov
Copy link

@truthbk That's totally fine with me. As I mentined previously, I'd probably rely on you or someone else on datadog team to mention me in case there's incoming issues related to this integration.

@truthbk
Copy link
Member Author

truthbk commented Jul 19, 2017

Absolutely, we'll make sure we keep you in the loop for anything redis-sentinel related! Thank you very much @krasnoukhov - welcome to the maintainer family! :)

@truthbk truthbk merged commit bdcd769 into master Jul 19, 2017
@truthbk truthbk deleted the jaime/redis-sentinel branch July 19, 2017 10:30
@krasnoukhov
Copy link

Just verified this in production, everything seems to work as expected. Thank you

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