From 6d6cb80ce0075f0e374ba2ffeab1ccca42ed55fc Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Fri, 8 Nov 2024 15:33:17 -0500 Subject: [PATCH] :seedling: Source.Start(): Use errgroup without context Addresses https://github.com/kubernetes-sigs/controller-runtime/pull/2997#discussion_r1834925687, followup to https://github.com/kubernetes-sigs/controller-runtime/pull/2997 --- pkg/internal/controller/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/internal/controller/controller.go b/pkg/internal/controller/controller.go index 9d0ed67495..12071cfa6f 100644 --- a/pkg/internal/controller/controller.go +++ b/pkg/internal/controller/controller.go @@ -173,7 +173,7 @@ func (c *Controller[request]) Start(ctx context.Context) error { // NB(directxman12): launch the sources *before* trying to wait for the // caches to sync so that they have a chance to register their intendeded // caches. - errGroup, _ := errgroup.WithContext(ctx) + errGroup := &errgroup.Group{} for _, watch := range c.startWatches { log := c.LogConstructor(nil).WithValues("source", fmt.Sprintf("%s", watch)) didStartSyncingSource := &atomic.Bool{}