Skip to content

Stream produced by "watch_object" no longer emits when an object isn't in the initial list #1576

Closed
@markdingram

Description

@markdingram

Current and expected behavior

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;

Looking at the earlier implementation an Ok(None) event would be passed up to check when no objects were returned. -

Event::Restarted(mut objs) => Ok(objs.pop()),

After 0.92 the "InitDone" always leads to None -

Ok(Event::Init | Event::InitDone) => None,

Possible solution

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).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingruntimecontroller runtime related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions