aio-libs / aiokafka

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

Implement KIP-204 : DeleteRecords API #969

Closed vmaurin closed 5 months ago

vmaurin commented 5 months ago

When doing stream processing, it is convinient to use "transient" topic :

The java kafka streams client is using the deleteRecords of the admin client to perform this operation. It is lacking in aiokafka

The KIP reference https://cwiki.apache.org/confluence/display/KAFKA/KIP-204+%3A+Adding+records+deletion+operation+to+the+new+Admin+Client+API

refs #967

Changes

Fixes #967

Checklist

codecov[bot] commented 5 months ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (f8d0d15) 95.06% compared to head (1395718) 95.03%.

Files Patch % Lines
aiokafka/admin/client.py 75.86% 4 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #969 +/- ## ========================================== - Coverage 95.06% 95.03% -0.03% ========================================== Files 106 107 +1 Lines 16332 16408 +76 Branches 2610 2624 +14 ========================================== + Hits 15526 15594 +68 - Misses 532 536 +4 - Partials 274 278 +4 ``` | [Flag](https://app.codecov.io/gh/aio-libs/aiokafka/pull/969/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/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `91.74% <91.25%> (-0.02%)` | :arrow_down: | | [integration](https://app.codecov.io/gh/aio-libs/aiokafka/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `94.68% <91.25%> (-0.03%)` | :arrow_down: | | [purepy](https://app.codecov.io/gh/aio-libs/aiokafka/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `94.49% <91.25%> (-0.04%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/aio-libs/aiokafka/pull/969/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aio-libs) | `44.91% <53.75%> (+0.03%)` | :arrow_up: | 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.

ods commented 5 months ago

@vmaurin I think it's ready to merge, no objections?

vmaurin commented 5 months ago

@ods Sure, thank you for fixing my mistake :+1: