-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Describe the bug
We encountered the same problem first reported here: deserialization exception was thrown when iterating the Watchable<V1Pod>
because the bookmark
events do not have fully constructed V1Pod
object in the payload.
Client Version
24.0.0
Kubernetes Version
1.33.2-gke.1111000
Java Version
Java 24
To Reproduce
Steps to reproduce the behavior:
(borrowing from first report of the bug)
try (Watch<V1Pod> watch = Watch.createWatch(client, api.listNamespacedPod("namespace")
.timeoutSeconds(60)
.watch(true)
.allowWatchBookmarks(true)
.resourceVersion(currentVersion)
.buildCall(null), (new TypeToken<Watch.Response<V1Pod>>() {
}).getType())) {
for (Watch.Response<V1Pod> response : watch) {
//do something with the response
}
}
Expected behavior
Iterating through the response should not throw the following deserialization exception
java.lang.IllegalArgumentException: Expected the field `containers` to be an array in the JSON string but got `null`
at io.kubernetes.client.openapi.models.V1PodSpec.validateJsonObject(V1PodSpec.java:1354)
at io.kubernetes.client.openapi.models.V1Pod.validateJsonObject(V1Pod.java:280)
at io.kubernetes.client.openapi.models.V1Pod$CustomTypeAdapterFactory$1.read(V1Pod.java:309)
at io.kubernetes.client.openapi.models.V1Pod$CustomTypeAdapterFactory$1.read(V1Pod.java:299)
...
KubeConfig
N/A
Server (please complete the following information):
- OS: RockyLinux
- Environment: Docker
- Cloud: GCP
Additional context
stevenschlansker
Metadata
Metadata
Assignees
Labels
No labels