Skip to content

Conversation

@nodece
Copy link
Member

@nodece nodece commented Sep 12, 2025

Motivation

#24729 adds the client description for PulsarAdmin, which didn't consider the description length.

Modifications

  • Added client description check in the PulsarAdmin
  • Added client description test for PulsarClient and PulsarAdmin

Documentation

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

@nodece nodece self-assigned this Sep 12, 2025
@nodece nodece added this to the 4.2.0 milestone Sep 12, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Sep 12, 2025
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 fixes a missing validation in PulsarAdmin's description field and adds comprehensive test coverage. The fix ensures that client descriptions are limited to 64 characters, matching the existing validation in PulsarClient.

  • Add description length validation (64 character limit) to PulsarAdminBuilderImpl
  • Add test coverage for valid and invalid description lengths for both PulsarClient and PulsarAdmin
  • Remove orphaned test from PulsarAdminImplTest that was moved to the appropriate test class

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
PulsarAdminBuilderImpl.java Added description length validation with 64 character limit
ClientBuilderImplTest.java Added tests for valid description and description length validation
PulsarAdminBuilderImplTest.java Added tests for valid description and description length validation
PulsarAdminImplTest.java Removed misplaced test that belonged in builder test class

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@nodece nodece force-pushed the fix-pulsar-admin-desc-and-add-test branch from 7839b3e to 12850d0 Compare September 12, 2025 08:19
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.15%. Comparing base (e19856a) to head (12850d0).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../client/admin/internal/PulsarAdminBuilderImpl.java 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##             master   #24734       +/-   ##
=============================================
+ Coverage     38.32%   74.15%   +35.82%     
- Complexity    13038    33222    +20184     
=============================================
  Files          1843     1900       +57     
  Lines        144271   148379     +4108     
  Branches      16730    17204      +474     
=============================================
+ Hits          55292   110030    +54738     
+ Misses        81463    29559    -51904     
- Partials       7516     8790     +1274     
Flag Coverage Δ
inttests 26.25% <0.00%> (-0.19%) ⬇️
systests 22.75% <0.00%> (+0.04%) ⬆️
unittests 73.68% <50.00%> (+39.20%) ⬆️

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

Files with missing lines Coverage Δ
.../client/admin/internal/PulsarAdminBuilderImpl.java 75.72% <50.00%> (+42.06%) ⬆️

... and 1407 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 8d7a28c into apache:master Sep 12, 2025
96 of 98 checks passed
nodece added a commit to nodece/pulsar that referenced this pull request Sep 16, 2025
…24734)

(cherry picked from commit 8d7a28c)
Signed-off-by: Zixuan Liu <nodeces@gmail.com>
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.

4 participants