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

Watch response of ERROR causes ApiException #164

Closed
ghost opened this issue Jan 4, 2018 · 1 comment
Closed

Watch response of ERROR causes ApiException #164

ghost opened this issue Jan 4, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 4, 2018

When performing a watch on a list if the server returns ERROR (kind: status) there is a deserialization error because the status object differs from the Watch.Response. This is particularly prevalent using custom resources. The Watch response handler blindly uses watchType when deserializing which causes the json deserializer to throw an exception when the response object does not match the watch type.

@rjeberhard
Copy link
Contributor

We think was is happening here is that the k8s api server is returning a status in the stream of objects returned by the watch as per here: https://github.com/kubernetes/community/blob/master/contributors/devel/api-conventions.md#response-status-kind

However, io.kubernetes.client.util.Watch.Response.next() simply deserializes using the target type rather than checking the kind of object and supporting a potential status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant