Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Limit redis-py <5.1.0 #2132

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Limit redis-py <5.1.0 #2132

merged 1 commit into from
Oct 1, 2024

Conversation

Nusnus
Copy link
Member

@Nusnus Nusnus commented Oct 1, 2024

Fixes

=================================== FAILURES ===================================
________________ test_Channel.test_global_keyprefix_transaction ________________

self = <t.unit.transport.test_redis.test_Channel object at 0x7fbcf2ae00b0>
mock_execute_command = <MagicMock name='execute_command' id='140449180741568'>

    @patch("redis.client.Pipeline.execute_command")
    def test_global_keyprefix_transaction(self, mock_execute_command):
        from kombu.transport.redis import PrefixedStrictRedis
    
        with Connection(transport=Transport) as conn:
            def pipeline(transaction=True, shard_hint=None):
                pipeline_obj = original_pipeline(
                    transaction=transaction, shard_hint=shard_hint
                )
                mock_execute_command.side_effect = [
                    None, None, pipeline_obj, pipeline_obj
                ]
                return pipeline_obj
    
            client = PrefixedStrictRedis(global_keyprefix='foo_')
            original_pipeline = client.pipeline
            client.pipeline = pipeline
    
            channel = conn.channel()
            channel._create_client = Mock()
            channel._create_client.return_value = client
    
            channel.qos.restore_by_tag('test-tag')
            assert mock_execute_command is not None
>           assert mock_execute_command.mock_calls == [
                call('WATCH', 'foo_unacked'),
                call('HGET', 'foo_unacked', 'test-tag'),
                call('ZREM', 'foo_unacked_index', 'test-tag'),
                call('HDEL', 'foo_unacked', 'test-tag')
            ]
E           AssertionError: assert [call('WATCH'..., 'test-tag')] == [call('WATCH'..., 'test-tag')]
E             
E             At index 1 diff: call('HGET', 'foo_unacked', 'test-tag', keys=['unacked']) != call('HGET', 'foo_unacked', 'test-tag')
E             
E             Full diff:
E             - [
E             -     call('WATCH', 'foo_unacked'),
E             ? ^^^^...
E             
E             ...Full output truncated (14 lines hidden), use '-vv' to show

t/unit/transport/test_redis.py:1329: AssertionError
=============================== warnings summary ===============================
.tox/3.12-unit/lib/python3.12/site-packages/coverage/inorout.py:457
  /home/runner/_work/kombu/kombu/.tox/3.12-unit/lib/python3.12/site-packages/coverage/inorout.py:457: CoverageWarning: --include is ignored because --source is set (include-ignored)
    self.warn("--include is ignored because --source is set", slug="include-ignored")

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
SKIPPED [1] t/unit/transport/test_librabbitmq.py:7: could not import 'librabbitmq': No module named 'librabbitmq'
SKIPPED [1] t/unit/test_connection.py:117: TODO: urllib cannot parse ipv6 urls
SKIPPED [1] t/unit/transport/test_pyro.py:30: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:67: requires running Pyro nameserver and Kombu Broker
SKIPPED [1] t/unit/transport/test_pyro.py:89: requires running Pyro nameserver and Kombu Broker
SKIPPED [164] t/unit/transport/test_qpid.py: Not supported in Python3
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
============ 1 failed, 915 passed, 169 skipped, 1 warning in 16.93s ============
3.12-unit: 44967 C exit 1 (18.81 seconds) /home/runner/_work/kombu/kombu> python -bb -m pytest -rxs -xv --cov=kombu --cov-report=xml --no-cov-on-fail --cov-report term pid=4131 [tox/execute/api.py:286]
.pkg: 44967 D delete package /home/runner/_work/kombu/kombu/.tox/.tmp/package/1/kombu-5.4.2.tar.gz [tox/tox_env/python/virtual_env/package/pyproject.py:224]
  3.12-unit: FAIL code 1 (44.78=setup[25.98]+cmd[18.81] seconds)
  evaluation failed :( (44.88 seconds)
Error: Process completed with exit code 1.

@Nusnus Nusnus self-assigned this Oct 1, 2024
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.33%. Comparing base (74779a8) to head (0c58875).
Report is 43 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2132   +/-   ##
=======================================
  Coverage   80.33%   80.33%           
=======================================
  Files          75       75           
  Lines        9121     9121           
  Branches     1348     1348           
=======================================
  Hits         7327     7327           
  Misses       1600     1600           
  Partials      194      194           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nusnus Nusnus marked this pull request as ready for review October 1, 2024 12:04
@Nusnus Nusnus merged commit 225da08 into celery:main Oct 1, 2024
37 checks passed
@Nusnus Nusnus deleted the hotfix branch October 1, 2024 12:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant