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
KubernetesResourceList resources are not handled properly by AbstractWatchManager #4496
Comments
@StupidScience what watch is this happening with specifically? I can see in the history that the list handling was added for api group watches - and I don't see that a mock or a integration test was ever specifically added. |
@shawkins not sure that I get your question. Do you mean what specific resource watcher? If yes then in our case it is for Endpoints. |
@StupidScience what kubernetes version are you on? |
@shawkins it occurred in our tests actually with mock KubernetesServer after update to 5.12.4. Rollback to 5.12.3 fix the issue. |
@StupidScience from what I can see the api server does not (at least with v1.22.2) respond with a list object when you watch Endpoints. It would be great to capture definitively where this is still happening. In looking at the go client their watch logic is tolerant to list objects being returned, but it won't flatten them into separate events - which means their informer logic can't handle that either. My hope is that this list object handling is no longer relevant. |
I agree with Steven, the following code: Lines 292 to 308 in 0394a0e
should be simply replaced to: HasMetadata hasMetadata = (HasMetadata) object;
updateResourceVersion(hasMetadata.getMetadata().getResourceVersion());
eventReceived(action, hasMetadata); |
Let’s simplify then? Since current code is misleading and I assume with this kind of nesting there are no chances to fall into lists related block anyway |
Describe the bug
In #4365 was introduced change that in a nutshell changed from this:
to
But AFAIU KubernetesResourceList doesn't implement HasMetadata so any event will end up with error
io.fabric8.kubernetes.client.WatcherException: Invalid object received: ...
Fabric8 Kubernetes Client version
5.12.4
Steps to reproduce
Expected behavior
List resources expected to be handled
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
other (please specify in additional context)
Fabric8 Kubernetes Client Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: