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

[#6375] improvment(catalog-hadoop): Remove protobuf-java to avoid conflict with authorization module #6376

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions catalogs/catalog-hadoop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ dependencies {
exclude("org.eclipse.jetty", "*")
exclude("io.netty")
exclude("org.fusesource.leveldbjni")
// Exclude `protobuf-java` 2.5.0 to avoid conflict with a higher version of `protobuf-java`
// in the authorization module. The reason is that the class loader of `catalog-hadoop` is the
// parent of the class loader of the authorization module, so the class loader of `catalog-hadoop`
// will load the class `protobuf-java` 2.5.0 first, which will cause the authorization module to
// fail to load the class `protobuf-java` 3.15.8.
exclude("com.google.protobuf", "protobuf-java")
Copy link
Contributor

Choose a reason for hiding this comment

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

is it still useful as you exclude the package in copy task

Copy link
Contributor

Choose a reason for hiding this comment

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

Is exclude the protobuf-java in copy task is more general solution? since other package may introduce protobuf-java too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid excluding it in the gradle dependencies may be more general.

since other package may introduce protobuf-java too.

Some modules use copy task to exclude jars because using excluding in gradle does not work. I believe this is not a very elegant behaviour.

}
implementation(libs.slf4j.api)
implementation(libs.awaitility)
Expand Down