Skip to content
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

HBASE-28883 Manage hbase-thirdparty transitive dependencies via BOM pom #124

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NihalJain
Copy link
Contributor

No description provided.

@NihalJain NihalJain marked this pull request as draft September 25, 2024 16:08
@NihalJain
Copy link
Contributor Author

NihalJain commented Sep 25, 2024

Also, please see code change required in HBase to consume this: NihalJain/hbase@0b51c71

NOTE: Could not remove the hardcoding of internal.protobuf.version as with BOM seems its not possible to pass on properties.

Have kept relevant code still here in this PR. Will cleanup based on review.

CC: @ndimiduk

pom.xml Outdated Show resolved Hide resolved
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Apache9 mentioned in https://github.com/apache/hbase/pull/6295/files#r1775002522, we may not need to bump netty4 as it is for zk/hadoop. Same for error prone.

We can decide what all dependencies we would want to keep here. Here's a exhaustive list of dependencies i found relevant.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment was marked as outdated.

<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

Why is the flatten plugin used for the bom? By definition, there should be no dependencies via this pom.

Copy link
Contributor Author

@NihalJain NihalJain Sep 26, 2024

Choose a reason for hiding this comment

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

Hi @ndimiduk To preserve the dependencyManagement section in the bom, I had to choose flatten mode: bom. We have flattenMode=oss in parent but for the bom we need to have flattenMode=bom. Hence, I had to add this in order to override the flatten mode defined in parent.

Please see https://www.mojohaus.org/flatten-maven-plugin/apidocs/org/codehaus/mojo/flatten/FlattenMode.html

</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

Why is this one included? There's no mention of it in the hbase.git/pom

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do have this at https://github.com/apache/hbase/blob/master/pom.xml#L1555
Although I am not sure if we need to keep this in sync.

@NihalJain NihalJain marked this pull request as ready for review September 26, 2024 11:26
@NihalJain NihalJain requested a review from ndimiduk September 26, 2024 11:29
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 14s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
-0 ⚠️ test4tests 0m 0s The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚 mvninstall 0m 48s master passed
+1 💚 compile 0m 14s master passed
+1 💚 javadoc 0m 7s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 7s Maven dependency ordering for patch
+1 💚 mvninstall 0m 41s the patch passed
+1 💚 compile 0m 19s the patch passed
+1 💚 javac 0m 19s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 javadoc 0m 11s the patch passed
_ Other Tests _
+1 💚 unit 0m 5s hbase-thirdparty-bom in the patch passed.
+1 💚 unit 0m 33s root in the patch passed.
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
4m 41s
Subsystem Report/Notes
Docker ClientAPI=1.47 ServerAPI=1.47 base: https://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-124/3/artifact/yetus-precommit-check/output/Dockerfile
GITHUB PR #124
Optional Tests dupname asflicense javac javadoc unit xml compile
uname Linux ced608014c2e 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
git revision master / a98a74b
Default Java Temurin-1.8.0_422-b05
Test Results https://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-124/3/testReport/
Max. process+thread count 394 (vs. ulimit of 1000)
modules C: hbase-thirdparty-bom . U: .
Console output https://ci-hbase.apache.org/job/HBase-Thirdparty-PreCommit/job/PR-124/3/console
versions git=2.43.0 maven=3.9.9
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Member

@ndimiduk ndimiduk left a comment

Choose a reason for hiding this comment

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

Looks alright by me. How does it work? have you tried a PR vs. the main repo that makes use of this?

@ndimiduk
Copy link
Member

Actually should we have logging dependencies here?

@NihalJain
Copy link
Contributor Author

Looks alright by me. How does it work? have you tried a PR vs. the main repo that makes use of this?

Hi @ndimiduk Please refer apache/hbase#6366

Actually should we have logging dependencies here?

Yes we can technically have all dependencies we want to keep common across our projects. Please let me know if we would like to add log4j and other logging jars over here. Also please let me know if we should evaluate other libs which can be moved to this bom, for eg: junit, mockito, hamcrest etc?

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should not have this as per observation in apache/hbase#6366 (comment)

CC: @ndimiduk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants