Skip to content

Conversation

@nodece
Copy link
Member

@nodece nodece commented Sep 11, 2025

Modifications

#20009 introduced the description(String) method, but it was not added to the ClientBuilder. As a result, it is currently impossible to set the description using PulsarClient.builder().description().

Modifications

  • Add the description(String) method to ClientBuilder to support setting a client description through the builder API.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Copy link

Copilot AI left a 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 the ClientBuilder interface with proper documentation
  • Implements the method in ClientBuilderImpl with 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.

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 11, 2025
Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov-commenter
Copy link

codecov-commenter commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.20%. Comparing base (415c6fa) to head (2618003).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             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     
Flag Coverage Δ
inttests 26.33% <ø> (-0.17%) ⬇️
systests 22.69% <ø> (+0.02%) ⬆️
unittests 73.71% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...g/apache/pulsar/client/impl/ClientBuilderImpl.java 85.79% <ø> (ø)

... and 86 files with indirect coverage changes

🚀 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.

@nodece nodece merged commit 65b3541 into apache:master Sep 11, 2025
113 of 118 checks passed
@nodece nodece self-assigned this Sep 11, 2025
@nodece nodece added this to the 4.2.0 milestone Sep 11, 2025
nodece added a commit to ascentstream/pulsar that referenced this pull request Sep 12, 2025
KannarFr pushed a commit to CleverCloud/pulsar that referenced this pull request Sep 22, 2025
lhotari pushed a commit that referenced this pull request Oct 6, 2025
walkinggo pushed a commit to walkinggo/pulsar that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants