Bug 2196782

Summary: python-redis: test failures with redis 7.2rc2
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-redisAssignee: Fedora Infrastructure SIG <infra-sig>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: admiller, i, infra-sig, kevin, mhroncok, nathans, rcollet
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/python-redis
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tomáš Hrnčiar 2023-05-10 08:45:35 UTC
Description of problem:
Package python-redis fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
4.5.1-1.fc39

Steps to Reproduce:
koji build --scratch f39 python-redis-4.5.1-1.fc39.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-redis

Comment 1 Miro Hrončok 2023-06-15 17:00:30 UTC
This is blocking the Python 3.12 rebuild of Django.

Comment 2 Miro Hrončok 2023-06-29 09:54:03 UTC
I've tried updating the package, but no dice.

This seems to fail since redis update form 7.0 to 7.2rc2.

=================================== FAILURES ===================================
_________ TestRedisCommands.test_xinfo_consumers[single-python-parser] _________
self = <tests.test_asyncio.test_commands.TestRedisCommands object at 0x7fff8bd042d0>
r = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>
    @skip_if_server_version_lt("5.0.0")
    async def test_xinfo_consumers(self, r: redis.Redis):
        stream = "stream"
        group = "group"
        consumer1 = "consumer1"
        consumer2 = "consumer2"
        await r.xadd(stream, {"foo": "bar"})
        await r.xadd(stream, {"foo": "bar"})
        await r.xadd(stream, {"foo": "bar"})
    
        await r.xgroup_create(stream, group, 0)
        await r.xreadgroup(group, consumer1, streams={stream: ">"}, count=1)
        await r.xreadgroup(group, consumer2, streams={stream: ">"})
        info = await r.xinfo_consumers(stream, group)
        assert len(info) == 2
        expected = [
            {"name": consumer1.encode(), "pending": 1},
            {"name": consumer2.encode(), "pending": 2},
        ]
    
        # we can't determine the idle time, so just make sure it's an int
        assert isinstance(info[0].pop("idle"), int)
        assert isinstance(info[1].pop("idle"), int)
>       assert info == expected
E       AssertionError: assert [{'inactive':...'pending': 2}] == [{'name': b'c...'pending': 2}]
E         At index 0 diff: {'name': b'consumer1', 'pending': 1, 'inactive': 1} != {'name': b'consumer1', 'pending': 1}
E         Use -v to get more diff
tests/test_asyncio/test_commands.py:2661: AssertionError
__________ TestRedisCommands.test_xinfo_consumers[pool-python-parser] __________
self = <tests.test_asyncio.test_commands.TestRedisCommands object at 0x7fff8bd04050>
r = Redis<ConnectionPool<Connection<host=localhost,port=6379,db=9>>>
    @skip_if_server_version_lt("5.0.0")
    async def test_xinfo_consumers(self, r: redis.Redis):
        stream = "stream"
        group = "group"
        consumer1 = "consumer1"
        consumer2 = "consumer2"
        await r.xadd(stream, {"foo": "bar"})
        await r.xadd(stream, {"foo": "bar"})
        await r.xadd(stream, {"foo": "bar"})
    
        await r.xgroup_create(stream, group, 0)
        await r.xreadgroup(group, consumer1, streams={stream: ">"}, count=1)
        await r.xreadgroup(group, consumer2, streams={stream: ">"})
        info = await r.xinfo_consumers(stream, group)
        assert len(info) == 2
        expected = [
            {"name": consumer1.encode(), "pending": 1},
            {"name": consumer2.encode(), "pending": 2},
        ]
    
        # we can't determine the idle time, so just make sure it's an int
        assert isinstance(info[0].pop("idle"), int)
        assert isinstance(info[1].pop("idle"), int)
>       assert info == expected
E       AssertionError: assert [{'inactive':...'pending': 2}] == [{'name': b'c...'pending': 2}]
E         At index 0 diff: {'name': b'consumer1', 'pending': 1, 'inactive': 0} != {'name': b'consumer1', 'pending': 1}
E         Use -v to get more diff
tests/test_asyncio/test_commands.py:2661: AssertionError

Comment 3 Miro Hrončok 2023-07-01 21:23:23 UTC
I've deselected the failing tests to unblock the Python 3.12 rebuild.

Comment 4 Miro Hrončok 2023-07-02 12:53:15 UTC
Upstream report: https://github.com/redis/redis-py/issues/2825

Comment 5 Fedora Release Engineering 2023-08-16 07:14:06 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.