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

Can't debug Watch #3101

Open
gyorokpeter opened this issue Feb 20, 2024 · 3 comments
Open

Can't debug Watch #3101

gyorokpeter opened this issue Feb 20, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@gyorokpeter
Copy link

I'm getting an error:

java.lang.IllegalArgumentException: Expected the field `containers` to be an array in the JSON string but got `null`

However there seems to be no way to debug this because Watch.next() handles all of reading the response, parsing the JSON and converting to the target type all by itself with no way to print the results in between.

@yue9944882
Copy link
Member

@gyorokpeter which client version are you using? is it 20.0.0?

@gyorokpeter
Copy link
Author

Yes, 20.0.0. In the meantime I found that normal modify/add/delete events are being picked up correctly, but sometimes this error still pops up.

The code looks quite similar to https://github.com/kubernetes-client/java/blob/master/examples/examples-release-20/src/main/java/io/kubernetes/client/examples/WatchExample.java but it watches pods and sets allowWatchBookmarks to true.

@yue9944882 yue9944882 added the kind/bug Categorizes issue or PR as related to a bug. label Feb 21, 2024
@yue9944882
Copy link
Member

i think it's failing because the new client is not able to properly deserialize watch bookmark event from kube-apiserver. thanks for reporting the issue. i will try reproduce that locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants