Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: aiokafka 0.11.0 error when creating topics #631

Merged

Conversation

somnam
Copy link
Contributor

@somnam somnam commented Jul 9, 2024

Note: Before submitting this pull request, please review our contributing
guidelines
.

Description

Please note this build wasn't verified on an example Faust app.

Aiokafka introduced build_request_header and parse_response_header calls in conn.py module in 0.11.0 release:
aio-libs/aiokafka@a244a5f#diff-60fe72976f73ef2b8b881a26cc5d9e002c465e7b1b7f1b83e0be07c672a66e0e

Use CreateTopicsRequest from aiokafka.protocol.admin module instead of faust.utils.kafka.
Remove faust.utils.kafka module containing what looks like older version of code from aiokafka.protocol.admin.

Fixes #630

AttributeError: 'CreateTopicsRequest_v1' object has no attribute 'build_request_header'

NOTE: All patches should be made against master, not a maintenance branch like
3.1, 2.5, etc. That is unless the bug is already fixed in master, but not in
that version series.

If it fixes a bug or resolves a feature request,
be sure to link to that issue via (Fixes #4412) for example.

@somnam somnam marked this pull request as ready for review July 9, 2024 16:55
Copy link
Member

@wbarnha wbarnha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I've been wanting to move a lot of Kafka internals to be more dependent on aiokafka since the project is in a more developed state than when Faust was originally made.

Also, thank you for updating the test to accommodate your change! Looks all good here, and I'll approve it. https://github.com/aio-libs/aiokafka/blob/199537bb02177ff935ccdefa2b44615214024a0f/aiokafka/protocol/admin.py#L201 is analogous to the original implementation in Faust, so this is a safe merge.

@wbarnha
Copy link
Member

wbarnha commented Jul 10, 2024

The distutils issue will be handled in a separate PR.

@wbarnha wbarnha merged commit 02ff777 into faust-streaming:master Jul 10, 2024
16 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when creating a topic using aiokafka 0.11.0
2 participants