-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][client] Make protobuf-java dependency optional in java client libraries #23632
Conversation
@Shawyeok Please add the following content to your PR description and select a checkbox:
|
172d7f5
to
6aeb951
Compare
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. Thanks for addressing this. This could be a minor breaking change for some clients since they would now have to include the protobuf-java version that they prefer. We'll just have to add a release note that this is change is made. Since it's a minor breaking change and not many have upgraded to Pulsar 4.0.x, I think it makes sense to get this included in 4.0.x .
Build failure. https://github.com/apache/pulsar/actions/runs/11977798414/job/3
I'd guess that it's the |
Yes, the The |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23632 +/- ##
============================================
+ Coverage 73.57% 74.32% +0.75%
- Complexity 32624 34464 +1840
============================================
Files 1877 1944 +67
Lines 139502 147202 +7700
Branches 15299 16240 +941
============================================
+ Hits 102638 109408 +6770
- Misses 28908 29338 +430
- Partials 7956 8456 +500
Flags with carried forward coverage won't be shown. Click here to find out more. |
…ibraries (apache#23632) (cherry picked from commit b284cd4) (cherry picked from commit e1e4296)
…ibraries (apache#23632) (cherry picked from commit b284cd4) (cherry picked from commit e1e4296)
Fixes #23469
Motivation
In the Pulsar Java client libraries, the
protobuf-java
library is only used inProtobufSchema
, making it suitable as an optional dependency. However, it is mistakenly included in thepulsar-client-admin
andpulsar-client-all
shaded jar and declared as required dependency ofpulsar-client
,pulsar-client-original
andpulsar-client-admin-original
, as noted by @merlimat in this discussion.PR #23468 moved
protobuf-java
from a shaded JAR to a declared dependency in thepom.xml
, which helped avoid conflicts betweenprotobuf-java
and application dependencies. Since users only needprotobuf-java
when usingProtobufSchema
, it makes sense to declare it as an optional dependency. This change reduces the number of dependencies in the Pulsar client libraries.Verifying this change
protobuf-java
dependency is markedoptional
in the installedpom.xml
files, e.g.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: Shawyeok#19