-
Notifications
You must be signed in to change notification settings - Fork 908
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 potential jetcd-core shading problem #4526
Fix potential jetcd-core shading problem #4526
Conversation
There is a CI test failing, investigating on it. https://github.com/apache/bookkeeper/actions/runs/11870652415/job/33082639394?pr=4526 |
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
3de9e67
to
6b54df8
Compare
@lhotari Currently, A reasonable workaround is to exclude Subject: [PATCH] Exclude jetcd-core-shaded from metadata driver integration test
---
Index: .github/workflows/bk-ci.yml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.github/workflows/bk-ci.yml b/.github/workflows/bk-ci.yml
--- a/.github/workflows/bk-ci.yml (revision b32881139685af9fdb7a6cb06d55e78d8b677257)
+++ b/.github/workflows/bk-ci.yml (revision 6b54df8f03f82c684827f6b6b80df087f7d33bef)
@@ -242,7 +242,7 @@
run: mvn -B -nsu clean install -Pdocker -DskipTests
- name: Run metadata driver tests
- run: mvn -B -nsu -f metadata-drivers/pom.xml test -DintegrationTests
+ run: mvn -B -nsu -f metadata-drivers/pom.xml -pl '!jetcd-core-shaded' test -DintegrationTests
- name: Run all integration tests (except backward compatibility tests)
run: | This should able to address CI |
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.
What will our future direction be? Should we wait for a new version of jetcd-core
?
@shoothzj |
@shoothzj We have this shading solution in place until jetcd-core is decoupled from grpc-java. grpc-java is tested with a specific Netty version as documented in https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty . If a different Netty version is used, things could break. The jetcd-core-shaded solution transforms the jetcd-core library to use |
Motivation
There is a potential jar shading issue introduced in #4426 that causes
NoClassDefFoundError
when connecting to an etcd metadata store.The
jetcd-core-shaded
module was introduced in #4426 to address the compatibility issues between jetcd-core’s grpc-java dependency and Netty. You can find more details here and in the grpc-java documentation.Currently, we use
unpack-shaded-jar
execution unpacks the shaded jar produced bymaven-shade-plugin:shade
into thejetcd-core-shaded/target/classes
directory. However, the classes in this directory conflict with its dependencies. If themaven-shade-plugin:shade
runs again without cleaning this directory, it can produce an incorrect shaded jar. You can replicate and verify this issue with the following commands:We can remove the attach and unpack configurations, and it should work fine.
This issue has already been reported in apache/pulsar, and a similar patch has addressed it.