Skip to content

Bump Netty to 4.1.140.Final and release 2.23.3-li-0.7 - #11

Open
crliao wants to merge 2 commits into
s3-li-2.23.3from
crliao/netty-4.1.140-li-0.7
Open

crliao wants to merge 2 commits into
s3-li-2.23.3from
crliao/netty-4.1.140-li-0.7

Conversation

@crliao

@crliao crliao commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation and Context

Internal dependency validation for software.amazon.awssdk:s3:2.23.3-li-0.6 failed: it blocked io.netty 4.1.100.Final (netty-codec, netty-codec-http, netty-codec-http2, netty-common, netty-handler), which has several High advisories and one Critical (GHSA-c4c3-7fpv-j4q5). The recommended fix is moving to 4.1.140.Final (no known advisories, past the 7-day cooldown), aligning tcnative, and republishing as li-0.7.

Modifications

  • netty.version: 4.1.100.Final → 4.1.140.Final
  • netty-open-ssl-version (tcnative): 2.0.61.Final → 2.0.85.Final, matching tcnative.version in Netty 4.1.140.Final's parent POM
  • All 453 reactor POMs: 2.23.3-li-0.6 → 2.23.3-li-0.7 (includes both references in services/pom.xml)
  • No remaining 4.1.100/2.0.61 pins.
  • NettyUtils: also map the JDK's SocketException("Connection reset") (exact message) to the closed-channel error, not just "Connection reset by peer". Adds unit tests for the new case and for an unrelated IOException that must stay unmapped.
  • PingTimeoutTest: measure elapsed time with System.nanoTime() instead of Instant, with a 100ms lower-bound tolerance (a 9.999s run failed the 10s bound).

Testing

Local macOS run with the ./mvnw wrapper:

  • RELEASE_VERSION=2.23.3-li-0.7 python3 .github/scripts/check-linkedin-release.py: passed. All reactor and profile POM versions are consistent, and li-0.7 is not yet published.
  • python3 -m unittest discover -s .github/scripts -p 'test_*.py': passed
  • ./mvnw -B verify -pl http-clients/netty-nio-client -Djapicmp.skip: BUILD SUCCESS, 0 failures.
    • Before the NettyUtils/PingTimeoutTest fix, the same module had 3 failures. The 2 ServerConnectivityErrorMessageTest.closeTimeHasCorrectMessage cases failed because the JDK reports "Connection reset". The test and mapping match upstream aws/aws-sdk-java-v2 master, and they also fail on upstream's Netty 4.1.138 pins, so this isn't caused by 4.1.140.
    • Bisecting confirmed the 2.0.85 tcnative bump is needed: 4.1.140 with the old 2.0.61 had 7 of 16 failures.
  • ./mvnw -B test -o -pl http-clients/netty-nio-client -Dtest='NettyUtilsTest,PingTimeoutTest,ServerConnectivityErrorMessageTest' -Djapicmp.skip on the final commit: 46/46 passed.
  • Full-reactor local clean verify: incomplete. It stopped at one timing-sensitive test in SDK Core (HttpClientApiCallTimeoutTest), which this PR doesn't touch. The Publish LinkedIn SDK workflow runs a full clean verify on hosted Linux before any upload.
  • PR CI (build (8), build (11), release-checks): passing.

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

Risks and follow-ups

  • Netty 4.1.100 → 4.1.140 is a 40-patch-release jump. The tests above cover the Netty client module only; HTTP/2 and S3 behavior needs hosted CI.
  • After merge: publish li-0.7 (dry run first), complete internal dependency approval for software.amazon.awssdk:s3:2.23.3-li-0.7, then retarget linkedin-multiproduct/AmbryLI#4358 to 0.7.

License

  • I confirm that this pull request can be released under the Apache 2 license

