FrankChen021 commented on code in PR #20332:
URL: https://github.com/apache/druid/pull/20332#discussion_r3996183374


##########
services/src/main/java/org/apache/druid/cli/PullDependencies.java:
##########
@@ -86,6 +86,28 @@ public class PullDependencies implements Runnable
                   .put("com.fasterxml.jackson.core", "jackson-databind")
                   .put("com.fasterxml.jackson.core", "jackson-core")
                   .put("com.fasterxml.jackson.core", "jackson-annotations")
+                  // Netty 4 is bundled in lib/ (used by the core Druid HTTP 
client). The netty-bom import
+                  // at the root pom appears to defeat scope=provided on 
transitive netty jars in some
+                  // extensions, so hard-exclude them here to keep them from 
being duplicated.
+                  .put("io.netty", "netty-buffer")
+                  .put("io.netty", "netty-codec")
+                  .put("io.netty", "netty-codec-base")
+                  .put("io.netty", "netty-codec-compression")
+                  .put("io.netty", "netty-codec-dns")
+                  .put("io.netty", "netty-codec-http")
+                  .put("io.netty", "netty-codec-http2")

Review Comment:
   [P1] Do not exclude grpc-query's HTTP/2 codec
   
   `extensions-contrib/grpc-query/pom.xml` declares 
`io.netty:netty-codec-http2` as a normal runtime dependency (and also uses 
`grpc-netty`), because the core distribution does not provide this module. The 
contrib bundle explicitly pulls `grpc-query`, so this filter now removes a 
required jar from that extension directory. Loading or serving through the gRPC 
Netty transport will then fail with missing HTTP/2 codec classes. Only exclude 
Netty modules that are actually present in Druid's `lib/`, or keep this 
extension-specific dependency packaged.



##########
services/src/main/java/org/apache/druid/cli/PullDependencies.java:
##########
@@ -86,6 +86,28 @@ public class PullDependencies implements Runnable
                   .put("com.fasterxml.jackson.core", "jackson-databind")
                   .put("com.fasterxml.jackson.core", "jackson-core")
                   .put("com.fasterxml.jackson.core", "jackson-annotations")
+                  // Netty 4 is bundled in lib/ (used by the core Druid HTTP 
client). The netty-bom import
+                  // at the root pom appears to defeat scope=provided on 
transitive netty jars in some
+                  // extensions, so hard-exclude them here to keep them from 
being duplicated.
+                  .put("io.netty", "netty-buffer")
+                  .put("io.netty", "netty-codec")
+                  .put("io.netty", "netty-codec-base")
+                  .put("io.netty", "netty-codec-compression")
+                  .put("io.netty", "netty-codec-dns")
+                  .put("io.netty", "netty-codec-http")
+                  .put("io.netty", "netty-codec-http2")
+                  .put("io.netty", "netty-codec-marshalling")
+                  .put("io.netty", "netty-codec-protobuf")
+                  .put("io.netty", "netty-codec-socks")
+                  .put("io.netty", "netty-common")
+                  .put("io.netty", "netty-handler")
+                  .put("io.netty", "netty-handler-proxy")
+                  .put("io.netty", "netty-resolver")
+                  .put("io.netty", "netty-resolver-dns")
+                  .put("io.netty", "netty-transport")
+                  .put("io.netty", "netty-transport-classes-epoll")
+                  .put("io.netty", "netty-transport-native-unix-common")
+                  .put("software.amazon.awssdk", "netty-nio-client")

Review Comment:
   [P2] Keep the S3 Netty HTTP client dependency
   
   `extensions-core/s3-extensions/pom.xml` declares 
`software.amazon.awssdk:netty-nio-client` without `provided`, and 
`S3StorageDruidModule.AsyncHttpClientType.NETTY` directly calls 
`NettyNioAsyncHttpClient.builder()`. This artifact is not a dependency of the 
core `lib/` (the root-POM occurrence is only dependency management), so 
`pull-deps` will now omit it from `druid-s3-extensions`. Any S3 deployment that 
selects the supported `druid.storage.transfer.asyncHttpClientType=netty` mode 
will fail when constructing the transfer manager due to missing 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to