Bug 2196782 - python-redis: test failures with redis 7.2rc2
Summary: python-redis: test failures with redis 7.2rc2
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-redis
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Infrastructure SIG
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-10 08:45 UTC by Tomáš Hrnčiar
Modified: 2023-10-03 00:18 UTC (History)
7 users (show)

Fixed In Version: python-redis-5.0.1-1.fc39
Clone Of:
Environment:
Last Closed: 2023-10-03 00:18:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redis redis-py issues 2825 0 None open Redis 7.2 breaks TestRedisCommands.test_xinfo_consumers 2023-07-02 12:53:15 UTC

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.

Comment 6 Fedora Update System 2023-09-28 15:08:01 UTC
FEDORA-2023-aade7c1245 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-aade7c1245

Comment 7 Fedora Update System 2023-09-29 02:53:07 UTC
FEDORA-2023-aade7c1245 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-aade7c1245`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-aade7c1245

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-10-03 00:18:56 UTC
FEDORA-2023-aade7c1245 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.