Skip to content

Commit 1528f80

Browse files
committed
Upgrade Netty to 4.1.132 and netty-tcnative to 2.0.75
1 parent d057a7e commit 1528f80

5 files changed

Lines changed: 46 additions & 40 deletions

File tree

MODULE.bazel

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,20 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
2323
"com.google.truth:truth:1.4.5",
2424
"com.squareup.okhttp:okhttp:2.7.5",
2525
"com.squareup.okio:okio:2.10.0", # 3.0+ needs swapping to -jvm; need work to avoid flag-day
26-
"io.netty:netty-buffer:4.1.130.Final",
27-
"io.netty:netty-codec-http2:4.1.130.Final",
28-
"io.netty:netty-codec-http:4.1.130.Final",
29-
"io.netty:netty-codec-socks:4.1.130.Final",
30-
"io.netty:netty-codec:4.1.130.Final",
31-
"io.netty:netty-common:4.1.130.Final",
32-
"io.netty:netty-handler-proxy:4.1.130.Final",
33-
"io.netty:netty-handler:4.1.130.Final",
34-
"io.netty:netty-resolver:4.1.130.Final",
35-
"io.netty:netty-tcnative-boringssl-static:2.0.74.Final",
36-
"io.netty:netty-tcnative-classes:2.0.74.Final",
37-
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.130.Final",
38-
"io.netty:netty-transport-native-unix-common:4.1.130.Final",
39-
"io.netty:netty-transport:4.1.130.Final",
26+
"io.netty:netty-buffer:4.1.132.Final",
27+
"io.netty:netty-codec-http2:4.1.132.Final",
28+
"io.netty:netty-codec-http:4.1.132.Final",
29+
"io.netty:netty-codec-socks:4.1.132.Final",
30+
"io.netty:netty-codec:4.1.132.Final",
31+
"io.netty:netty-common:4.1.132.Final",
32+
"io.netty:netty-handler-proxy:4.1.132.Final",
33+
"io.netty:netty-handler:4.1.132.Final",
34+
"io.netty:netty-resolver:4.1.132.Final",
35+
"io.netty:netty-tcnative-boringssl-static:2.0.75.Final",
36+
"io.netty:netty-tcnative-classes:2.0.75.Final",
37+
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.132.Final",
38+
"io.netty:netty-transport-native-unix-common:4.1.132.Final",
39+
"io.netty:netty-transport:4.1.132.Final",
4040
"io.opencensus:opencensus-api:0.31.0",
4141
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
4242
"io.perfmark:perfmark-api:0.27.0",

SECURITY.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,8 @@ grpc-netty version | netty-handler version | netty-tcnative-boringssl-static ver
399399
1.71.x-1.74.x | 4.1.110.Final | 2.0.70.Final
400400
1.75.x-1.76.x | 4.1.124.Final | 2.0.72.Final
401401
1.77.x-1.78.x | 4.1.127.Final | 2.0.74.Final
402-
1.79.x- | 4.1.130.Final | 2.0.74.Final
402+
1.79.x-1.80.x | 4.1.130.Final | 2.0.74.Final
403+
1.81.x- | 4.1.132.Final | 2.0.75.Final
403404

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

