You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Drop the DR suite's CancelledError workaround once aiokafka fixes Fetcher.close() #116
Blocked upstream by aio-libs/aiokafka#1210. Nothing to do until a released aiokafka contains a fix.
Background
aiokafka 0.14.0's AIOKafkaConsumer.stop() raises asyncio.CancelledError when it is called while no broker is reachable. Fetcher.close() cancels each pending fetch task and then awaits it without suppressing the cancellation, and a fetch task that is sleeping in its retry backoff ends with CancelledError. The upstream issue has the details and a standalone repro.
This library's code is not affected: it never calls broker.stop(). The DR suite added in #114 does. Its shutdown-during-outage scenario in tests_dr/test_dr.py catches CancelledError around broker.stop() so the scenario can go on to check redelivery after the cluster comes back.
What to do once aiokafka ships a fix
Confirm uv.lock resolves to an aiokafka release that contains the fix.
In tests_dr/test_dr.py, catch Exception only around broker.stop() in the shutdown-during-outage scenario, and delete the comment that points at the aiokafka bug.
Run just test-dr and check that the scenario passes with broker_stop_error reported as None.
The upstream fix is in review as aio-libs/aiokafka#1211. Once a release includes it, raise the aiokafka floor and remove the DR suite's CancelledError tolerance.
The fix, aio-libs/aiokafka#1211, remains open and unmerged. aiokafka 0.15.0 has shipped, but does not contain it. Keep the DR suite's CancelledError workaround until a released version includes the fix.
Activity
test: point the CancelledError workaround at #116
test: point the CancelledError workaround at #116
test: opt-in broker-failure suite (just test-dr) (#114)
lesnik512 commentedon Oct 28, 2026
The upstream fix is in review as aio-libs/aiokafka#1211. Once a release includes it, raise the aiokafka floor and remove the DR suite's CancelledError tolerance.
lesnik512 commentedon Nov 4, 2026
Checked 2026-11-04: still blocked.
The fix, aio-libs/aiokafka#1211, remains open and unmerged. aiokafka 0.15.0 has shipped, but does not contain it. Keep the DR suite's
CancelledErrorworkaround until a released version includes the fix.