-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Test against GraalVM native image technology #1338
Conversation
aca8682
to
077fcd7
Compare
native-image
dac2478
to
cf9acbe
Compare
./gradlew --version | ||
|
||
echo "Building and running the GraalVM native image app" | ||
./gradlew -PjavaVersion=${JAVA_VERSION} -Dorg.mongodb.test.uri=${MONGODB_URI} :graalvm-native-image-app:nativeRun |
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.
Note how we only build and run the application, but do not collect reachability metadata - we use that from graalvm-native-image-app/src/main/resources/META-INF/native-image
, which I collected on my computer (see graalvm-native-image-app/readme.md
), and also manually added entries for shared libraries for OSes/ISAs different from mine. This means there is a chance we will be able to shovel this metadata in the right JARs and then build and run using only what we have in the JARs. I created JAVA-5381.
.evergreen/.evg.yml
Outdated
@@ -2286,3 +2299,10 @@ buildvariants: | |||
tasks: | |||
- name: testazurekms_task_group | |||
batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README | |||
|
|||
- matrix_name: "graalvm-native-image-app" | |||
matrix_spec: { version: [ "5.0", "7.0" ], topology: [ "replicaset" ], auth: [ "noauth" ], ssl: [ "nossl" ], |
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 should probably test with "ssl"
and "auth"
in the future. I created JAVA-5382.
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.
Agreed, and let's also add a ticket for zstd and snappy compression testing
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.
Created JAVA-5383.
native-image
native-image
Added an example of a native application that uses the driver and is built using GraalVM. The application runs the existing tour applications for the sync, legacy and reactive driver APIs. JAVA-3580
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 really good!
.evergreen/.evg.yml
Outdated
@@ -2286,3 +2299,10 @@ buildvariants: | |||
tasks: | |||
- name: testazurekms_task_group | |||
batchtime: 20160 # Use a batchtime of 14 days as suggested by the CSFLE test README | |||
|
|||
- matrix_name: "graalvm-native-image-app" | |||
matrix_spec: { version: [ "5.0", "7.0" ], topology: [ "replicaset" ], auth: [ "noauth" ], ssl: [ "nossl" ], |
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.
Agreed, and let's also add a ticket for zstd and snappy compression testing
} | ||
|
||
dependencies { | ||
// we intentionally depend here on the driver artifacts instead of depending on compiled 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.
Oh, this is cool. I'm glad that we're able to do this.
graalvm-native-image-app/src/main/resources/META-INF/native-image/jni-config.json
Show resolved
Hide resolved
graalvm-native-image-app/src/main/resources/META-INF/native-image/resource-config.json
Show resolved
Hide resolved
graalvm-native-image-app/src/main/com/mongodb/internal/graalvm/NativeImageApp.java
Show resolved
Hide resolved
…alvm-native-image-app` JAVA-3580
JAVA-3580
…ction when running `.evergreen/run-graalvm-native-image-app.sh` JAVA-3580
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.
LGTM!
JAVA-3580
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.
LGTM!
JAVA-3580
Added an example of a native application that uses the driver and is built using GraalVM.
The application runs the existing tour applications for the sync, legacy and reactive driver APIs.
The added application is built and run by Evergreen via the
graalvm-native-image-app
task with the the variant GraalVM native image app: 7.0 Replica Set NoAuth NoSSL JDK21 Linux.Reviewers:
dbx-java
, but I suspect he already has his plate full with CSOT, so I picked @katcharov instead.Future work:
JAVA-3580