Closed billybonks closed 1 day ago
This issue is more likely to be with the Ruby version, but 4.x is EOL.
@byroot i just updated ruby from 3.3.4 -> 3.3.6 and the issue continues to persist
My point was that your Ruby was too new, not too old.
Anyway, you should upgrade to redis-rb
5.x, I'm no longer doing anything with 4.x.
absolutely this is the blocker to upgrading to version 5.x, trying to overcome this error to upgrade. this was working fine on 4.x so why would updating to 5.x but leaving the version the same cause the error? i blamed as many parts of the code involved and they have not changed in 2years
Wait, this error is on 5.x? You initial report wasn't clear at all.
when debugging in the hashify lambda I can see that the value for value is
{"token"=>"asdf"}
How are you instantiating Redis
, this suggest you are passing protocol: 3
, which you shouldn't.
no worries, sorry about the clarity
I am using protocol 3, based on what you are saying sounds like support for this in v4.x was unintentional and 5.x fixed that unintentionally.
The reason why I am using protocol 3 is because sidekiq required it with its latest major version
The reason why I am using protocol 3 is because sidekiq required it with its latest major version
It's entirely orthogonal. Sidekiq uses it's own pool of raw redis-client
instances. Just remove protocol: 3
and you'll be fine.
👍🏿 that does fix the issue thanks, and thanks for the swift responses.
I have a few questions
Does this lib only intend support for RESP2 and are there any reasons (I have not looked into the difference between the two just assume newer is better 😆
Are you open to a pr that throws an error when resp3 is used? so this does not happen to others as well.
- Does this lib only intend support for RESP2
Yes.
are there any reasons
Mostly lack of interest, and lots of work for little gain. One would need to go over all the methods and make sure they do the right thing. Some of the casting is centralized so might not be as bad as I expect, but I don't see much value.
Are you open to a pr that throws an error when resp3 is used?
Yes, the argument should be rejected. PR welcome.
A bit late with this report, given that the 5.0 compatibility issue is closed.
I am currently using 4.8.1
the following code throws
ArgumentError: element has wrong array length (expected 2, was 1)
atredis/commands.rb:59
https://github.com/redis/redis-rb/blob/master/lib/redis/commands.rb#L59when debugging in the hashify lambda I can see that the value for
value
is{"token"=>"asdf"}
I have tried the earliest and the latest version of redis-rb and I get the same effect
I am using redis_version:7.2.6