A test began failing after a Kube-RS upgrade from 0.91 to 0.93 - rough sketch:
let _ = api.delete(&obj).await;
// never returns now as there is no object at the point of awaiting
await_condition(self.api.clone(), obj.name_unchecked(), conditions::is_deleted).await;
Use "scan" to track whether or not the object was seen for each round of Init events. If the object was seen InitDone will return None otherwise it should pass Ok(None).
Current and expected behavior
A test began failing after a Kube-RS upgrade from 0.91 to 0.93 - rough sketch:
Looking at the earlier implementation an
Ok(None)
event would be passed up to check when no objects were returned. - https://github.com/kube-rs/kube/blob/5dbae3a18c14a225d2d993b9effd16147fef420e/kube-runtime/src/watcher.rs#L815After 0.92 the "InitDone" always leads to
None
- https://github.com/kube-rs/kube/blob/0f6cb6f0ac695444f6789f98fa07073f4980a127/kube-runtime/src/watcher.rs#L830Possible solution
Use "scan" to track whether or not the object was seen for each round of
Init
events. If the object was seenInitDone
will returnNone
otherwise it should passOk(None)
.Additional context
No response
Environment
N/A
Configuration and features
No response
Affected crates
kube-runtime
Would you like to work on fixing this bug?
yes