fix(aiokafka): keep Faust assignor for changelog tables; drop Python 3.9#682
Open
wbarnha wants to merge 4 commits into
Open
fix(aiokafka): keep Faust assignor for changelog tables; drop Python 3.9#682wbarnha wants to merge 4 commits into
wbarnha wants to merge 4 commits into
Conversation
added 2 commits
July 17, 2026 03:14
…min request compatibility Ensure worker consumers use the Faust assignor whenever changelog tables are present, even with zero standby replicas, so table recovery mapping remains correct. Also update metadata/create-topics request construction for newer aiokafka APIs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #682 +/- ##
==========================================
- Coverage 94.10% 94.06% -0.04%
==========================================
Files 102 102
Lines 11107 11108 +1
Branches 1198 1198
==========================================
- Hits 10452 10449 -3
- Misses 556 558 +2
- Partials 99 101 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The new MetadataRequest([]) / CreateTopicsRequest(...) forms require the aiokafka 0.13.0 protocol refactor; on aiokafka < 0.13 MetadataRequest is a versioned list (not callable) and CreateTopicsRequest must be indexed by version. Faust keeps its aiokafka>=0.10 floor and already branches on _AIOKAFKA_HAS_API_VERSION, so use the version-appropriate form at both call sites instead of the new one unconditionally: - _get_controller_node: MetadataRequest_v1([]) on <0.13, MetadataRequest([]) on >=0.13 - _really_create_topic: CreateTopicsRequest[1](...) on <0.13, CreateTopicsRequest(...) on >=0.13 This also fixes master's latent breakage where CreateTopicsRequest[version] already fails on aiokafka 0.13+. Also drop a duplicate _AIOKAFKA_HAS_API_VERSION definition introduced by the rebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Rebases #676 (by @Mopsgeschwindigkeit / Marco Moser) onto current master. #676's branch could not be updated in place (external fork), so this re-applies its two commits — authorship preserved — on top of the merged #674/#677/#679/#680 work, where they apply cleanly and lint green.
Supersedes #676.
What's here (unchanged from #676)
Keep the Faust assignor when changelog tables exist. Table recovery relies on
app.assignorto map changelog active/standby partitions, but the worker consumer only used the Faust assignor whentable_standby_replicas > 0. It now also stays enabled whenever the app has changelog tables:Covered by two new unit tests (round-robin without tables; Faust assignor with changelog topics).
aiokafka 0.13+ admin-request compatibility:
MetadataRequest_v1→MetadataRequest, andCreateTopicsRequest[protocol_version]→CreateTopicsRequest.Drops Python 3.9 (and pypy3.9) support, bumping
requires-pythonto>=3.10acrosspyproject.toml/setup.py/tox.iniand the CI matrix. This is an intentional support-policy change.Verification
faust/__init__.py/aerospike.pylint hunks from fix(aiokafka): keep Faust assignor for changelog tables and update admin request compatibility #676 were already landed via Fix CI lint formatting drift in tests and aerospike store #677, so they no-op'd).tests/unit/transport/drivers/test_aiokafka.py: 136 passed, 23 skipped (the +2 vs master are the new assignor tests).Credit: original commits by Marco Moser (@Mopsgeschwindigkeit), smaxtec.
Generated by Claude Code