Skip to content

chore: replace AlloyDBFeature with static JSON config#645

Merged
enocom merged 2 commits intomainfrom
graal-shared-config
May 28, 2025
Merged

chore: replace AlloyDBFeature with static JSON config#645
enocom merged 2 commits intomainfrom
graal-shared-config

Conversation

@enocom
Copy link
Member

@enocom enocom commented May 28, 2025

This commit removes the references to the GraalVM SDK and also removes
the AlloyDBFeature class. Instead, the commit uses JSON to configure the
native image.

This resolves a few problems:

  • The code wasn't consuming the latest GraalVM SDK from the parent POM
  • The presence of newer GraalVM breaks tests on Java 8.
  • The native-image META-INF directory wasn't matching
    groupId/artifactId for the Java Connector.

Now, with this commit, there is no need to reference GraalVM SDK at all.
And there is no conflict with Java 8 tests. In addition, there's no need to
keep the native-image.properties file either.

Note that we're using reflect-config.json, the format for GraalVM for JDK 21 1.
The file name and format changes to reachability-metadata.json for JDK 24 2.
For now, it seems other Cloud SDK libraries are using the JDK 21 format, so we'll
stick to that.

@enocom enocom requested a review from a team as a code owner May 28, 2025 15:29
@enocom enocom requested review from mpeddada1 and nancynh May 28, 2025 15:30
@enocom enocom force-pushed the graal-shared-config branch 6 times, most recently from 9eede2e to b91b021 Compare May 28, 2025 16:05
@enocom enocom force-pushed the graal-shared-config branch 6 times, most recently from 8034a53 to b8bfada Compare May 28, 2025 19:37
@enocom enocom changed the title chore: consume graal-sdk from google-cloud-shared-config chore: replace AlloyDBFeature with static JSON config May 28, 2025
@enocom enocom force-pushed the graal-shared-config branch 9 times, most recently from f0ca382 to 8df2ff9 Compare May 28, 2025 21:32
This commit removes the references to the GraalVM SDK and also removes
the AlloyDBFeature class. Instead, the commit uses JSON to configure the
native image.

This resolves a few problems:
- The code wasn't consuming the latest GraalVM SDK from the parent POM
- The presence of newer GraalVM breaks tests on Java 8.
- The native-image META-INFO directory wasn't matching
  groupId/artifactId for the Java Connector.

Now, with this commit, there is no need to reference GraalVM SDK at all.
And there is no conflict with Java 8 tests.
@enocom enocom force-pushed the graal-shared-config branch from 8df2ff9 to f0712ea Compare May 28, 2025 21:44
@enocom
Copy link
Member Author

enocom commented May 28, 2025

@nancynh @mpeddada1 this is ready for review.

The successful GraalVM test build can be found here: https://github.com/GoogleCloudPlatform/alloydb-java-connector/actions/runs/15311240508/job/43076160971.

I've since restored the GraalVM tests to nightly and updated the description to cover what we've done here.

Thanks again to @mpeddada1 for the suggestion to migrate to static config.

@enocom enocom requested review from mpeddada1 and nancynh May 28, 2025 21:54
Copy link
Collaborator

@nancynh nancynh left a comment

Choose a reason for hiding this comment

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

Amazing! Great work, and thank you!

@enocom enocom merged commit d16ede5 into main May 28, 2025
16 checks passed
@enocom enocom deleted the graal-shared-config branch May 28, 2025 22:11
enocom added a commit that referenced this pull request May 29, 2025
This commit cleans up additional leftovers following #645.

In particular:

- Rename the CI workflow from graalvm17 to just graalvm
- Remove unnecessary dependency management config and build config for the
  GraalVM profile, and instead use the configuration from the parent POM.
- Remove unnecessary values from reflect config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants