-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
test: Ignore waitqueue.waitingLoop goroutine leak #28557
test: Ignore waitqueue.waitingLoop goroutine leak #28557
Conversation
We use goleak in certain tests to ensure we do not leak goroutines which might cause unexpected behavior during tests or shutdown in production. Normally we expect our own goroutines to leak, but since we started using the delayed workqueue, we also leak the waitqueue.waitingLoop. This goroutine does get a shutdown signal when hive stops, but it isn't guaranteed to have exited before hive does so it sometimes triggers in CI. This commit adds and exception to all goleak invocation that use resource.Resource[T] to ignore the waitqueue.waitingLoop goroutine. Signed-off-by: Dylan Reimerink <dylan.reimerink@isovalent.com>
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hit this a couple times. thanks for fixing it!
@dylandreimerink looks like v1.14 is also seeing hitting this (https://github.com/cilium/cilium/actions/runs/6850169361/job/18623961162). Any concern about backporting - and if so, how far? |
Had not considered this might impact older releases, but backporting this should be easy, adding the label now |
We use goleak in certain tests to ensure we do not leak goroutines which might cause unexpected behavior during tests or shutdown in production.
Normally we expect our own goroutines to leak, but since we started using the delayed workqueue, we also leak the waitqueue.waitingLoop. This goroutine does get a shutdown signal when hive stops, but it isn't guaranteed to have exited before hive does so it sometimes triggers in CI.
This PR adds and exception to all goleak invocation that use resource.Resource[T] to ignore the waitqueue.waitingLoop goroutine.
Fixes: #28477