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

Using GitHub Action for GraalVM doesn't generate reports for Quarkus apps #45447

Open
edeandrea opened this issue Jan 8, 2025 · 6 comments
Open
Labels
area/native-image kind/question Further information is requested

Comments

@edeandrea
Copy link
Contributor

edeandrea commented Jan 8, 2025

Describe the bug

I'm not sure if this is a Quarkus problem or a GitHub Action for GraalVM problem, but

Expected behavior

I would expect to see a comment added to the PR. See this example using Spring Boot: edeandrea/summit-lab-spring-music#64 (comment)

Actual behavior

If I use this action to set up the JVM and then build a native executable by doing ./mvnw clean verify -Pnative I end up getting a warning saying Unable to find build output data to create a report. Are you sure this build job has used GraalVM Native Image?

See https://github.com/quarkusio/quarkus-super-heroes/actions/runs/12670766414/job/35311340396#step:9:2 as an example.

Quarkus version or git rev

3.17.5

@edeandrea edeandrea added area/native-image kind/bug Something isn't working labels Jan 8, 2025
Copy link

quarkus-bot bot commented Jan 8, 2025

/cc @Karm (native-image), @galderz (native-image), @zakkak (native-image)

@gsmet gsmet added kind/question Further information is requested and removed kind/bug Something isn't working labels Jan 8, 2025
@gsmet
Copy link
Member

gsmet commented Jan 8, 2025

Maybe you can dig in the action to tell us which reports they are expecting?

We might have disabled the default reports or move them to another place, @zakkak will know more for sure.

@zakkak
Copy link
Contributor

zakkak commented Jan 8, 2025

setup-graalvm depends on using the -H:BuildOutputJSONFile flag which Quarkus also sets in

addExperimentalVMOption(nativeImageArgs,
"-H:BuildOutputJSONFile=" + nativeImageName + "-build-output-stats.json");
and appears to override the value set by setup-graalvm. This results in setup-graalvm failing to detect a build report to use for generating the comment.

@gsmet
Copy link
Member

gsmet commented Jan 8, 2025

Could we avoid overriding it if already defined? Not sure how they define it though. And not sure either if it could cause issues for Quarkus to not have this around at the expected location.

@edeandrea
Copy link
Contributor Author

Could we avoid overriding it if already defined? Not sure how they define it though. And not sure either if it could cause issues for Quarkus to not have this around at the expected location.

Or if it is needed by that name in that location, maybe the build step could make a copy of it at the end and put it where setup-graalvm is expecting it?

@zakkak
Copy link
Contributor

zakkak commented Jan 8, 2025

Could we avoid overriding it if already defined? Not sure how they define it though. And not sure either if it could cause issues for Quarkus to not have this around at the expected location.

They pass it to the NATIVE_IMAGE_OPTIONS environment variable. We could check the contents of the variable and act accordingly but that might affect multi-stage builds where the environment is different between the deployment phase and the native build.

Or if it is needed by that name in that location, maybe the build step could make a copy of it at the end and put it where setup-graalvm is expecting it?

Sounds a bit strange to have all quarkus builds do this just to support a feature of a github action. We would ideally need to detect if we are running in github (or even better if setup-graalvm is being used).

The other thing we can do, is to add an option to either change the name/path of the file, or completely ommit setting it in Quarkus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants