-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Java generator from CRD: class not found in quarkus when enabling extraAnnotations #6738
Comments
Hi @spike83 thanks for your interest! My gut feeling is that there is an incompatibility with the Would you be able to share a |
I tried to use 6.13.4 and get the same error. |
Ok, thanks for the additional info, would you mind providing the CRD content? |
Sure, there is the reproducer: run |
@spike83 thanks, unfortunately I cannot reproduce the error using the zip you provided. The error message I obtain is the expectd one:
We need to bisect further the differences:
Or have a reproducible reproducer in, for example, a GH Action. The only thing I'm noticing is that the sundrio version is not aligned with the one used by the k8s client. instead of |
I understand that there is no Kubernetes cluster at your address. Could you point to one, as you can see in the test it only tries to list the pods? I guess it's happening when deserializing the actual response. I tried to put a dummy address and get no error. Here I also have another reproducer which tries to create a pod first and then tries to list the pods. This can be run against the local dev-servcie with
This is what I get here with the second reproducer:
|
I can reproduce the issue with the provided example. @andreaTP, have we tried the Java Generator with Quarkus before? do you know if there's an integration test somewhere? Also, maybe the problem might ring a bell to @metacosm The problem seems to be with the Quarkus test runner and the loading of the generated classes. I'd assume that this won't happen with a regular JUnit test. |
I used the Java generator with the QOSDK a few times.
I don't think we have specific tests, the Java Generator is emitting POJOs, most of the hiccups we found are related to
Should we report the bug in the Quarkus repo? |
This does seem like a Quarkus bug. |
Describe the bug
When generating Java classes from CRD within Quarkus I get ClassNotFound Exceptions.
I was playing around with annotation processing settings but nothing helped.
Every time I enable the
extraAnnotations
I get exceptions when executing. It is also taking way longer to generate and I even generates the classio/fabric8/kubernetes/api/model/ObjectMetaBuilder
that was not found in the target folder.Fabric8 Kubernetes Client version
7.0.0, 6.13.14
Steps to reproduce
POM:
test-crd.yaml
: I took one of the PrinterColmn from the tests. But it doesn't matter.src/test/java/MyTest.java:
mvn clean test
This causes
And it seems the class was even generated
Expected behavior
I would think that I can generate the code and run the kubernetes client afterwards.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
1.25.3@latest
Environment
Linux
Fabric8 Kubernetes Client Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: