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

Seeing this warning: Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead #5493

Closed
kapso opened this issue Aug 25, 2022 · 5 comments

Comments

@kapso
Copy link

kapso commented Aug 25, 2022

Ruby version: 3.1.2
Rails version: 7.0.3.1
Sidekiq / Pro / Enterprise version(s): Sidekiq v6.5.5 / Sidekiq Pro v5.5.2

Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead.(called from: /app/vendor/bundle/ruby/3.1.0/gems/sidekiq-6.5.5/lib/sidekiq/client.rb:234:in `atomic_push')
@mperham
Copy link
Collaborator

mperham commented Aug 25, 2022 via email

@nateberkopec nateberkopec closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
@bf4
Copy link
Contributor

bf4 commented Aug 29, 2022

xref #5484

@kroehre
Copy link

kroehre commented Sep 15, 2022

@mperham I definitely get where you're coming from but in @kapso's defense, I only found #5484 via this issue (thanks @bf4) since it was the only result when searching for that particular deprecation message. Github's search could be better 😄

@Robfaldo
Copy link

Robfaldo commented Oct 11, 2022

I also only found #5484 through this one and am assuming people who google this error are sent here. I arrived here because I'm trying to develop locally and use pry in a sidekiq job to debug/develop something and this error was making it impossible to actually work.

I've not been able to upgrade sidekiq because of dependency issues so I'll share a temporary fix that works for me locally so that I can develop without all the noise from this warning that might help others. I just went into the redis gem locally and could see 2 of these:

          ::Redis.deprecate!(
            "Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead." \
            "(called from: #{caller(1, 1).first})"
          )

which I commented out. I can't see this being a problem or affecting any behaviour and it's meant that I can use pry in my sidekiq without everything I write disappearing every 5 seconds when this warning gets logged :D

@joeywang
Copy link

For me, I have to downgrade to 4.7.1, because I need to use the argument namespace which is removed from redis 5.0+.

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

No branches or pull requests

7 participants