Repository navigation
fix(build): align the macOS kqueue transport with gRPC's Netty version - #507
Open
NopeCharon wants to merge 1 commit into
Open
NopeCharon wants to merge 1 commit into
NopeCharon wants to merge 1 commit into
Conversation
grpc-netty-macos and grpc-netty-macos-aarch64 depend on grpc-netty at grpcVersion and on netty-transport-native-kqueue at nettyVersion. The two have to stay in sync, but nothing enforced it: since Dependabot groups io.grpc and io.netty updates, every gRPC bump went through while nettyVersion stayed at 4.2.9.Final. grpc-netty 1.85.1 uses Netty 4.2.17.Final, so the runtime classpath of the macOS modules, and of the provider and helper on macOS, combined netty-transport-native-kqueue and netty-transport-classes-kqueue 4.2.9.Final with netty-transport and netty-transport-native-unix-common 4.2.17.Final. The published POMs carry the same mismatch to every macOS consumer, while Netty native transports are only supported at the exact version of the rest of Netty. Bump nettyVersion to 4.2.17.Final, and add a verifyNettyVersions task to both macOS modules, wired into check. It fails the build when any io.netty module on the runtime classpath resolves to a version other than nettyVersion and lists the offending modules, so a gRPC update that moves Netty can no longer be merged without the matching kqueue bump. The task reads the resolved artifacts through a provider, so it does not access the project at execution time. Also correct the comment on nettyVersion: the macOS modules use the unshaded grpc-netty, not grpc-netty-shaded. Fixes spiffe#505 Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bumps
nettyVersionfrom4.2.9.Finalto4.2.17.Final, the Netty versionio.grpc:grpc-netty:1.85.1depends on.netty-transport-native-kqueueingrpc-netty-macosandgrpc-netty-macos-aarch64now matches the rest of Netty on their runtime classpath.Adds a
verifyNettyVersionstask to both macOS modules and wires it intocheck. It fails the build when anyio.nettymodule on the runtime classpath resolves to a version other thannettyVersion:It reads the resolved artifacts through a provider, so it doesn't access the project at execution time.
Fixes the comment on
nettyVersion. The macOS modules use the unshadedgrpc-netty, notgrpc-netty-shaded.Adds a changelog entry.
Fixes #505
Why
The build already said
nettyVersionhad to stay in sync with gRPC, but nothing checked it. Since Dependabot groups theio.grpc:*andio.netty:*updates (#403), every gRPC bump has been merged whilenettyVersionstayed at 4.2.9. Onmain, the macOS modules (and the provider and helper on macOS) resolvenetty-transport-native-kqueueandnetty-transport-classes-kqueue4.2.9.Final next tonetty-transportandnetty-transport-native-unix-common4.2.17.Final, and the published POMs carry that mismatch to consumers. Netty supports native transports only at the same version as the rest of Netty.With the check, a dependency update that moves gRPC's Netty without moving
nettyVersion(or the other way round) fails CI with a message that says which version to set. This covers the Netty alignment concern in #106 for the modules that mix the two.How tested
./gradlew :java-spiffe-core:grpc-netty-macos-aarch64:dependencies --configuration runtimeClasspathnow showsnetty-transport-native-kqueueandnetty-transport-classes-kqueueat 4.2.17.Final, like every other Netty module.nettyVersionset back to 4.2.9.Final,./gradlew verifyNettyVersionsfails for both modules with the message above. With 4.2.17.Final it passes, and--warning-mode allreports no deprecation from the new task../gradlew clean buildon JDK 17 (Linux). The macOS-specific runtime path relies on the macOS CI job.