Skip to content

Commit

Permalink
all: Update netty to 4.1.77.Final and netty_tcnative to 2.0.53.Final (#…
Browse files Browse the repository at this point in the history
…9027)

all: Update netty to 4.1.77.Final and netty_tcnative to 2.0.53.Final

Also switches to a non-release version of rules_jvm_external to allow Bazel build to work with artifact classifiers.
  • Loading branch information
temawi committed Jun 24, 2022
1 parent 6193d20 commit 7bd0797
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 34 deletions.
3 changes: 2 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ grpc-netty version | netty-handler version | netty-tcnative-boringssl-static ver
1.32.x-1.34.x | 4.1.51.Final | 2.0.31.Final
1.35.x-1.41.x | 4.1.52.Final | 2.0.34.Final
1.42.x-1.43.x | 4.1.63.Final | 2.0.38.Final
1.44.x- | 4.1.72.Final | 2.0.46.Final
1.44.x-1.47.x | 4.1.72.Final | 2.0.46.Final
1.48.x- | 4.1.77.Final | 2.0.53.Final

_(grpc-netty-shaded avoids issues with keeping these versions in sync.)_

Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_jvm_external",
sha256 = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca",
strip_prefix = "rules_jvm_external-4.2",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/4.2.zip",
sha256 = "c21ce8b8c4ccac87c809c317def87644cdc3a9dd650c74f41698d761c95175f3",
strip_prefix = "rules_jvm_external-1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a.zip",
)

