-
Notifications
You must be signed in to change notification settings - Fork 70
chore: convert to static reflect-config.json using client generator #1841
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
Conversation
gapic-generator-java/src/main/java/com/google/api/generator/gapic/protoparser/Parser.java
Show resolved
Hide resolved
...rc/main/java/com/google/api/generator/gapic/composer/ClientLibraryReflectConfigComposer.java
Show resolved
Hide resolved
|
Latest commit intended to break the golden tests, and did. |
| --features=com.google.api.gax.grpc.nativeimage.ProtobufMessageFeature,\ | ||
| com.google.api.gax.grpc.nativeimage.GrpcNettyFeature \ | ||
| -H:-RunReachabilityHandlersConcurrently | ||
| -H:-RunReachabilityHandlersConcurrently |
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.
ProtobufMessageFeature and -H:-RunReachabilityHandlersConcurrently have now been reintroduced.
Implementation plan:
- Merge and release with this PR's changes.
- Wait for Owlbot to use the updated gapic-generator-java, and generate the reflect-config.json for each client libary.
- In the next release cycle: Remove
ProtobufMessageFeatureand-H:-RunReachabilityHandlersConcurrently, perform downstream testing on the client libraries that will then have local reflect-configs.
meltsufin
left a comment
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.
Please add an issue to track removal of the feature in the next release cycle, if you haven't already.
|
#1844 created and CC'd release managers @JoeWang1127 and @blakeli0 for visibility. |
...rc/main/java/com/google/api/generator/gapic/composer/ClientLibraryReflectConfigComposer.java
Outdated
Show resolved
Hide resolved
...rc/main/java/com/google/api/generator/gapic/composer/ClientLibraryReflectConfigComposer.java
Outdated
Show resolved
Hide resolved
gapic-generator-java/src/main/java/com/google/api/generator/gapic/model/Message.java
Show resolved
Hide resolved
...rc/main/java/com/google/api/generator/gapic/composer/ClientLibraryReflectConfigComposer.java
Outdated
Show resolved
Hide resolved
gapic-generator-java/src/main/java/com/google/api/generator/gapic/Generator.java
Show resolved
Hide resolved
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.
This looks great.
Pending one minor comment to add the TODO (discussed offline) about the structure of the META-INF/native/image directory. Not an issue rn as we are only expecting one reflect-config.json per library but in the future we may need to enhance this logic a bit to follow convention (https://www.graalvm.org/22.1/reference-manual/native-image/BuildConfiguration/#embedding-a-configuration-file) so that the configs don't get overridden if we have have two files that have the same file path.
…the binary name rather than the fully qualified name in the reflect-config.json entries
Done. |
blakeli0
left a comment
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.
LGTM.
|
[gapic-generator-java-root] Kudos, SonarCloud Quality Gate passed! |
|
[java_showcase_integration_tests] Kudos, SonarCloud Quality Gate passed!
|
|
[java_showcase_unit_tests] Kudos, SonarCloud Quality Gate passed!
|









A
reflect-config.jsonis now generated as part of the client.ProtobufMessageFeaturethat uses build-time logic to dynamically register classes for reflection has been removed from the gax-grpc native configuration.reflect-config.jsonin their file set.Showcase native-test binary size on Mac w/GraalVM 22.3.0 Java 17 CE:
ProtobufMessageFeature: 102.7MBreflect-config.json: 89.8MB