Add grpc-inprocess, grpc-util to shaded dependencies #2686
Merged
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 was changed
This PR adds two dependencies to
temporal-shaded
that are necessary for writing test suites.Why?
Tests rely on
InProcessServerBuilder
:sdk-java/temporal-serviceclient/src/main/java/io/temporal/internal/testservice/InProcessGRPCServer.java
Lines 5 to 6 in 89c427e
The ServerBuilder class is part of the
io.grpc:grpc-inprocess
artifact, which was not currently covered by the dependencies declared fortemporal-shaded
, causingjava.lang.ClassNotFoundException: io.temporal.shaded.io.grpc.inprocess.InProcessServerBuilder
errors at (test executing) runtime.We also depend on
SecretRoundRobinLoadBalancerProvider
:sdk-java/temporal-serviceclient/src/main/resources/META-INF/native-image/io/temporal/temporal-serviceclient/reflect-config.json
Lines 338 to 339 in 89c427e
I'm not exactly sure on how the reflection mechanism works, but I got similar
ClassNotFoundException
s without declaring a dependency ongrpc-util
.How was this tested
I have a separate project that uses the Temporal Java SDK and contains a test suite. No tests passed using the shaded SDK prior to this change. I applied the changes that are commited to this PR, rebuilt
temporal-shaded
withcd temporal-shaded && gradle build
and installed the updatedtemporal-shaded
dependency to my local maven repository by updating the plugins section intemporal-shaded/build
:plugins { id 'com.gradleup.shadow' version '8.3.3' + id 'maven-publish' }
and then running
cd temporal-shaded && gradle publishToMavenLocal
. I changed my project to use the new artifact and all tests passed.