Strech/sidekiq-prometheus-exporter

redis-namespace endless warnings

Closed this issue · 8 comments

Hi @Strech,

First of all, thanks for this great project, really appreciate your work here!
Second, we started to use the out of the box docker you provided, but on our production env
we are seeing endless amount of warnings about that Redis#exists(key) will return an Integer in redis-rb 4.3 .

As part of my investigation, it seems that redis-namespace gem is the root cause for those warnings and
it seems that it was already fixed. Is there any chance to update the version of redis-namepspace to the latest one 1.8.1?

Sources:

  1. Sidekiq issue describing the warning message.
  2. The fix redis-namespace pushed.
  3. The latest version of redis-namespace.
  4. redis-namespace version on docker file that I wish we can change.

Our logs with the warnings:
Screen Shot 2021-03-22 at 17 03 24

Hey @RanAbram, thanks for your kind words, I appreciate it 🙏

I have a bit of a trouble with my laptop, but I will try to update redis-namespace this week and release a new Docker image.

Thanks for rising the issue 💚

Hola @RanAbram, finally I get my laptop situation resolved. Feel free to use the latest image (0.1.15-2) with updated redis-namespace gem.

docker pull strech/sidekiq-prometheus-exporter:0.1.15-2

Thanks man, will try it later on :)

@Strech This seems to still be happening in the latest version of the image (0.1.15-2) Perhaps we should reopen this issue?

$ kubectl logs -f deployment/sidekiq-prometheus
`Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead.
To opt-in to the new behavior now you can set Redis.exists_returns_integer =  true. To disable this message
and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this
option will be removed in 5.0. (/usr/local/bundle/gems/sidekiq-5.2.8/lib/sidekiq/api.rb:907:in `block (3 levels) in each')

Hey @scottcrossen, can you show me gems + ruby version in your deployment/sidekiq-prometheus, like gem list --local and ruby -v, I just want to be sure that we are on the same page

@Strech Sorry just saw this!

benchmark (default: 0.1.0)
bigdecimal (default: 2.0.0)
bundler (default: 2.1.4)
cgi (default: 0.1.0)
connection_pool (2.2.3)
csv (default: 3.1.2)
date (default: 3.0.0)
dbm (default: 1.1.0)
delegate (default: 0.1.0)
did_you_mean (default: 1.4.0)
etc (default: 1.1.0)
fcntl (default: 1.0.0)
fiddle (default: 1.0.0)
fileutils (default: 1.4.1)
forwardable (default: 1.3.1)
gdbm (default: 2.1.0)
getoptlong (default: 0.1.0)
io-console (default: 0.5.6)
ipaddr (default: 1.2.2)
irb (default: 1.2.3)
json (default: 2.3.0)
logger (default: 1.4.2)
matrix (default: 0.2.0)
minitest (5.13.0)
mutex_m (default: 0.1.0)
net-pop (default: 0.1.0)
net-smtp (default: 0.1.0)
net-telnet (0.2.0)
observer (default: 0.1.0)
open3 (default: 0.1.0)
openssl (default: 2.1.2)
ostruct (default: 0.2.0)
power_assert (1.1.7)
prime (default: 0.1.1)
pstore (default: 0.1.0)
psych (default: 3.1.0)
racc (default: 1.4.16)
rack (2.0.9)
rack-protection (2.1.0)
rake (13.0.1)
rdoc (default: 6.2.1)
readline (default: 0.0.2)
readline-ext (default: 0.1.0)
redis (4.2.5)
redis-namespace (1.8.1)
reline (default: 0.1.3)
rexml (default: 3.2.3)
rss (default: 0.2.8)
sdbm (default: 1.0.0)
sidekiq (5.2.8)
sidekiq-prometheus-exporter (0.1.15)
singleton (default: 0.1.0)
stringio (default: 0.1.0)
strscan (default: 1.0.3)
test-unit (3.3.4)
timeout (default: 0.1.0)
tracer (default: 0.1.0)
uri (default: 0.10.0)
webrick (default: 1.6.0)
xmlrpc (0.3.0)
yaml (default: 0.1.0)
zlib (default: 1.1.0)

(which does have v1.8.1 of redis-namespace)

ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux-musl]

@RanAbram do you still have these errors after upgrading to the latest image?

@scottcrossen Sorry for a long silence, I will take a look this week, was a bit busy 😵

Thanks to everyone for re-rising this issue @scottcrossen @RanAbram. The problem was with a redis-rb gem (wth version > 4.2.0) and all the other gems which depend on it.

As the result, I've updated not only redis-namespace, but also sidekiq gem. As an additional bonus ruby was bumped to the version 2.7.3

You can pull updated image with tag 0.1.15-3

docker pull strech/sidekiq-prometheus-exporter:0.1.15-3

UPD: The code is not pushed yet as the Helm package, but will be by tomorrow ✌️