Netty 4.1.100.Final fails OSS Canary validation (GHSA-c4c3-7fpv-j4q5 and
several High advisories), which blocked the internal ELR for li-0.6.
Bump netty.version to 4.1.140.Final, align netty-open-ssl-version
(tcnative) to 2.0.85.Final as pinned by Netty 4.1.140, and move the
reactor to 2.23.3-li-0.7.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
NettyUtils only mapped "Connection reset by peer" to the closed-channel
error, so a JDK SocketException("Connection reset") surfaced unmapped and
ServerConnectivityErrorMessageTest failed. Match that exact message too.

PingTimeoutTest measured elapsed time with Instant (wall clock), which
produced 9.999s against a 10s lower bound. Use System.nanoTime and a
100ms lower-bound tolerance.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@crliao
crliao marked this pull request as ready for review December 3, 2026 23:48

@jitheshtr jitheshtr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed this revision's Netty/tcnative alignment, complete reactor version update, exception handling, and HTTP/2 compatibility. No blocking findings. Independent Java 11 Netty-module verify passed, including empty-request END_STREAM, early-reset, TLS-authentication, connection-error, and ping-timeout tests; release preflight also passed. The inline notes are nonblocking documentation and consumer-rollout follow-ups, not requests to weaken hostname verification.

Comment thread pom.xml
<!-- Update netty-open-ssl-version accordingly whenever we update netty version-->
<!-- https://github.com/netty/netty/blob/4.1/pom.xml search "tcnative.version" -->
<netty.version>4.1.100.Final</netty.version>
<netty.version>4.1.140.Final</netty.version>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonblocking: please call out the hostname-verification behavior change in Risks and check intended consumers before rollout. Netty 4.1.135 fixed GHSA-c653-97m9-rcg9: plain X509TrustManagers supplied through tlsTrustManagersProvider(...) no longer bypass endpoint identification. This SDK already sets HTTPS endpoint identification, so such consumers can now reject IP-address or hostname/certificate-SAN mismatches on both JDK and OpenSSL providers. This is the intended security fix; affected consumers should correct their endpoint/certificate setup rather than disable verification.

Comment thread pom.xml
<testng.version>7.1.0</testng.version> <!-- TCK Tests -->
<commons-lang.verson>2.6</commons-lang.verson>
<netty-open-ssl-version>2.0.61.Final</netty-open-ssl-version>
<netty-open-ssl-version>2.0.85.Final</netty-open-ssl-version>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonblocking: this matches Netty 4.1.140's published tcnative pin, but tcnative is test-scoped in both bom-internal and netty-nio-client; upgrading the SDK therefore does not upgrade a consumer's independently supplied native TLS library. Please document that distinction and verify the resolved/runtime netty-tcnative-* version for intended adopters, aligning it to 2.0.85.Final or a separately validated compatible version.

Comment thread pom.xml
<groupId>software.amazon.awssdk</groupId>
<artifactId>aws-sdk-java-pom</artifactId>
<version>2.23.3-li-0.6</version>
<version>2.23.3-li-0.7</version>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonblocking release-plan correction: the description says to publish after merge with a dry run first, but merging to s3-li-2.23.3 already triggers publish-linkedin.yml, which runs full clean verify and then uploads automatically. The dry-run input applies only to manual dispatch; the current publishing environment has branch-policy protection but no reviewer approval gate. Please align the stated release procedure with that behavior. Also label the Java 8/11 PR checks as compilation-only: their command uses -DskipTests; the hosted full test run happens after merge.

return originalCause instanceof IOException &&
message != null &&
message.contains("Connection reset by peer");
(message.equals("Connection reset") || message.contains("Connection reset by peer"));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nonblocking: could we add a brief comment explaining why the new alternative is an exact match? Http2ToHttpInboundAdapter.Http2ResetException has a message beginning Connection reset. Error - ... and should retain its existing classification. Broadening this to contains("Connection reset") would also wrap those stream-reset errors. The new negative test already guards broad substring matching; a short comment would preserve the protocol reason for keeping this narrow.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants