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

Resource deletion leaks a watcher #2812

Closed
EronWright opened this issue Feb 2, 2024 · 1 comment
Closed

Resource deletion leaks a watcher #2812

EronWright opened this issue Feb 2, 2024 · 1 comment
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed

Comments

@EronWright
Copy link
Contributor

Problem description

The deletion logic seems to open a watcher that isn't necessarily closed.

// Set up a watcher for the selected resource.
watcher, err := client.Watch(c.Context, listOpts)
if err != nil {
return nilIfGVKDeleted(err)
}

For resources that have a custom awaiter, the watcher appears to be leaked.

Suggestions for a fix

A simple deferred call to watcher.Stop() should suffice.

@EronWright EronWright added the kind/bug Some behavior is incorrect or out of spec label Feb 2, 2024
@blampe blampe self-assigned this Aug 22, 2024
@blampe blampe added the resolution/fixed This issue was fixed label Aug 22, 2024
@blampe
Copy link
Contributor

blampe commented Aug 22, 2024

Fixed in #3133

@blampe blampe closed this as completed Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

2 participants