load("@rules_jvm_external//:defs.bzl", "maven_install")
Expand Down
3 changes: 2 additions & 1 deletion alts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ dependencies {
testImplementation (libraries.guava.testlib) {
exclude group: 'junit', module: 'junit'
}
testRuntimeOnly libraries.netty.tcnative
testRuntimeOnly libraries.netty.tcnative,
libraries.netty.tcnative.classes
testRuntimeOnly (libraries.netty.transport.epoll) {
artifact {
classifier = "linux-x86_64"
Expand Down
1 change: 1 addition & 0 deletions benchmarks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ dependencies {
project(path: ':grpc-xds', configuration: 'shadow'),
libraries.hdrhistogram,
libraries.netty.tcnative,
libraries.netty.tcnative.classes,
libraries.commons.math3
implementation (libraries.netty.transport.epoll) {
artifact {
Expand Down
6 changes: 3 additions & 3 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ local_repository(

http_archive(
name = "rules_jvm_external",
sha256 = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca",
strip_prefix = "rules_jvm_external-4.2",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/4.2.zip",
sha256 = "c21ce8b8c4ccac87c809c317def87644cdc3a9dd650c74f41698d761c95175f3",
strip_prefix = "rules_jvm_external-1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/1498ac6ccd3ea9cdb84afed65aa257c57abf3e0a.zip",
)

load("@rules_jvm_external//:defs.bzl", "maven_install")
Expand Down
1 change: 1 addition & 0 deletions examples/example-tls/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ java_library(
),
runtime_deps = [
"@maven//:io_netty_netty_tcnative_boringssl_static",
"@maven//:io_netty_netty_tcnative_classes",
],
deps = [
":helloworld_java_grpc",
Expand Down
10 changes: 2 additions & 8 deletions examples/example-tls/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.48.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.19.2</protoc.version>
<netty.tcnative.version>2.0.34.Final</netty.tcnative.version>
<netty.tcnative.version>2.0.53.Final</netty.tcnative.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
Expand Down Expand Up @@ -49,13 +49,7 @@
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>${netty.tcnative.version}</version>
<scope>runtime</scope>
<artifactId>grpc-netty-shaded</artifactId>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion gae-interop-testing/gae-jdk8/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ dependencies {
}
implementation libraries.junit
implementation libraries.protobuf.java
runtimeOnly libraries.netty.tcnative
runtimeOnly libraries.netty.tcnative, libraries.netty.tcnative.classes
}

compileJava {
Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ autovalue = "1.9"
checkstyle = "6.17"
googleauth = "1.4.0"
guava = "31.1-android"
netty = "4.1.72.Final"
netty = '4.1.77.Final'
nettytcnative = '2.0.53.Final'
opencensus = "0.31.0"
protobuf = "3.19.2"

Expand Down Expand Up @@ -50,7 +51,8 @@ netty-transport-epoll = { module = "io.netty:netty-transport-native-epoll", vers
# SECURITY.md (multiple occurrences)
# examples/example-tls/build.gradle
# examples/example-tls/pom.xml
netty-tcnative = "io.netty:netty-tcnative-boringssl-static:2.0.46.Final"
netty-tcnative = { module = "io.netty:netty-tcnative-boringssl-static", version.ref = "nettytcnative" }
netty-tcnative-classes = { module = "io.netty:netty-tcnative-classes", version.ref = "nettytcnative" }
netty-unix-common = { module = "io.netty:netty-transport-native-unix-common", version.ref = "netty" }
okhttp = "com.squareup.okhttp:okhttp:2.7.4"
okio = "com.squareup.okio:okio:1.17.5"
Expand Down
1 change: 1 addition & 0 deletions interop-testing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dependencies {
runtimeOnly group: 'io.github.devatherock', name: 'jul-jsonformatter', version: '1.1.0'
runtimeOnly libraries.opencensus.impl,
libraries.netty.tcnative,
libraries.netty.tcnative.classes,
project(':grpc-grpclb'),
project(':grpc-rls')
testImplementation project(':grpc-context').sourceSets.test.output,
Expand Down
28 changes: 27 additions & 1 deletion netty/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,35 @@ dependencies {
project(':grpc-api').sourceSets.test.output,
project(':grpc-testing'),
project(':grpc-testing-proto'),
libraries.conscrypt,
libraries.netty.transport.epoll
testRuntimeOnly libraries.netty.tcnative,
libraries.conscrypt
libraries.netty.tcnative.classes
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "linux-x86_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "linux-aarch_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "osx-x86_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "osx-aarch_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "windows-x86_64"
}
}
testRuntimeOnly (libraries.netty.transport.epoll) {
artifact {
classifier = "linux-x86_64"
Expand Down
2 changes: 2 additions & 0 deletions netty/shaded/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ java_library(
runtime_deps = [
"//netty",
"@io_netty_netty_tcnative_boringssl_static//jar",
"@io_netty_netty_tcnative_classes//jar",
"@io_netty_netty_transport_native_unix_common//jar",
"@io_netty_netty_transport_native_epoll_linux_x86_64//jar",
],
)
28 changes: 27 additions & 1 deletion netty/shaded/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,33 @@ sourceSets { testShadow {} }

dependencies {
implementation project(':grpc-netty')
runtimeOnly libraries.netty.tcnative
runtimeOnly libraries.netty.tcnative,
libraries.netty.tcnative.classes
runtimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "linux-x86_64"
}
}
runtimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "linux-aarch_64"
}
}
runtimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "osx-x86_64"
}
}
runtimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "osx-aarch_64"
}
}
runtimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "windows-x86_64"
}
}
runtimeOnly (libraries.netty.transport.epoll) {
artifact {
classifier = "linux-x86_64"
Expand Down
25 changes: 13 additions & 12 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,20 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"com.google.truth:truth:1.0.1",
"com.squareup.okhttp:okhttp:2.7.4",
"com.squareup.okio:okio:1.17.5",
"io.netty:netty-buffer:4.1.72.Final",
"io.netty:netty-codec-http2:4.1.72.Final",
"io.netty:netty-codec-http:4.1.72.Final",
"io.netty:netty-codec-socks:4.1.72.Final",
"io.netty:netty-codec:4.1.72.Final",
"io.netty:netty-common:4.1.72.Final",
"io.netty:netty-handler-proxy:4.1.72.Final",
"io.netty:netty-handler:4.1.72.Final",
"io.netty:netty-resolver:4.1.72.Final",
"io.netty:netty-tcnative-boringssl-static:2.0.46.Final",
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.72.Final",
"io.netty:netty-buffer:4.1.77.Final",
"io.netty:netty-codec-http2:4.1.77.Final",
"io.netty:netty-codec-http:4.1.77.Final",
"io.netty:netty-codec-socks:4.1.77.Final",
"io.netty:netty-codec:4.1.77.Final",
"io.netty:netty-common:4.1.77.Final",
"io.netty:netty-handler-proxy:4.1.77.Final",
"io.netty:netty-handler:4.1.77.Final",
"io.netty:netty-resolver:4.1.77.Final",
"io.netty:netty-tcnative-boringssl-static:2.0.53.Final",
"io.netty:netty-tcnative-classes:2.0.53.Final",
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.77.Final",
"io.netty:netty-transport-native-unix-common:4.1.72.Final",
"io.netty:netty-transport:4.1.72.Final",
"io.netty:netty-transport:4.1.77.Final",
"io.opencensus:opencensus-api:0.24.0",
"io.opencensus:opencensus-contrib-grpc-metrics:0.24.0",
"io.perfmark:perfmark-api:0.25.0",
Expand Down
28 changes: 27 additions & 1 deletion xds/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,33 @@ dependencies {
shadow project(path: ':grpc-netty-shaded', configuration: 'shadow')

signature "org.codehaus.mojo.signature:java17:1.0@signature"
testRuntimeOnly libraries.netty.tcnative
testRuntimeOnly libraries.netty.tcnative,
libraries.netty.tcnative.classes
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "linux-x86_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "linux-aarch_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "osx-x86_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "osx-aarch_64"
}
}
testRuntimeOnly (libraries.netty.tcnative) {
artifact {
classifier = "windows-x86_64"
}
}
}

sourceSets {
Expand Down

0 comments on commit 7bd0797

Please sign in to comment.