Change k8s clusterWatcher sendInitialEvents from false to null#3496
Open
amarvir-dhaliwal wants to merge 4 commits intocashapp:masterfrom
Open
Change k8s clusterWatcher sendInitialEvents from false to null#3496amarvir-dhaliwal wants to merge 4 commits intocashapp:masterfrom
amarvir-dhaliwal wants to merge 4 commits intocashapp:masterfrom
Conversation
This should correct an issue where setting sendInitialEvents results in `resourceVersion` and `resourceVersionMatch` being expected to be set as well.
```
[k8s-cluster-watch] ERROR trace_id=c33bfbae149893787aee50dd7157c1a6 span_id=74f6af40bb670d3a misk.clustering.kubernetes.KubernetesClusterWatcher -- connectivity lost to k8s for over 60 seconds; waiting 5000ms before retrying
io.kubernetes.client.openapi.ApiException: Message:
HTTP response code: 422
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"ListOptions.meta.k8s.io \"\" is invalid: resourceVersionMatch: Forbidden: sendInitialEvents requires setting resourceVersionMatch to NotOlderThan","reason":"Invalid","details":{"group":"meta.k8s.io","kind":"ListOptions","causes":[{"reason":"FieldValueForbidden","message":"Forbidden: sendInitialEvents requires setting resourceVersionMatch to NotOlderThan","field":"resourceVersionMatch"}]},"code":422}
HTTP response headers: {audit-id=[fa590beb-5754-414d-b480-410861dfaa71], cache-control=[no-cache, private], content-length=[482], content-type=[application/json], date=[Thu, 23 Oct 2025 22:14:37 GMT], x-kubernetes-pf-flowschema-uid=[53ebf2ac-f883-4def-a409-c42ad608573a], x-kubernetes-pf-prioritylevel-uid=[9602a5ff-bf57-4828-a910-b8881d845f09]}
at io.kubernetes.client.util.Watch.createWatch(Watch.java:107)
at misk.clustering.kubernetes.KubernetesClusterWatcher.watchCluster(KubernetesClusterWatcher.kt:64)
at misk.clustering.kubernetes.KubernetesClusterWatcher.startUp$lambda$1(KubernetesClusterWatcher.kt:42)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should correct an issue where setting sendInitialEvents results in
resourceVersionandresourceVersionMatchbeing expected to be set as well.