-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
False
-
-
False
-
Unset
-
No
-
-
When using the useK8sWatchResource() hook, if there is a network failure when polling the resource, the hook does not update the error state after recovering even as subsequent fetches are successful.
Steps:
- Use watch hook to watch any resource
- Block the resource get call in browser devtools
- Once the call fails, unblock the call
- Subsequent calls will be successful, but the hook will still continue to return error
This is likely caused by https://github.com/openshift/dynamic-plugin-sdk/blob/main/packages/lib-utils/src/app/redux/reducers/k8s/k8s.ts#L195
The reducer action does not consider that the previous poll might have failed so doesn't fire an update to remove the loadError state.