You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by "Shawyeok (via GitHub)" <gi...@apache.org> on 2024/11/28 09:17:27 UTC

[PR] Fix potential class conflict during jetcd-core-shaded shading process [bookkeeper]

Shawyeok opened a new pull request, #4532:
URL: https://github.com/apache/bookkeeper/pull/4532

   ### Motivation
   
   This a make up patch for #4526, which missed the root cause to fix potential jetcd-core shading problem.
   
   Because the `maven-shade-plugin` [includes][4] the current project artifact during the shade process. In `jetcd-core-shaded`, we copy `io.etcd.jetcd.*` into the `jetcd-core-shaded` jar without relocation. As a result, when the `install` or `deploy` goals are executed without cleaning the `target` folder, class conflicts arise between `io.etcd.jetcd.*` inside `org.apache.bookkeeper.metadata.drivers:jetcd-core-shaded.jar` and `io.etcd:jetcd-core.jar`.
   
   [1]: https://github.com/apache/bookkeeper/pull/4426#issuecomment-2162348232
   [2]: https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty
   [4]: https://github.com/apache/maven-shade-plugin/blob/maven-shade-plugin-3.4.1/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java#L437
   
   ### Verifying this Change
   
   To verify this patch, follow these steps:
   
   ```shell
   # Step 1: Clean and install the `jetcd-core-shaded` module.
   mvn clean install -pl metadata-drivers/jetcd-core-shaded -DskipTests
   
   # Step 2: Install without cleaning, simulating a build release process.
   mvn install -pl metadata-drivers/jetcd-core-shaded -DskipTests
   
   # Step 3: Unpack the shaded jar into a directory and verify imports.
   # Ensure that the import statement for `io.netty.handler.logging.ByteBufFormat` 
   # in `org/apache/pulsar/jetcd/shaded/io/vertx/core/net/NetClientOptions.class` 
   # is correct. The expected import is:
   # `import io.grpc.netty.shaded.io.netty.handler.logging.ByteBufFormat;`.
   unzip $M2_REPO/org/apache/bookkeeper/metadata/drivers/jetcd-core-shaded/<VERSION>/jetcd-core-shaded-<VERSION>.jar \
     -d metadata-drivers/jetcd-core-shaded/target/shaded-classes
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix potential class conflict during jetcd-core-shaded shading process [bookkeeper]

Posted by "StevenLuMT (via GitHub)" <gi...@apache.org>.
StevenLuMT commented on PR #4532:
URL: https://github.com/apache/bookkeeper/pull/4532#issuecomment-2658080681

   reopen:  rerun failure checks 
    


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix potential class conflict during jetcd-core-shaded shading process [bookkeeper]

Posted by "StevenLuMT (via GitHub)" <gi...@apache.org>.
StevenLuMT closed pull request #4532: Fix potential class conflict during jetcd-core-shaded shading process
URL: https://github.com/apache/bookkeeper/pull/4532


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix potential class conflict during jetcd-core-shaded shading process [bookkeeper]

Posted by "dlg99 (via GitHub)" <gi...@apache.org>.
dlg99 merged PR #4532:
URL: https://github.com/apache/bookkeeper/pull/4532


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix potential class conflict during jetcd-core-shaded shading process [bookkeeper]

Posted by "StevenLuMT (via GitHub)" <gi...@apache.org>.
StevenLuMT commented on PR #4532:
URL: https://github.com/apache/bookkeeper/pull/4532#issuecomment-2658077563

   rerun failure checks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix potential class conflict during jetcd-core-shaded shading process [bookkeeper]

Posted by "StevenLuMT (via GitHub)" <gi...@apache.org>.
StevenLuMT commented on PR #4532:
URL: https://github.com/apache/bookkeeper/pull/4532#issuecomment-2658073990

   ci fail for timeout,retry again
   <img width="1426" alt="image" src="https://github.com/user-attachments/assets/95dbf857-3722-42d5-af86-8728aa113f5c" />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org