alts/src/test/java/io/grpc/alts/internal/AltsProtocolNegotiatorTest.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,11 @@ public void operationComplete(ChannelFuture future) throws Exception {
202202
channel.flush();
203203

204204
// Capture the protected data written to the wire.
205-
assertEquals(1, channel.outboundMessages().size());
206-
ByteBuf protectedData = channel.readOutbound();
205+
assertThat(channel.outboundMessages()).isNotEmpty();
206+
ByteBuf protectedData = channel.alloc().buffer();
207+
while (!channel.outboundMessages().isEmpty()) {
208+
protectedData.writeBytes((ByteBuf) channel.readOutbound());
209+
}
207210
assertEquals(message.length(), writeCount.get());
208211

209212
// Read the protected message at the server and verify it matches the original message.
@@ -327,16 +330,18 @@ public void doNotFlushEmptyBuffer() throws Exception {
327330
String message = "hello";
328331
ByteBuf in = Unpooled.copiedBuffer(message, UTF_8);
329332

330-
assertEquals(0, protector.flushes.get());
333+
int flushes = protector.flushes.get();
331334
Future<?> done = channel.write(in);
332335
channel.flush();
336+
flushes++;
333337
done.get(5, TimeUnit.SECONDS);
334-
assertEquals(1, protector.flushes.get());
338+
assertEquals(flushes, protector.flushes.get());
335339

340+
// Flush does not propagate
336341
done = channel.write(Unpooled.EMPTY_BUFFER);
337342
channel.flush();
338343
done.get(5, TimeUnit.SECONDS);
339-
assertEquals(1, protector.flushes.get());
344+
assertEquals(flushes, protector.flushes.get());
340345
}
341346

342347
@Test

gradle/libs.versions.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@ mockito-android = "org.mockito:mockito-android:4.4.0"
101101
mockito-core = "org.mockito:mockito-core:4.4.0"
102102
# Need to decide when we require users to absorb the breaking changes in 4.2
103103
# checkForUpdates: netty-codec-http2:4.1.+
104-
netty-codec-http2 = "io.netty:netty-codec-http2:4.1.130.Final"
104+
netty-codec-http2 = "io.netty:netty-codec-http2:4.1.132.Final"
105105
# checkForUpdates: netty-handler-proxy:4.1.+
106-
netty-handler-proxy = "io.netty:netty-handler-proxy:4.1.130.Final"
106+
netty-handler-proxy = "io.netty:netty-handler-proxy:4.1.132.Final"
107107
# Keep the following references of tcnative version in sync whenever it's updated:
108108
# SECURITY.md
109-
netty-tcnative = "io.netty:netty-tcnative-boringssl-static:2.0.74.Final"
110-
netty-tcnative-classes = "io.netty:netty-tcnative-classes:2.0.74.Final"
109+
netty-tcnative = "io.netty:netty-tcnative-boringssl-static:2.0.75.Final"
110+
netty-tcnative-classes = "io.netty:netty-tcnative-classes:2.0.75.Final"
111111
# checkForUpdates: netty-transport-epoll:4.1.+
112-
netty-transport-epoll = "io.netty:netty-transport-native-epoll:4.1.130.Final"
112+
netty-transport-epoll = "io.netty:netty-transport-native-epoll:4.1.132.Final"
113113
# checkForUpdates: netty-unix-common:4.1.+
114-
netty-unix-common = "io.netty:netty-transport-native-unix-common:4.1.130.Final"
114+
netty-unix-common = "io.netty:netty-transport-native-unix-common:4.1.132.Final"
115115
okhttp = "com.squareup.okhttp:okhttp:2.7.5"
116116
# okio 3.5+ uses Kotlin 1.9+ which requires Android Gradle Plugin 9+
117117
# checkForUpdates: okio:3.4.+

repositories.bzl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
2727
"com.google.truth:truth:1.4.5",
2828
"com.squareup.okhttp:okhttp:2.7.5",
2929
"com.squareup.okio:okio:2.10.0", # 3.0+ needs swapping to -jvm; need work to avoid flag-day
30-
"io.netty:netty-buffer:4.1.130.Final",
31-
"io.netty:netty-codec-http2:4.1.130.Final",
32-
"io.netty:netty-codec-http:4.1.130.Final",
33-
"io.netty:netty-codec-socks:4.1.130.Final",
34-
"io.netty:netty-codec:4.1.130.Final",
35-
"io.netty:netty-common:4.1.130.Final",
36-
"io.netty:netty-handler-proxy:4.1.130.Final",
37-
"io.netty:netty-handler:4.1.130.Final",
38-
"io.netty:netty-resolver:4.1.130.Final",
39-
"io.netty:netty-tcnative-boringssl-static:2.0.74.Final",
40-
"io.netty:netty-tcnative-classes:2.0.74.Final",
41-
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.130.Final",
42-
"io.netty:netty-transport-native-unix-common:4.1.130.Final",
43-
"io.netty:netty-transport:4.1.130.Final",
30+
"io.netty:netty-buffer:4.1.132.Final",
31+
"io.netty:netty-codec-http2:4.1.132.Final",
32+
"io.netty:netty-codec-http:4.1.132.Final",
33+
"io.netty:netty-codec-socks:4.1.132.Final",
34+
"io.netty:netty-codec:4.1.132.Final",
35+
"io.netty:netty-common:4.1.132.Final",
36+
"io.netty:netty-handler-proxy:4.1.132.Final",
37+
"io.netty:netty-handler:4.1.132.Final",
38+
"io.netty:netty-resolver:4.1.132.Final",
39+
"io.netty:netty-tcnative-boringssl-static:2.0.75.Final",
40+
"io.netty:netty-tcnative-classes:2.0.75.Final",
41+
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.132.Final",
42+
"io.netty:netty-transport-native-unix-common:4.1.132.Final",
43+
"io.netty:netty-transport:4.1.132.Final",
4444
"io.opencensus:opencensus-api:0.31.0",
4545
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
4646
"io.perfmark:perfmark-api:0.27.0",

0 commit comments

Comments
 (0)