Repository navigation
feat(python): return details from topic and consumer group creation - #5104
cryptus-neoxys wants to merge 1 commit into
Conversation
create_topic and create_consumer_group discarded the details the server returned and resolved to None, while create_stream and create_user already returned theirs. Both methods now return TopicDetails and ConsumerGroupDetails, and the create tests assert the returned type and a matching fetch for stream, topic and consumer group.
|
Thanks for the PR. It is labeled If AI assistance was used to create this PR, you are required to run the Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
|
The review artifacts stay local per the skill. The fixes are in this PR's head |
|
sidenote: discovered a bug while working on the same, created issue #5105 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5104 +/- ##
=========================================
Coverage 92.26% 92.26%
Complexity 4367 4367
=========================================
Files 1592 1592
Lines 436807 436807
Branches 365039 365039
=========================================
+ Hits 403019 403020 +1
+ Misses 28172 28171 -1
Partials 5616 5616
🚀 New features to boost your workflow:
|
|
@cryptus-neoxys a separate PR for #5105, please. |
Which issue does this PR address?
Closes #4166
Rationale
The Rust SDK resolves
create_topicandcreate_consumer_groupto the created details, while the Python binding discarded the server's reply and resolved toNone, forcing a follow-upget_*to learn the server-assigned id.create_streamalready returnsStreamDetailson current master, so this change closes the remaining scope of #4166.What changed?
IggyClient.create_topicnow resolves toTopicDetailsandcreate_consumer_grouptoConsumerGroupDetails, built through the sameFromconversions thatget_topicandget_consumer_groupalready use, and the regenerated stub carries the new return types and docstrings. The stream, topic and consumer-group create tests assert the returned type, the server-assigned fields, and that a matching fetch agrees on the id. The docs indocs/sdk/python/intro.mdxandforeign/python/README.mdstate the contract for all four create methods, including that live counters such as a topic partition'ssegments_countare zero in the create reply and still need aget_*.Local Execution
The focused create tests for stream, topic and consumer group pass against a locally started
iggy-serverwith default root credentials. The full Python suite passes apart fromtest_resource_options(needs a server configured with an encryption key) andtest_tls(needs Docker), which fail locally for missing infrastructure.ruff check,ruff format --check,pyrefly check,cargo clippy --all-targets --all-features -- -D warnings,cargo test,cargo fmt --check,markdownlintandprekon the changed files all pass. The Java and C# pre-push hooks match no changed file and did not run locally because those toolchains are not installed; CI runs them.Docs
docs/docs/sdk/python/intro.mdxandforeign/python/README.mddocument the create results.AI Usage