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

Support for redis 7.0.0? #2153

Closed
major opened this issue Apr 28, 2022 · 5 comments
Closed

Support for redis 7.0.0? #2153

major opened this issue Apr 28, 2022 · 5 comments

Comments

@major
Copy link

major commented Apr 28, 2022

Version: redis-py 4.2.2 and redis 7.0.0

Platform: Fedora Linux rawhide (future 37 release)

Description: Many tests fail on redis 7 systems due to two main reasons:

Nearly everything in test_function.py fails with: redis.exceptions.ResponseError: Unknown option given: Lua
Many other tests fail with issues around DEBUG commands.

You can find a detailed log of the redis 7 test failures here: https://kojipkgs.fedoraproject.org//work/tasks/7767/86367767/build.log

@dvora-h
Copy link
Collaborator

dvora-h commented May 4, 2022

Hi @major, thanks for reporting your issue!

The reason that almost all function tests fail is that FUNCTION LOAD has changed from redis 7.0.0-rc3 to redis 7.0.0, we have already fixed it (#2139) and will release a new version that include the fix next week (meanwhile you can use it from master).

About the DEBUG command - DEBUG and MODULE commands disabled by default in redis 7 (for better security), you can find here more information about this and how you can enable them.

@major
Copy link
Author

major commented May 4, 2022

@dvora-h Ah, thanks for that. I'll keep an eye out for the new release.

Thanks for the link to the DEBUG instructions. I was Googling like crazy but I kept coming up empty handed. 🙃 It looks like this is what I was missing: https://github.com/redis/redis/blob/unstable/tests/assets/default.conf

@mgorny
Copy link
Contributor

mgorny commented May 9, 2022

Thanks for the DEBUG suggestion. Unfortunately, with redis-py 4.3.0 I still have some other test failures. In particular, many tests seem to be failing due to bytes/str mismatch, e.g.:

_____________________________________________________ TestRedisCommands.test_lcs ______________________________________________________

self = <tests.test_commands.TestRedisCommands object at 0x7f320e3c97e0>
r = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>

    @pytest.mark.onlynoncluster
    @skip_if_server_version_lt("7.0.0")
    def test_lcs(self, r):
        r.mset({"foo": "ohmytext", "bar": "mynewtext"})
>       assert r.lcs("foo", "bar") == "mytext"
E       AssertionError: assert b'mytext' == 'mytext'
E        +  where b'mytext' = <bound method BasicKeyCommands.lcs of Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>>('foo', 'bar')
E        +    where <bound method BasicKeyCommands.lcs of Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>> = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>.lcs

r          = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>
self       = <tests.test_commands.TestRedisCommands object at 0x7f320e3c97e0>

tests/test_commands.py:1099: AssertionError

I also see some failures that seem to be caused by some extra data in xinfo, e.g.:

>       assert await r.xinfo_groups(stream) == expected                                                                                
E       AssertionError: assert [{'consumers': 0,\n  'entries-read': None,\n  'lag': 0,\n  'last-delivered-id': b'0-0',\n  'name': b'gro
up',\n  'pending': 0}] == [{'consumers': 0, 'last-delivered-id': b'0-0', 'name': b'group', 'pending': 0}]                              
E         At index 0 diff: {'name': b'group', 'consumers': 0, 'pending': 0, 'last-delivered-id': b'0-0', 'entries-read': None, 'lag': 0
} != {'name': b'group', 'consumers': 0, 'pending': 0, 'last-delivered-id': b'0-0'}                                                     
E         Full diff:                                                                                                                   
E           [                                                                                                                          
E            {'consumers': 0,                                                                                                          
E         +   'entries-read': None,
E         +   'lag': 0,
E             'last-delivered-id': b'0-0',
E             'name': b'group',
E             'pending': 0},
E           ]

Full log:
dev-python:redis-py-4.3.0:20220509-092559.log

@bnavigator
Copy link

FTR, here is another similar log on openSUSE Tumbleweed with redis-py 4.3.1 and redis 7.0.0:

openSUSE_redis-py-redis7-rpmbuildlog.txt

@dvora-h dvora-h mentioned this issue May 16, 2022
6 tasks
@dvora-h
Copy link
Collaborator

dvora-h commented Jul 19, 2022

Closes because it was fixed in #2182

@dvora-h dvora-h closed this as completed Jul 19, 2022
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

4 participants