Repository navigation
Expect the prefetch reduction to be skipped under per-consumer QoS - #10682
Conversation
Kombu 5.7 reports per-consumer QoS for RabbitMQ 4, and the worker skips the prefetch-count reduction after a connection restart in that mode (celery#9512), so the consumer smoke tests that expect the reduction and the gradual restore fail against rabbitmq:latest. Decide the expectation the same way Tasks.qos_global() does and expect the skip message under per-consumer QoS; the original assertions stay in place for brokers that still use global QoS.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10682 +/- ##
=======================================
Coverage 89.28% 89.28%
=======================================
Files 153 153
Lines 20391 20391
Branches 2430 2430
=======================================
Hits 18206 18206
Misses 1881 1881
Partials 304 304
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
|
just curious why the chord related tests are also green here? are the related? |
|
@auvipy Not related, this only touches test_consumer.py. The chord failure is a race between the chord error handler's FAILURE write and the revoke broadcast's REVOKED write, so it doesn't show up every run: it hit 1 of the 20 test_canvas jobs on #10677's run, 0 of 20 on main after the merge, and 0 of 20 here, while locally it failed 5 out of 5 runs. #10679 removes the race. |
|
OK cool |
Since the Kombu 5.7.0a1 bump (#10677),
t/smoke/tests/test_consumer.pyfails onrabbitmq:latestin six cases:test_reducing_prefetch_count[rabbitmq-1..5]andtest_prefetch_count_restored[rabbitmq]. Kombu 5.7 reports per-consumer QoS for RabbitMQ 4 (celery/kombu#2481), and in that mode the worker skips the prefetch-count reduction after a connection restart (#9512), so the "Temporarily reducing…" and "restored to the maximum" log lines the tests wait for never appear.This makes the expectation conditional on the QoS mode, decided the same way
Tasks.qos_global()decides it (not connection.qos_semantics_matches_spec): under per-consumer QoS the tests expect the "Skipping prefetch count reduction after connection restart" log; under global QoS the existing assertions run unchanged.Verified locally against
rabbitmq:latest(4.3.5): the whole module passes with Kombu 5.7.0a1 (10 passed, the 8 pre-existing Redis xfails unchanged), the six cases going through the skip branch, andtest_reducing_prefetch_count[rabbitmq-2]andtest_prefetch_count_restored[rabbitmq]still pass through the global branch on a tree pinned to Kombu 5.6.2.Background in #10679; this keeps that PR on the revoke fix only, as requested.