-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Json validation error in new version #3319
Comments
Can you provide the body of the response that you got? You should be able to get it with |
fwiw, I believe that this is either a bug in the openai spec or the kube api server. If you look at the spec: https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json If you search for I believe it needs to be either specified as a |
Here is the part of the body that I think causes the error: "images": [
{
"names": null,
"sizeBytes": 974400966
},
...
] We are contacting a k0s server but the same call works with the legacy version of the client. As a side note, the exception does not throw an |
Thanks for the additional details. I would have thought that it would throw ApiException, but I guess there's no corresponding try/catch block. With 20.0.0 we moved to a different code generator which is why there is a difference here. For now, using legacy is probably the right thing to do. We need a reproduction in upstream k8s, not k0s to determine if this is really a bug. |
I found the same error, which I can confirm is a bug, and the error message is as follows:
|
@pigstomach are you using k0s also? Or is this a true kubernetes api server? |
Ok, I found the problem (I think): OpenAPITools/openapi-generator#12549 We need to rev. past OpenAPITools/openapi-generator@7a7309e in the generator, likely update to 7.x (maybe 7.4?) |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
I'm also seeing this error. In my case it's when receiving a bookmark event. I'm using version I'm creating a watch and processing the responses with code that looks something like this:
Now whenever I receive a bookmark response, I get this exception:
The line in the response body being parsed looks like this (but without the formatting):
I can work around this problem by using the type parameter |
Describe the bug
While trying to read the nodes of a server I got the following error:
The line that throws the exception is
V1ContainerImage.java:193
and in debug I noticed that in my casejsonObj.get("names")
isJsonNull
so the first condition of line 192 fails because it checks fornull
and the second fails because it is not an array.I tried the same call in versions
19.0.0
and even20.0.1-legacy
and I can read the nodesClient Version
20.0.1
Kubernetes Version
1.29.1
Java Version
Java 17
To Reproduce
It happens on an internal server only when reading nodes
Expected behavior
The Json response is parsed correctly
KubeConfig
//
Server (please complete the following information):
The text was updated successfully, but these errors were encountered: