-
Notifications
You must be signed in to change notification settings - Fork 291
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: Adding documentation for experimental native image support #2357
base: main
Are you sure you want to change the base?
Conversation
…me hints for data class with template.
…anaged by repository need runtime hints for native image.
@burkedavison @mpeddada1 Here is an initial draft on native documentation. PTAL! |
@@ -0,0 +1,107 @@ | |||
== Native Image Support (Experimental) | |||
|
|||
https://www.graalvm.org/docs/[GraalVM Native Image] allows you to ahead-of-time compile Java code to a standalone executable. |
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.
We might want to call out https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html as the link, since it's more likely to provide the information a Spring user is looking for.
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.
Similar link is provided in the Usage section. But I like the idea of calling out here at the top too.
fixed in 348f6bf
docs/src/main/asciidoc/native.adoc
Outdated
|
||
3. Call `mvn -Pnative spring-boot:build-image` | ||
|
||
==== Native Build Plugins |
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 section mixes explanations of the different pieces with steps needing to be taken by the developer -- and so it ends up being a bit confusing as to what the instructions actually are.
Can this be reworked to either defer to the official Spring Boot docs, or make the setup+invoke instructions distinct from the explanation of the different parts?
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.
Thanks! Let me rethink about this section.
|
||
==== Datastore | ||
|
||
To use `DatastoreTemplate` methods on Domain types not managed by `DatastoreRepository`, you need to register runtime hints for these domain POJOs in your application. For more details, refer to example |
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 thought these were @Entity
classes?
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.
Trying to align with our documentation wording here. Regarding object mapping, we state in documentation: "Spring Data Cloud Datastore allows you to map domain POJOs to Cloud Datastore kinds and entities via annotations:" (code)
|
||
==== Firestore | ||
|
||
To use `FirestoreTemplate` methods on Domain types not managed by `FirestoreReactiveRepository`, you need to register runtime hints for these domain POJOs in your application. For more details, refer to example https://github.com/GoogleCloudPlatform/spring-cloud-gcp/tree/main/spring-cloud-gcp-samples/spring-cloud-gcp-data-firestore-sample/src/main/java/com/example/DomainTypeRuntimeHints.java[`DomainTypeRuntimeHints`] in Reactive Firestore Repository sample application. |
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.
Similarly, I thought these were @Document
classes? Is "Domain types" clear enough for customers to understand the set of classes that will need hints?
…to native ci (#2384) Changes in this PR: Add runtime hints for `GcpCloudSqlProperties.class` in sql autoconfigure. Other changes: - Adds `sql-mysql-sample` , `sql-postgres-sample` and `sql-postgres-r2dbc-sample` to native ci. - Setups to pass DB password to native test. (In integration ci, db password is stored as env and passed as option [here](https://github.com/GoogleCloudPlatform/spring-cloud-gcp/blob/5c922f260c1ca9c69e942bc351fbe83a4eb5ee60/.github/workflows/integrationTests.yaml#L165-L170). pass same env var through `maven-surefire-plugin` in `nativeTest` profile.) - Changes in instance name setup for tests, now it tests run under `spring-cloud-gcp-ci` project and native tests run in `spring-cloud-gcp-ci-native` project. Todos: - Update sample tests to be parallel safe. Currently, if test unexpected failed, db won't be cleaned up for next run. - Documentation: will add to #2357
Quality Gate passedKudos, no new issues were introduced! 0 New issues |
This pr adds bigquery module integration tests (core and integration) to native ci. To achieve this, changes includes: - Add runtime hints for resources used in test (data.csv, data.json). - Fore integration test configuration class, remove `@EnableIntegration` and add `@SpringBootConfiguration`, configure a `ThreadPoolTaskScheduler` bean as it's not provided by `@EnableIntegration` now. - For documentation, since #2357 is not merged, will add to it separately.
Quality Gate passedIssues Measures |
This pr:
native.adoc
.Related:
spanner related content to be added in separate pr.