aio-libs / aiokafka

asyncio client for kafka
http://aiokafka.readthedocs.io/
Apache License 2.0
1.08k stars 224 forks source link

Fix unintended cancellation of fetcher task #1007

Closed apmorton closed 1 month ago

apmorton commented 1 month ago

Changes

Fixes #983

It's not entirely clear to me why the change from asyncio.wait_for to util.wait_for caused a behavior change here, but this code was always broken in the case where task.cancel() was called.

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.04%. Comparing base (c759664) to head (4c40f19).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1007 +/- ## ======================================= Coverage 95.04% 95.04% ======================================= Files 114 114 Lines 16917 16918 +1 Branches 2757 2758 +1 ======================================= + Hits 16079 16080 +1 Misses 493 493 Partials 345 345 ``` | [Flag](https://app.codecov.io/gh/aio-libs/aiokafka/pull/1007/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | Coverage Δ | | |---|---|---| | [cext](https://app.codecov.io/gh/aio-libs/aiokafka/pull/1007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `91.96% <100.00%> (+<0.01%)` | :arrow_up: | | [integration](https://app.codecov.io/gh/aio-libs/aiokafka/pull/1007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `94.69% <100.00%> (+<0.01%)` | :arrow_up: | | [purepy](https://app.codecov.io/gh/aio-libs/aiokafka/pull/1007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `94.52% <100.00%> (+<0.01%)` | :arrow_up: | | [unit](https://app.codecov.io/gh/aio-libs/aiokafka/pull/1007/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `52.77% <0.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.