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

Check for redis gem does not work #128

Closed
haffla opened this issue Dec 13, 2022 · 0 comments · May be fixed by #131
Closed

Check for redis gem does not work #128

haffla opened this issue Dec 13, 2022 · 0 comments · May be fixed by #131

Comments

@haffla
Copy link

haffla commented Dec 13, 2022

Hey!

Following up on #127 where I said that there is an issue about redis-client. Well the issue isn't really redis-client. The issue is that the case of redis not being installed isn't handled gracefully. The check unless defined?(::Redis) doesn't seem to work. It fails with "health_check failed: uninitialized constant #Class:HealthCheck::RedisHealthCheck::Redis".

But I think that reveals another issue. The gem has this hidden dependency on the redis gem. In our project this error occurred when we upgraded Sidekiq to version 7. It doesn't ship with redis anymore but instead redis-client. So in order to fix this we need to add redis to our dependencies again. Now we have dependencies on two redis clients. Wouldn't it be nice if health_check wouldn't force you to install either, but rather use the one that is available? Or make it configurable. Just throwing ideas around.

What do you think?

P.S. I know about the sidekiq-redis check. I think this could still be an issue for people who don't use Sidekiq at all, just redis-client.

y-yagi added a commit to y-yagi/health_check that referenced this issue May 21, 2023
Since 7.0, Sidekiq uses `redis-client` by default.
sidekiq/sidekiq@0b3e4c2

This patch allows to users use `health_check` without adding `redis` gem
with Sidekiq >= 7.0.

Fixes Purple-Devs#128.
@haffla haffla closed this as completed Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants