Skip to content
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

Closed
wants to merge 6 commits into from

Conversation

burkedavison
Copy link
Member

No description provided.

@burkedavison burkedavison requested a review from a team as a code owner January 13, 2023 15:59
Copy link
Contributor

@mpeddada1 mpeddada1 left a 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?

Comment on lines +392 to +403
"name": "java.security.AlgorithmParametersSpi"
},
{
"name": "java.security.KeyStoreSpi"
},
{
"name": "java.security.MessageDigestSpi"
},
{
"name": "java.security.SecureRandomParameters"
},
{
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good find. Done.

Copy link
Member Author

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",
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member Author

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.*

@burkedavison
Copy link
Member Author

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?

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.

@burkedavison burkedavison changed the base branch from main to downstream-graalvm January 17, 2023 14:39
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
50.2% 50.2% Duplication

@burkedavison
Copy link
Member Author

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.

Base automatically changed from downstream-graalvm to main January 17, 2023 17:39
@burkedavison burkedavison marked this pull request as draft January 17, 2023 17:55
@burkedavison burkedavison added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jan 17, 2023
@burkedavison burkedavison deleted the gax-grpc-reflect-config branch January 19, 2023 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Indicates a pull request not ready for merge, due to either quality or timing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants