Skip to content
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

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

Closed
markdingram opened this issue Sep 11, 2024 · 0 comments · Fixed by #1577
Closed
Labels
bug Something isn't working runtime controller runtime related

Comments

@markdingram
Copy link
Contributor

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

@markdingram markdingram added the bug Something isn't working label Sep 11, 2024
markdingram pushed a commit to markdingram/kube-rs that referenced this issue Sep 11, 2024
markdingram added a commit to markdingram/kube-rs that referenced this issue Sep 11, 2024
markdingram added a commit to markdingram/kube-rs that referenced this issue Sep 11, 2024
…t isn't in any initial list

fixes kube-rs#1576

Signed-off-by: Mark Ingram <[email protected]>
markdingram added a commit to markdingram/kube-rs that referenced this issue Sep 12, 2024
…t isn't in any initial list

fixes kube-rs#1576

Signed-off-by: Mark Ingram <[email protected]>
@clux clux closed this as completed in 84985b4 Sep 13, 2024
@clux clux added the runtime controller runtime related label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working runtime controller runtime related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants