From 9946e8b294baaa0fc341e0291c23fad5d3fa6cca Mon Sep 17 00:00:00 2001 From: Drew Sessler Date: Fri, 6 Dec 2024 10:03:30 -0800 Subject: [PATCH] Stop turning runners context.Canceled error into nil. --- internal/kubernetes/discovery.go | 5 ----- internal/registration/runner.go | 5 ----- 2 files changed, 10 deletions(-) diff --git a/internal/kubernetes/discovery.go b/internal/kubernetes/discovery.go index ab188c5f6..ddc8d2cc3 100644 --- a/internal/kubernetes/discovery.go +++ b/internal/kubernetes/discovery.go @@ -196,11 +196,6 @@ func (r *DiscoveryRunner) Start(ctx context.Context) error { log.Error(err, "Unable to detect Kubernetes APIs") } case <-ctx.Done(): - // TODO(controller-runtime): Fixed in v0.19.0 - // https://github.com/kubernetes-sigs/controller-runtime/issues/1927 - if errors.Is(ctx.Err(), context.Canceled) { - return nil - } return ctx.Err() } } diff --git a/internal/registration/runner.go b/internal/registration/runner.go index 5b340ddaf..84b23f0bc 100644 --- a/internal/registration/runner.go +++ b/internal/registration/runner.go @@ -181,11 +181,6 @@ func (r *Runner) Start(ctx context.Context) error { r.changed() } case <-ctx.Done(): - // TODO(controller-runtime): Fixed in v0.19.0 - // https://github.com/kubernetes-sigs/controller-runtime/issues/1927 - if errors.Is(ctx.Err(), context.Canceled) { - return nil - } return ctx.Err() } }