-
Notifications
You must be signed in to change notification settings - Fork 59
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
chore: prepare showcase for Graal SDK 23.x #3574
Merged
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0796cda
chore: prepare showcase for Graal SDK 23.x
diegomarquezp d48ecf9
move config to gax module
diegomarquezp 81c1a27
correct whitespace in native properties of gax
diegomarquezp 98eaf9f
add reflection config for java.time.Instant
diegomarquezp 7fd94d9
restore config
diegomarquezp 0c0ac6d
Merge branch 'main' into showcase-graal-23
diegomarquezp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.../main/resources/META-INF/native-image/com.google.showcase.v1beta1/native-image.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Args = --initialize-at-build-time=io.grpc.internal.TimeProvider,\ | ||
io.grpc.internal.InstantTimeProvider, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we know why they have to be added? Are they showcase specific or we have to add them to common modules like Gax as well?
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.
It's definitely at the grpc level. I'll test with another library to see if it happens and possible move this config to gax.
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 obtained this from trying the native tests in java-firestore
I'll move this to gax
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.
Done
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.
So if I understand correctly,
TimeProvider
andInstantTimeProvider
are now used during client initialization by grpc-java, hence we have to add them tonative-image.properties
? This is not due to GraalVM upgrade but rather a grpc upgrade?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, Diego! I think the solution makes sense.
However, looking at the change in grpc, we should've run into this error since two months ago, do we know why only GraalSDK 23.x triggered this error?
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'll look into commits and release notes of the Graal SDK.
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.
Looks like Graal SDK 22 introduced a new class initialization strategy called
strict image heap
, which is enforced by default.Since this is a behavior change affecting which classes are initialized, I'm leaning towards this new strategy being the cause.
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 is the parent feature: oracle/graal#4684
This was followed by the new strategy by default: oracle/graal#7474
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.
Perfect, thanks! Do you mind adding these info to the description? Also be mindful that this change may affect handwritten libraries as well.