-
Couldn't load subscription status.
- Fork 3.7k
[fix][client] Add description method to ClientBuilder #24728
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a missing description(String) method to the ClientBuilder interface and its implementation to enable setting client descriptions through the builder API. This fixes an issue where the description method was available in the client configuration but not exposed through the builder pattern.
- Adds the
description(String)method to theClientBuilderinterface with proper documentation - Implements the method in
ClientBuilderImplwith validation logic - Updates test code to use the builder API instead of casting to implementation class
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pulsar-client-api/src/main/java/org/apache/pulsar/client/api/ClientBuilder.java | Adds the description(String) method signature and documentation to the interface |
| pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientBuilderImpl.java | Implements the description(String) method with validation and configuration setting |
| pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java | Updates test to use the public builder API instead of casting to implementation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #24728 +/- ##
============================================
- Coverage 74.27% 74.20% -0.08%
+ Complexity 33569 33125 -444
============================================
Files 1896 1896
Lines 148111 148111
Branches 17164 17164
============================================
- Hits 110009 109903 -106
- Misses 29370 29418 +48
- Partials 8732 8790 +58
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
(cherry picked from commit 65b3541) Signed-off-by: Zixuan Liu <[email protected]>
(cherry picked from commit 65b3541)
Modifications
#20009 introduced the
description(String)method, but it was not added to theClientBuilder. As a result, it is currently impossible to set the description usingPulsarClient.builder().description().Modifications
description(String)method toClientBuilderto support setting a client description through the builder API.Documentation
docdoc-requireddoc-not-neededdoc-complete