redis / redis-rb

A Ruby client library for Redis
MIT License
3.98k stars 1.03k forks source link

Add support for Redis 6.2 #978

Open rhymes opened 3 years ago

rhymes commented 3 years ago

Redis 6.2 has officially been released, its release notes contain quite a few new commands, improvements and some changes in behavior.

I'm new to this library but I'm willing to help. I'd imagine the first step is to add Redis 6.2 to the GitHub test actions and have the existing tests pass before starting to tackle new things.

I opened a "general" issue, but I guess this should be then split into separate issues/PRs for new commands and features.

This for example is list of new commands:

Here is a comprehensive list of changes in this release compared to 6.0.9,
each one includes the PR number that added it, so you can get more details
at https://github.com/redis/redis/pull/<number>

New commands / args:
* Add SMISMEMBER command that checks multiple members (#7615)
* Add ZMSCORE command that returns an array of scores (#7593)
* Add LMOVE and BLMOVE commands that pop and push arbitrarily (#6929)
* Add RESET command that resets client connection state (#7982)
* Add COPY command that copies keys (#7953)
* Add ZDIFF and ZDIFFSTORE commands (#7961)
* Add ZINTER and ZUNION commands (#7794)
* Add GEOSEARCH/GEOSEARCHSTORE commands for bounding box spatial queries (#8094)
* Add GET parameter to SET command, for more powerful GETSET (#7852)
* Add exclusive range query to XPENDING (#8130)
* Add exclusive range query to X[REV]RANGE (#8072)
* Add GT and LT options to ZADD for conditional score updates (#7818)
* Add CLIENT INFO and CLIENT LIST for specific ids (#8113)
* Add IDLE argument to XPENDING command (#7972)
* Add local address to CLIENT LIST, and a CLIENT KILL filter. (#7913)
* Add NOMKSTREAM option to XADD command (#7910)
* Add command introspection to Sentinel (#7940)
* Add SENTINEL MYID subcommand (#7858)
* Add the REV, BYLEX and BYSCORE arguments to ZRANGE, and the ZRANGESTORE command (#7844)
* Add the XAUTOCLAIM command (#7973)
* Add the MINID trimming strategy and the LIMIT argument to XADD and XTRIM (#8169)
* Add the ANY argument to GEOSEARCH and GEORADIUS (#8259)
* Add the CH, NX, XX arguments to GEOADD (#8227)
* Add the COUNT argument to LPOP and RPOP (#8179)
* Add the WRITE argument to CLIENT PAUSE for pausing write commands exclusively (#8170)
* Change the proto-ver argument of HELLO to optional (#7377)
* Add the CLIENT TRACKINGINFO subcommand (#7309)
* Add HRANDFIELD and ZRANDMEMBER commands (#8297)
* Add FAILOVER command (#8315)
* Add GETEX, GETDEL commands (#8327)
* Add PXAT/EXAT arguments to SET command (#8327)
* Add SYNC arg to FLUSHALL and FLUSHDB, and ASYNC/SYNC arg to SCRIPT FLUSH (#8258)

The list of new features:

New features:

* Dump payload sanitization: prevent corrupt payload causing crashes (#7807)
  Has flags to enable full O(N) validation (disabled by default).
* ACL patterns for Pub/Sub channels (#7993)
* Support ACL for Sentinel mode (#7888)
* Support getting configuration from both stdin and file at the same time (#7893)
  Lets you avoid storing secrets on the disk.

There's much more, detailed in the long release notes.

I'll begin by sending a PR to add 6.2 to the test matrix

rhymes commented 3 years ago

Adding this list so it's easier to keep track of what's done and what is missing:

New commands / args:

New features:

alexmreis commented 3 years ago

@rhymes You can check off XAUTOCLAIM #1018 .

So are we waiting until all of these have been implemented before releasing a new version of the gem? Does the gem version follow the Redis version it supports?

rhymes commented 3 years ago

@alexmreis checked! For the rest, I am not sure :) I'm not a maintainer, I just opened this issue ticket to keep track of all the new changes

byroot commented 3 years ago

So are we waiting until all of these have been implemented before releasing a new version of the gem?

No. Releases happens when there's enough features to justify it, or when there's an important bugfix.

Other Redis 6.2 commands will be supported when someone submit a PR for them, or if I somehow I get time to do it myself.

Does the gem version follow the Redis version it supports?

Nope.

combrs commented 2 years ago

Are there support for "Support ACL for Sentinel mode" ? In doc I see "If you want to authenticate Sentinel itself, you must specify the password option per instance." - but it uses only "password" field, and do not support "user-password" login as configured by ACL ?

byroot commented 2 years ago

do not support "user-password" login as configured by ACL ?

It does, it's not shown in the readme, but it accepts it as username: https://github.com/redis/redis-rb/blob/4724c1bfde2d5679128ced8ec7b46bac66605b7b/lib/redis/client.rb#L615

combrs commented 2 years ago

It does, it's not shown in the readme, but it accepts it as username:

Thanks. it works. Could you mention it in readme?

byroot commented 2 years ago

Could you mention it in readme?

PR welcome.