-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(gax-grpc): Add native reflect-config.json #1246
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thank you for putting up these configs @burkedavison! To verify them, would it be possible to create a draft PR with these and run the google-cloud-java
nightly job from that PR's commit?
...ax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/reflect-config.json
Outdated
Show resolved
Hide resolved
...ax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/reflect-config.json
Outdated
Show resolved
Hide resolved
"name": "java.security.AlgorithmParametersSpi" | ||
}, | ||
{ | ||
"name": "java.security.KeyStoreSpi" | ||
}, | ||
{ | ||
"name": "java.security.MessageDigestSpi" | ||
}, | ||
{ | ||
"name": "java.security.SecureRandomParameters" | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GraalVM provides some features of its own that handle some commonly used dependencies and JRE classes. For example, a feature class that registers sun.security
for reflection: https://github.com/oracle/graal/blob/master/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/SecurityServicesFeature.java. I wonder if these configurations needed to be added on our end if they are already supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: There are still .sun. entries that may be removable, but I've left anything I wasn't sure about.
Specifically:
com.sun.crypto.provider.TlsMasterSecretGenerator
com.sun.jndi.dns.DnsContextFactory
sun.misc.Unsafe
sun.nio.ch.SelectorImpl
With additional likely-handled classes:
javax.security.auth.x500.X500Principal
jdk.internal.misc.Unsafe
And to be determined entries:
java.security.*
] | ||
}, | ||
{ | ||
"name": "io.grpc.netty.shaded.io.netty.util.internal.shaded.org.jctools.queues.BaseMpscLinkedArrayQueueConsumerFields", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these configs are already supported in https://github.com/googleapis/gax-java/blob/main/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java. Could we verify if that's the case for the other shaded netty classes as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: There are still entries in reflect-config.json that might best be organized with GrpcNettyFeature
but that aren't part of it today.
See remaining entries: io.grpc.netty.shaded.io.netty.*
…/GoogleJsonClientFeature
Hey Mridula -- verifying this w/ the downstream repo is a very good idea. I'm going to discuss with Tomo about how we might organize the merge order of the separate PRs such that we can ensure we have validated this config is correct. |
SonarCloud Quality Gate failed. |
Note: Merging main into this branch has caused the duplication check to fail due to the already-merged code not meeting standards. If this is an issue, I can rework the PR. |
No description provided.