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

docs(sample): Add sample for native image support in Firestore #872

Merged
merged 2 commits into from
Feb 18, 2022

Conversation

mpeddada1
Copy link
Contributor

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 calling mvn test -Pnative runs the test as a native image.

For more information: https://graalvm.github.io/native-build-tools/latest/maven-plugin.html#configuration

@mpeddada1 mpeddada1 requested review from a team as code owners February 14, 2022 18:52
@generated-files-bot
Copy link

Warning: This pull request is touching the following templated files:

  • samples/pom.xml

@product-auto-label product-auto-label bot added api: firestore Issues related to the googleapis/java-firestore API. samples Issues that are directly related to samples. labels Feb 14, 2022
Copy link
Contributor

@lesv lesv left a 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
Copy link
Contributor

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?)

Copy link
Contributor Author

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.

Comment on lines 23 to 24
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you! Done.

@mpeddada1 mpeddada1 merged commit a01fe88 into main Feb 18, 2022
@mpeddada1 mpeddada1 deleted the native-sample branch February 18, 2022 20:46
gcf-merge-on-green bot pushed a commit that referenced this pull request Feb 22, 2022
🤖 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>
Copy link
Member

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?

Copy link
Member

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.

Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/java-firestore API. samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants