-
Notifications
You must be signed in to change notification settings - Fork 63
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
docs(sample): Add sample for native image support in Firestore #872
Conversation
Warning: This pull request is touching the following templated files:
|
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 - a few Q's
Number of users whose first name is 'Ada': 0 | ||
``` | ||
|
||
## Sample Integration test with Native Image Support |
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.
You might wish to include some metrics they might be interested in if they were to do this. (ie. how much faster are things?)
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.
yes, that's a nice idea! Modified the code to also print the duration at the end.
samples/native-image-sample/pom.xml
Outdated
<maven.compiler.target>1.8</maven.compiler.target> | ||
<maven.compiler.source>1.8</maven.compiler.source> |
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.
Should these be 1.11
?
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.
thank you! Done.
🤖 I have created a release *beep* *boop* --- ### [3.0.13](v3.0.12...v3.0.13) (2022-02-22) ### Bug Fixes * retry watch on InternalException ([#875](#875)) ([a76a0fd](a76a0fd)) ### Documentation * **sample:** Add sample for native image support in Firestore ([#872](#872)) ([a01fe88](a01fe88)) ### Dependencies * update dependency com.google.cloud:native-image-support to v0.12.4 ([#882](#882)) ([b2aeb1a](b2aeb1a)) * update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 ([#881](#881)) ([036f7f8](036f7f8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
<dependency> | ||
<groupId>org.junit.vintage</groupId> | ||
<artifactId>junit-vintage-engine</artifactId> | ||
<version>5.8.2</version> |
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.
I expect these version number declaration for junit-vintage-engine and junit-platform-native would create multiple RenovateBot pull requests for different repositories in future. Is there a better place to declare the pair?
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.
And native-maven-plugin version.
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.
Yes, that's right. That's a good point! We can consider putting these settings in com.google.cloud.samples:shared-configuration
? https://github.com/GoogleCloudPlatform/java-repo-tools/blob/main/pom.xml
This PR copies over the Firestore sample, Setup Instructions and README for native image support from GoogleCloudPlatform/native-image-support-java. It also adds an integration test that can be run as a native image.
Calling
mvn package -Pnative -DskipTests
builds the native image for the application and callingmvn test -Pnative
runs the test as a native image.For more information: https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#configuration