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

Regression issue: Fast Jar not working using OpenShift and Docker strategy #16113

Closed
Sgitario opened this issue Mar 30, 2021 · 4 comments · Fixed by #16183
Closed

Regression issue: Fast Jar not working using OpenShift and Docker strategy #16113

Sgitario opened this issue Mar 30, 2021 · 4 comments · Fixed by #16183
Assignees
Labels
area/kubernetes kind/bug Something isn't working
Milestone

Comments

@Sgitario
Copy link
Contributor

Describe the bug

When using the Docker strategy when deploying an application using OpenShift, the build failed because the generated artifacts are not found:

[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] STEP 6: ENV JAVA_OPTIONS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] --> 54085069869
[INFO] [io.quarkus.container.image.openshift.deployment.OpenshiftProcessor] STEP 7: COPY --chown=1001 target/quarkus-app/lib/ /deployments/lib/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:09 min
[INFO] Finished at: 2021-03-30T09:47:32+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.13.0.Final:build (default) on project openshift-quickstart-13: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] 	[error]: Build step io.quarkus.container.image.openshift.deployment.OpenshiftProcessor#openshiftBuildFromJar threw an exception: java.lang.IllegalStateException: Build:custom-1 failed! Dockerfile build strategy has failed.
[ERROR] 	at io.quarkus.container.image.openshift.deployment.OpenshiftProcessor.openshiftBuild(OpenshiftProcessor.java:444)
[ERROR] 	at io.quarkus.container.image.openshift.deployment.OpenshiftProcessor.lambda$openshiftBuild$10(OpenshiftProcessor.java:389)
[ERROR] 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
[ERROR] 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
[ERROR] 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
[ERROR] 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
[ERROR] 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
[ERROR] 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[ERROR] 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
[ERROR] 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
[ERROR] 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[ERROR] 	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
[ERROR] 	at io.quarkus.container.image.openshift.deployment.OpenshiftProcessor.openshiftBuild(OpenshiftProcessor.java:389)
[ERROR] 	at io.quarkus.container.image.openshift.deployment.OpenshiftProcessor.createContainerImage(OpenshiftProcessor.java:340)
[ERROR] 	at io.quarkus.container.image.openshift.deployment.OpenshiftProcessor.openshiftBuildFromJar(OpenshiftProcessor.java:257)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:920)
[ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2415)
[ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] 	at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Actual behavior

The build should find the artifacts in the right folder.

To Reproduce

Steps to reproduce the behavior:

  1. mvn io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:create -DprojectGroupId=org.acme -DprojectArtifactId=openshift-quickstart -DclassName="org.acme.rest.GreetingResource" -Dpath="/greeting" -Dextensions=openshift
  2. cd openshift-quickstart
  3. Deploy it using mvn package -Dquarkus.kubernetes.deploy=true -Dquarkus.openshift.build-strategy=docker

The maven command fails with the exception in the description.

Environment (please complete the following information):

Quarkus version or git rev

999-SNAPSHOT or 1.13.0.Final
It worked fine using 1.11+

Additional context

I think that this is a regression issue caused by the new fast jar method. If we change the target folder in the Dockerfile.jvm file from target/quarkus-app to target, then it starts working fine. (Not saying this is the right way to fix it).

@Sgitario Sgitario added the kind/bug Something isn't working label Mar 30, 2021
@rsvoboda
Copy link
Member

CC @geoand @iocanel

@geoand
Copy link
Contributor

geoand commented Mar 30, 2021

Seems rather serious.

@iocanel can you prioritize this please?

@iocanel
Copy link
Contributor

iocanel commented Mar 30, 2021

@geoand: roger roger

@iocanel iocanel self-assigned this Mar 30, 2021
@geoand
Copy link
Contributor

geoand commented Mar 30, 2021

Thanks 👍

@geoand geoand assigned geoand and unassigned iocanel Apr 1, 2021
geoand added a commit that referenced this issue Apr 1, 2021
Fix issue with fast-jar not working using OpenShift and Docker strategy
@quarkus-bot quarkus-bot bot added this to the 1.14 - main milestone Apr 1, 2021
@gsmet gsmet modified the milestones: 1.14 - main, 1.13.1.Final Apr 3, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Apr 3, 2021
mjurc added a commit to mjurc/quarkus-openshift-test-suite that referenced this issue Apr 23, 2021
* Disabling Quarkus docker build strategy tests due to
  quarkusio/quarkus#16113
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants