Skip to content

feat(python): expose consumer group create and get APIs#3581

Open
WaterWhisperer wants to merge 2 commits into
apache:masterfrom
WaterWhisperer:feat/python-consumer-group-management
Open

feat(python): expose consumer group create and get APIs#3581
WaterWhisperer wants to merge 2 commits into
apache:masterfrom
WaterWhisperer:feat/python-consumer-group-management

Conversation

@WaterWhisperer

Copy link
Copy Markdown
Contributor

Which issue does this PR address?

Relates to #3522

Rationale

The Python SDK should expose the first consumer group management APIs requested in the issue.

What changed?

The Python SDK only exposed consumer_group(...) as a high-level consumer helper, so Python users could not directly create or inspect consumer groups.

This exposes create_consumer_group, get_consumer_group, and get_consumer_groups, adds the required PyO3 DTO wrappers and generated stubs, and covers create/get, lookup, missing, and list behavior in test_consumer_group.py.

Local Execution

  • Passed
  • Pre-commit hooks ran

AI Usage

  1. Tools: Codex
  2. Scope: issue analysis, test refinement
  3. Verification: Python SDK test suite
  4. Yes

@github-actions

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Jun 29, 2026
@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.56198% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.08%. Comparing base (307fdb1) to head (b292803).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
foreign/python/src/consumer.rs 85.24% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3581      +/-   ##
============================================
+ Coverage     74.07%   74.08%   +0.01%     
  Complexity      937      937              
============================================
  Files          1249     1249              
  Lines        128248   128369     +121     
  Branches     104116   104116              
============================================
+ Hits          94994    95108     +114     
- Misses        30219    30226       +7     
  Partials       3035     3035              
Components Coverage Δ
Rust Core 74.71% <ø> (ø)
Java SDK 62.44% <ø> (ø)
C# SDK 72.06% <ø> (ø)
Python SDK 89.74% <92.56%> (+0.85%) ⬆️
PHP SDK 84.29% <ø> (ø)
Node SDK 91.35% <ø> (ø)
Go SDK 40.14% <ø> (ø)
Files with missing lines Coverage Δ
foreign/python/src/client.rs 98.57% <100.00%> (+0.95%) ⬆️
foreign/python/src/lib.rs 100.00% <100.00%> (ø)
foreign/python/src/consumer.rs 79.62% <85.24%> (+1.68%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@slbotbm slbotbm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Took a quick look. Other than the comments, I would like you to look at #3572 and add docs for all of the functions you have added in the way that docs have been written there. The ways of testing your code are also not really enough, so I would like you to take a look at how the code is being tested there, and in general in the sdk, and come up with more patterns. When creating tests, with regards to assertions, there are two things to keep in mind:

  • Assert all of the things you give as user input
  • Assert all of the fields that the server sets deterministically and are stable across runs.

Once these are addressed, I'll review more thoroughly.

Comment thread foreign/python/src/consumer_group.rs Outdated
Comment thread foreign/python/src/consumer_group.rs Outdated
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Jun 29, 2026
@WaterWhisperer

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants