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

feat: Update and adapt to GraalVM for JDK 23 #2069

Merged
merged 91 commits into from
Feb 6, 2025

Conversation

diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented Feb 6, 2025

This PR updates the parent project of this repository "native-image-shared-config" to 1.14.0, which introduces GraalVM for JDK 23. Several adaptations were necessary. All changes listed here:

  • Update native-image-shared-config to v1.14.0
  • In order to have some classes availabe at image run-time, the <scope>provided</scope> scope flag was removed for some core dependencies. This means that the packaged jars and native images will contain these classes (transitively and statically, respectively).
  • Adapt all modules to JUnit4
    • Annotate all test classes with RunWith(JUnit4.class)
    • Exclude/remove/replace all JUnit 3.x methods and classes
    • Add "test time" native image initialization flags for JUnit classes (e.g. --initialize-at-build-time=org.junit.RunWith. These classes don't go in production code. The google-http-client-jackson2 module had most of jackson.core module initialized at build time only in the test image for simplicity.
    • For google-http-client-test, since it contains test classes in production code, the changes required binary incompatibility changes (added in clirr-ignored-differences.xml). These changes, although in production code, should not affect jars used by final users since this is just an intermediary test library.
  • Avoid "cryptic" <clinit> messages using try-catch blocks that log class initialization errors. This provides extra information when creating native images.
  • The test module google-http-client-test had a few tweaks related to upgrading to JUnit4, which made some CLIRR-ignored changes necessary. They will not affect production code since this is a production-level test-only library.
  • Tweaked reflect configuration of a few modules.

renovate-bot and others added 30 commits January 25, 2025 05:24
This reverts commit 2fbd4cb.
this is basically not rely on extending TestCase
and using @test annotations
This reverts commit 73ebee2.
This reverts commit 06acc4a.
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Feb 6, 2025
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: xl Pull request size is extra large. labels Feb 6, 2025
@diegomarquezp diegomarquezp added kokoro:force-run Add this label to force Kokoro to re-run the tests. size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Feb 6, 2025
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: xl Pull request size is extra large. labels Feb 6, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2025
@diegomarquezp diegomarquezp added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 6, 2025
Copy link
Contributor

@mpeddada1 mpeddada1 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@ldetmer ldetmer left a comment

Choose a reason for hiding this comment

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

thanks for the updates. Please just ensure the test breaking changes make it into release notes.

@diegomarquezp diegomarquezp merged commit 7a0fab3 into main Feb 6, 2025
19 checks passed
@diegomarquezp diegomarquezp deleted the support-graal-jdk-23-ii branch February 6, 2025 21:34
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Feb 7, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.cloud:google-cloud-datastore](https://github.com/googleapis/java-datastore)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.26.0` -> `2.26.1` |
|
[com.google.http-client:google-http-client-jackson2](https://github.com/googleapis/google-http-java-client)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.3` -> `1.46.0` |
|
[com.google.http-client:google-http-client](https://github.com/googleapis/google-http-java-client)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.45.3` -> `1.46.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.14` -> `2.30.15` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.14` -> `2.30.15` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.14` -> `2.30.15` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.14` -> `2.30.15` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.14` -> `2.30.15` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.30.14` -> `2.30.15` |

---

### Release Notes

<details>
<summary>googleapis/java-datastore
(com.google.cloud:google-cloud-datastore)</summary>

###
[`v2.26.1`](https://github.com/googleapis/java-datastore/blob/HEAD/CHANGELOG.md#2261-2025-02-05)

##### Bug Fixes

- **deps:** Update the Java code generator (gapic-generator-java) to
2.52.0
([9594024](googleapis/java-datastore@9594024))

##### Dependencies

- Update dependency com.google.cloud:gapic-libraries-bom to v1.51.0
([#&#8203;1726](googleapis/java-datastore#1726))
([89f31a8](googleapis/java-datastore@89f31a8))

</details>

<details>
<summary>googleapis/google-http-java-client
(com.google.http-client:google-http-client-jackson2)</summary>

###
[`v1.46.0`](https://github.com/googleapis/google-http-java-client/blob/HEAD/CHANGELOG.md#1460-2025-02-06)

##### Features

- Support JDK 23
([#&#8203;2064](googleapis/google-http-java-client#2064))
([b6a3616](googleapis/google-http-java-client@b6a3616))
- Update and adapt to GraalVM for JDK 23
([#&#8203;2069](googleapis/google-http-java-client#2069))
([7a0fab3](googleapis/google-http-java-client@7a0fab3))

##### Dependencies

- Update actions/upload-artifact action to v4.6.0
([#&#8203;2056](googleapis/google-http-java-client#2056))
([1e70d04](googleapis/google-http-java-client@1e70d04))
- Update dependency io.grpc:grpc-context to v1.70.0
([#&#8203;2068](googleapis/google-http-java-client#2068))
([7a580bf](googleapis/google-http-java-client@7a580bf))
- Update project.appengine.version to v2.0.32
([#&#8203;2065](googleapis/google-http-java-client#2065))
([2285bb1](googleapis/google-http-java-client@2285bb1))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 9507906cb3cb7366a85164991512d76c540932bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants