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

Initial test of updated workflow with local graalvm artefacts #565

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

jerboaa
Copy link
Collaborator

@jerboaa jerboaa commented Sep 11, 2023

This is an initial set for CI testing the issue of JDK bytecode level
compatibility of graalvm maven artefacts. It uses the new --maven-deploy-local
flag and does the following:

  1. Builds Mandrel and also installs maven artefacts to the local repo
  2. Archives the maven repo, specifically the org/graalvm artefacts as well as records the maven version being used by the local maven install.
  3. Builds quarkus with JDK 11 (currently the lowest supported JDK version) by using pre-installed graalvm artefacts built in step 2. It also sets the graal-sdk version via a property, to the locally available one.
  4. Checks whether the build passes (as CI does on it's own) and also verifies no extra org.graalvm artefacts have been downloaded from the Internet when building quarkus.
  5. Uses the locally built GraalVM artefacts for Quarkus native IT tests (which will show issues ahead of the GraalVM release; good thing!).

Test actions:

Closes: #526

@jerboaa jerboaa requested a review from zakkak September 11, 2023 12:55
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 11, 2023
@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 11, 2023

Keeping in draft until CI runs complete.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 11, 2023

One caveat of this update is that now mandrel and quarkus build are being serialized, since the quarkus build depends on the locally deployed maven artefacts from the earlier mandrel build.

Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

LGTM, I only have a couple of comments/questions.

.github/workflows/base.yml Outdated Show resolved Hide resolved
.github/workflows/base.yml Outdated Show resolved Hide resolved
.github/workflows/base.yml Outdated Show resolved Hide resolved
.github/workflows/base.yml Show resolved Hide resolved
.github/workflows/base.yml Outdated Show resolved Hide resolved
@jerboaa jerboaa force-pushed the local_install_quarkus_jdk11_pr branch from 1447875 to a4c1a4e Compare September 11, 2023 14:53
@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 11, 2023

The move to 23.1.x graalvm in native image tests will reveal a different set of problems. For example:

Error: Class-path entry file:///home/runner/work/graal/graal/quarkus/integration-tests/hibernate-orm-panache-kotlin/target/quarkus-integration-test-hibernate-orm-panache-kotlin-999-SNAPSHOT-native-image-source-jar/lib/org.graalvm.sdk.collections-23.1.0.0.SNAPSHOT.jar contains class org.graalvm.collections.EconomicMapWrap. This class is part of the image builder itself (in file:///home/runner/work/graal/graal/graalvm-home/lib/jvmci/collections.jar) and must not be passed via -cp. This can be caused by a fat-jar that illegally includes svm.jar (or graal-sdk.jar) due to its build-time dependency on it. As a workaround, -H:+AllowDeprecatedBuilderClassesOnImageClasspath allows turning this error into a warning. Note that this option is deprecated and will be removed in a future version.
com.oracle.svm.core.util.UserError$UserException: Class-path entry file:///home/runner/work/graal/graal/quarkus/integration-tests/hibernate-orm-panache-kotlin/target/quarkus-integration-test-hibernate-orm-panache-kotlin-999-SNAPSHOT-native-image-source-jar/lib/org.graalvm.sdk.collections-23.1.0.0.SNAPSHOT.jar contains class org.graalvm.collections.EconomicMapWrap. This class is part of the image builder itself (in file:///home/runner/work/graal/graal/graalvm-home/lib/jvmci/collections.jar) and must not be passed via -cp. This can be caused by a fat-jar that illegally includes svm.jar (or graal-sdk.jar) due to its build-time dependency on it. As a workaround, -H:+AllowDeprecatedBuilderClassesOnImageClasspath allows turning this error into a warning. Note that this option is deprecated and will be removed in a future version.
	at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageClassLoaderSupport.reportBuilderClassesInApplication(NativeImageClassLoaderSupport.java:907)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.ImageClassLoader.loadAllClasses(ImageClassLoader.java:105)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:385)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:711)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:142)
	at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:97)

See https://github.com/jerboaa/graal/actions/runs/6146546436/job/16682581790#step:12:415

But that's another issue. Moving out of draft. As CI testing seems to be doing what it's supposed to.

@jerboaa jerboaa marked this pull request as ready for review September 11, 2023 18:57
@zakkak
Copy link
Collaborator

zakkak commented Sep 11, 2023

This reminds me of quarkusio/quarkus#28650, we probably just need to expand the exclusion list.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 11, 2023

This reminds me of quarkusio/quarkus#28650, we probably just need to expand the exclusion list.

+1. Do you mind creating a patch for this, please?

@zakkak
Copy link
Collaborator

zakkak commented Sep 11, 2023

This reminds me of quarkusio/quarkus#28650, we probably just need to expand the exclusion list.

+1. Do you mind creating a patch for this, please?

Sure, I 'll take care of it tomorrow

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 12, 2023

https://github.com/jerboaa/graal/actions/runs/6146546436/job/16682586135 is the test run with this. The remaining issues are to do with this issue mentioned above and other known Mandrel IT issues tracked elsewhere. I'm going to merge.

@jerboaa jerboaa merged commit 407c277 into graalvm:default Sep 12, 2023
@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 12, 2023

Unfortunately, that broke the GraalVM Community CI build. Fix in #566

@zakkak
Copy link
Collaborator

zakkak commented Sep 12, 2023

@jerboaa it also breaks the "gradle tooling" test, see https://github.com/jerboaa/graal/actions/runs/6146546436/job/16682586395#step:12:465

It looks like we need a way to make gradle aware of the local artifacts.

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 12, 2023

@jerboaa it also breaks the "gradle tooling" test, see https://github.com/jerboaa/graal/actions/runs/6146546436/job/16682586395#step:12:465

It looks like we need a way to make gradle aware of the local artifacts.

Thanks, yes I noticed it. I have no idea how to do that. Perhaps it needs to get some property set (-Dgraal.sdk-version=<released-version>) or something?

@jerboaa
Copy link
Collaborator Author

jerboaa commented Sep 12, 2023

Anyone with more gradle experience than myself can probably fix this easily? I'll look into it later this week.

@zakkak
Copy link
Collaborator

zakkak commented Sep 12, 2023

I am also not familiar with gradle, but I will take care of it (reaching out to others if necessary). Thanks for your work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
2 participants