HDDS-5410. Improve protobuf compilation#9081
Merged
adoroszlai merged 7 commits intoapache:masterfrom Oct 6, 2025
Merged
Conversation
- Add `protobuf-maven-plugin` to `pluginManagement`. - Include protobuf version in execution ID where using unshaded protobuf. - In `ozone-csi`: move global plugin config to the execution's. For modules with multiple executions: - Better separate output directory. - Simplify and document steps for using shaded protobuf in the generated code. For modules with single execution: - Define protobuf version in property - Remove parameters with default value
Contributor
Author
|
Thanks @sodonnel for the review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Several improvements in the build steps related to protobuf compilation.
ratis-thirdparty.proto3.hadooprpc.protobuf.versiontohadoop-thirdparty.protobuf.version. Add a corresponding property for the artifact name, because it includes the version number.grpc.protobuf-compile.version).grpc.protobuf-compile.versiontoprotobuf3.version, only used for CSI after this change, for now. Bump it to 3.25.8.proto2.hadooprpc.protobuf.versiontoprotobuf2.version, since it is not specific to Hadoop RPC.*-version-info.propertiesfiles into a single property. Previously each of these properties required an accessor inVersionInfo, only to be concatenated inHddsVersionInfoandOzoneVersionInfo.protobuf-maven-plugin: define protobuf version being used in a property.protobuf-maven-pluginis automatically added as source root (for compilation), so moving to the same dir at the end is unnecessary.generated-sources, instead of using a dir and its subdir (javaandjava/proto3). This allows using fewer<replace/>tasks.protobuf-maven-pluginexecution<id>:for-hadoopandfor-ratis, respectivelyprotobuf-maven-plugintopluginManagement.ozone-csi: merge global plugin config into that of the execution.https://issues.apache.org/jira/browse/HDDS-5410
How was this patch tested?
CI:
https://github.com/adoroszlai/ozone/actions/runs/18108412916https://github.com/adoroszlai/ozone/actions/runs/18152046866
Maven output excerpt for execution
<id>changes: