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

Kubernetes manifests are not generated when using QuarkusProdModeTest #36041

Closed
metacosm opened this issue Sep 20, 2023 · 6 comments
Closed

Kubernetes manifests are not generated when using QuarkusProdModeTest #36041

metacosm opened this issue Sep 20, 2023 · 6 comments
Labels
area/kubernetes kind/bug Something isn't working

Comments

@metacosm
Copy link
Contributor

metacosm commented Sep 20, 2023

Describe the bug

I'm seeing the following error message when running my tests from maven:
2023-09-20 14:19:44,884 WARN [io.qua.kub.dep.KubernetesProcessor] (build-5) No project was detected, skipping generation of kubernetes manifests!

Adding additional information to Quarkus itself, the issue seems to come from dekorate:

java.lang.IllegalStateException: Could not find matching project info read
        at io.dekorate.project.FileProjectFactory.lambda$createInternal$0(FileProjectFactory.java:64)
        at java.base/java.util.Optional.orElseThrow(Optional.java:403)
        at io.dekorate.project.FileProjectFactory.createInternal(FileProjectFactory.java:64)
        at io.dekorate.project.FileProjectFactory.create(FileProjectFactory.java:44)
        at io.quarkus.kubernetes.deployment.KubernetesCommonHelper.createProject(KubernetesCommonHelper.java:129)
        at io.quarkus.kubernetes.deployment.KubernetesProcessor.build(KubernetesProcessor.java:140)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
        at java.base/java.lang.reflect.Method.invoke(Method.java:578)
        at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:858)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
        at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
        at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
        at java.base/java.lang.Thread.run(Thread.java:1623)
        at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Of note, this only occurs when running the tests from my typical maven build. If I run the tests from my IDE (to debug them, for example), then everything works as expected.

Expected behavior

Tests should behave the same way wherever they are executed.

Actual behavior

Kubernetes manifests are not generated when they should really be.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.2.6.Final

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@metacosm metacosm added the kind/bug Something isn't working label Sep 20, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 20, 2023

/cc @geoand (kubernetes), @iocanel (kubernetes)

@iocanel
Copy link
Contributor

iocanel commented Sep 21, 2023

@metacosm: The tests we use to test the generation process are mostly QuarkusProdModeTest, so I am wondering if there is something in your setup that triggers it. Do you have a reproducer?

@metacosm
Copy link
Contributor Author

metacosm commented Sep 21, 2023

@iocanel
Copy link
Contributor

iocanel commented Sep 22, 2023

I can't reproduce.
I used the main branch but it worked fine.
I also used the main branch + the code from the commit you provided.

In both cases things worked just fine.

@metacosm
Copy link
Contributor Author

metacosm commented Sep 22, 2023

What do you mean by "things worked fine"? You didn't get the warning or did the tests pass? Note that the exception never actually shows up: you need to debug to see it happen (or change the code in a way similar to #36057) so the only thing that should be "wrong" with main or the commit would be that the kubernetes manifests are not generated, the warning shows up but the tests are passing because they currently avoid testing things where things actually fails because the kubernetes manifests are not properly generated.

@gsmet
Copy link
Member

gsmet commented Nov 21, 2024

AFAICS it has been fixed in the Operator SDK here: quarkiverse/quarkus-operator-sdk#730 so closing.

@gsmet gsmet closed this as completed Nov 21, 2024
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

No branches or pull requests

3 participants