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

Specify (build log and the like) why appcds archive cannot be created although quarkus.package.create-appcds is enabled #26004

Closed
u6f6o opened this issue Jun 8, 2022 · 4 comments
Labels
area/container-image kind/question Further information is requested

Comments

@u6f6o
Copy link

u6f6o commented Jun 8, 2022

Description

I am currently struggling in getting app-cds to work. If I run my build locally everything works like a charm and gradle prints information to the command line regarding app cds archive being created:

> Task :quarkusBuild
Caching disabled for task ':quarkusBuild' because:
  Build cache is disabled
Task ':quarkusBuild' is not up-to-date because:
  Class path of task ':quarkusBuild' has changed from 1369d7a3f64390dba45ef73fbba197d2 to 136041e4eafed42423320d7e02138b57.

JBoss Threads version 3.4.2.Final

Launching AppCDS creation process.
AppCDS successfully created at: '/home/u6f6o/projects/internal/sup/build/quarkus-app/app-cds.jsa'.

Starting (local) container image build for jar using jib.
Base image 'registry.access.redhat.com/ubi8/openjdk-17-runtime:1.11' does not use a specific image digest - build may not be reproducible

Also if I have a look at the build directory, it shows the appcds directory:

ls -l build/appcds
total 320
-rw-r--r--  1 u6f6o  staff  125638 Jun  8 12:51 classes.lst
-rw-r--r--  1 u6f6o  staff   24937 Jun  8 12:50 generatedAndTransformed.lst

Furthermore, if I inspect the created image (created by jib) with dive, it shows a app-cds.jsa file under /home/jboss in the resulting jib image.

As soon as I run the same build on the gitlab pipeline though, the app cds archive is not created for some reason. There is no log output on in the builid pipeline, nor is there a appcds directory in the gradle build directory. When I open the resulting jib image with dive, it also does not contain the app-cds.jsa file.

Implementation ideas

Add additional log messages that indicate why the appcds archive cannot be created although the quarkus.package.create-appcds property is set to true. Thus we'll be able to find out what is gong wrong and what we can do to make appcds work even in gitlab.

@u6f6o u6f6o added the kind/enhancement New feature or request label Jun 8, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 8, 2022

/cc @geoand

@u6f6o u6f6o changed the title Specify (build log and the like) why appcds is not activated although quarkus.package.create-appcds is enabled Specify (build log and the like) why appcds archive cannot be created although quarkus.package.create-appcds is enabled Jun 8, 2022
@geoand
Copy link
Contributor

geoand commented Jun 9, 2022

io.quarkus.deployment.pkg.steps.AppCDSBuildStep does plenty of logging already.
The simplest way to see it would be to do ./gradlew clean quarkusBuild -Dquarkus.container-image.build=true -Dquarkus.package.create-appcds=true --debug and look for entries containing io.quarkus.deployment.pkg.steps.AppCDSBuildStep

@geoand geoand closed this as completed Jun 9, 2022
@geoand geoand added kind/question Further information is requested and removed kind/enhancement New feature or request labels Jun 9, 2022
@u6f6o
Copy link
Author

u6f6o commented Jun 9, 2022

Thx for the hint with --debug 👍

I don't agree though. From a users point of view, activating app cds explicitly by setting quarkus.package.create-appcds to true and afterwards silently discarding it is not a good option imo. Either the build should fail or at least it should print a warning that app cds could not be enabled.

@geoand
Copy link
Contributor

geoand commented Jun 9, 2022

That's a good point. I'll convert some of the debug messages to warnings

geoand added a commit to geoand/quarkus that referenced this issue Jun 9, 2022
geoand added a commit to geoand/quarkus that referenced this issue Jun 9, 2022
geoand added a commit to geoand/quarkus that referenced this issue Jun 10, 2022
gsmet added a commit that referenced this issue Jun 10, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Convert AppCDS output messages to warnings when the creation process fails
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 13, 2022

Verified

This commit was signed with the committer’s verified signature.
gsmet Guillaume Smet
…fails

Relates to: quarkusio#26004

(cherry picked from commit e96440d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/container-image kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants