Closed fsanggang closed 1 year ago
Yup, on a worker boot, we get the following on Redis 4.8:
Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead.(called from: /usr/local/bundle/gems/redis-namespace-1.9.0/lib/redis/namespace.rb:479:in `call_with_namespace')
@iloveitaly I will send you $20USD if you fix this issue.
@radar good to see your name pop up again :)
I'm so short on time—will merge a PR that fixes this, but don't have time to do this myself. Sorry!
Easy peasy :) See #217.
I don't think #217 has fully fixed this; I'm running 1.10.0 and still seeing this in my tests:
Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead.(called from: /usr/local/bundle/gems/redis-namespace-1.10.0/lib/redis/namespace.rb:558:in `wrapped_send')
We were seeing the deprecation notice after upgrading to 1.10.0 too. For those stumbling upon this: we fixed the issue by upgrading to v5 of the Redis gem, which doesn't have this deprecation notice.
Upgrading to v5 works but breaks ActionCable under rails 6. ActionCable.server.broadcast("foo", "bar")
leads to an error. How have others fixed it?
Upgrading to v5 works but breaks ActionCable under rails 6.
ActionCable.server.broadcast("foo", "bar")
leads to an error. How have others fixed it?
Curious what the error with AC was. We tried to bump to redis v5 and had intermittent Protocol errors https://github.com/redis/redis-rb/issues/1185
So I reverted and have been slowly trying to upgrade our redis/resque ecosystem to see when the issue is introduced.
You can count me among those running redis 4.8.1 and redis-namespace 1.10.0 and still seeing the deprecation warning
@Jakanapes deprecation warnings should be fixed in 1.11.0... but if not lemme know or if you want just pop a PR to cover them that's cool too.
This is still occurring for me, but it's tracing back to a different part of redis_namespace
Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead.(called from: /usr/local/Cellar/asdf/0.8.0/installs/ruby/3.2.1/lib/ruby/gems/3.2.0/gems/redis-namespace-1.11.0/lib/redis/namespace.rb:564:in `wrapped_send')
redis (4.8.1) redis-namespace (1.11.0)
seems to trace back to our use of the multi
method, which i've included (modifying the key/variable names for obscurity)
redis.multi do |r|
r.set key1, value1
r.expireat key1, expiration
r.set key2, value2
r.expireat key2, expiration
if value3
r.set key3, value3
r.expireat key3, expiration
end
end
I am using redis 4.8.0 and redis-namespace 1.9.0 and noticed this deprecation warning.