Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow users to set number of partitions in topic #1040

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

karelbilek
Copy link
Contributor

I have added new type, TopicConfig, and added it to options WithTopicConfig in backwards-compatible way.

For now it just has topic name and number of partitions, but it can be enhanced in the future with other options.

I wanted to also add a replication count, but there is just one broker in the cluster, so it makes no sense.

Fixes #1031

Copy link
Owner

@orlangure orlangure left a comment

Choose a reason for hiding this comment

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

Kudos for keeping BC, this is a great improvement. I have a small question regarding the test, and after clearing this out this will be ready to be merged.

preset/kafka/preset_test.go Outdated Show resolved Hide resolved
@orlangure
Copy link
Owner

Hey @karelbilek, I merged a bunch of other PRs, so if you still want to merge this, please rebase and resolve the conflicts. Thanks!

@karelbilek karelbilek force-pushed the add-topic-configs branch from b6d2373 to 9c82dca Compare May 24, 2024 11:33
@karelbilek
Copy link
Contributor Author

Done, plus I added a test that the topics are created successfully with the proper partitions. (I... think. I am myself using a different kafka library than gnomock is using.)

I have added new type, TopicConfig, and added it to options WithTopicConfig
in backwards-compatible way

For now it just has topic name and number of partitions, but it can be enhanced in the future with other options.

I wanted to also add a replication count, but there is just one broker in the cluster, so it makes no sense.
@karelbilek karelbilek force-pushed the add-topic-configs branch from 9c82dca to 43e4f8f Compare May 24, 2024 11:46
Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 64.40%. Comparing base (97f7ed9) to head (43e4f8f).
Report is 30 commits behind head on master.

Files Patch % Lines
preset/kafka/preset.go 0.00% 8 Missing ⚠️
preset/kafka/options.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1040       +/-   ##
===========================================
- Coverage   85.87%   64.40%   -21.48%     
===========================================
  Files          50       55        +5     
  Lines        2350     2618      +268     
===========================================
- Hits         2018     1686      -332     
- Misses        173      809      +636     
+ Partials      159      123       -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@karelbilek karelbilek requested a review from orlangure June 3, 2024 11:28
Copy link
Owner

@orlangure orlangure left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@orlangure orlangure merged commit 60506f5 into orlangure:master Jun 4, 2024
24 of 26 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: kafka - add ability to create more partitions
2 participants