-
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][build] Fix potential insufficient protostuff-related configs #21629
[fix][build] Fix potential insufficient protostuff-related configs #21629
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.
Thank you!
One of other approach is to add protostuff-related configs to the pulsar parent
Yes. I wonder if in this way we can remove other configs. Duplicate this config three times seems brittle ..
245c42a
to
c5f5694
Compare
/pulsarbot rerun-failure-checks |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #21629 +/- ##
============================================
- Coverage 73.61% 73.61% -0.01%
- Complexity 32424 32431 +7
============================================
Files 1861 1861
Lines 138678 138678
Branches 15184 15184
============================================
- Hits 102089 102085 -4
- Misses 28690 28698 +8
+ Partials 7899 7895 -4
Flags with carried forward coverage won't be shown. Click here to find out more. |
@tisonkun
Ok. I've addressed your comment. PTAL |
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.
Thank you!
Motivation
Currently, protobuf messages are built by lightproto. Lightproto uses protostuff in build. Protostuff can be configured using system property as follows:
pulsar/pulsar-broker/pom.xml
Lines 610 to 633 in e1d06b5
pulsar/pulsar-transaction/coordinator/pom.xml
Lines 84 to 107 in e1d06b5
These configs are held as a static field, so it is impossible to separate each module's settings in a single build phase.
https://github.com/protostuff/protostuff/blob/protostuff-1.7.2/protostuff-parser/src/main/java/io/protostuff/parser/DefaultProtoLoader.java#L38-L39
https://github.com/protostuff/protostuff/blob/protostuff-1.7.2/protostuff-parser/src/main/java/io/protostuff/parser/DefaultProtoLoader.java#L49
For example, if we build as follows, pulsar-transaction/coordinator-specific configs are not used because maven builds pulsar-common first.
In the first place, there is no need to separate protostuff-related configs for each module, at least at present.
Modifications
Verifying this change
This change is a trivial rework
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: equanz#4