From 7c0a2b226318424b0262961583cb351b8b7c8b57 Mon Sep 17 00:00:00 2001 From: Francesco Ilario Date: Mon, 23 Oct 2023 22:35:23 +0200 Subject: [PATCH] fix: forward context in SpaceCompletion reconciler (#894) Signed-off-by: Francesco Ilario Co-authored-by: Francisc Munteanu Co-authored-by: Alexey Kazakov Co-authored-by: Matous Jobanek --- controllers/spacecompletion/space_completion_controller.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/spacecompletion/space_completion_controller.go b/controllers/spacecompletion/space_completion_controller.go index bbbbbdeaf..abc491055 100644 --- a/controllers/spacecompletion/space_completion_controller.go +++ b/controllers/spacecompletion/space_completion_controller.go @@ -52,7 +52,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl. // Fetch the Space space := &toolchainv1alpha1.Space{} - err := r.Client.Get(context.TODO(), types.NamespacedName{ + err := r.Client.Get(ctx, types.NamespacedName{ Namespace: r.Namespace, Name: request.Name, }, space) @@ -78,7 +78,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, request ctrl.Request) (ctrl. return reconcile.Result{}, err } - return ctrl.Result{}, r.Client.Update(context.TODO(), space) + return ctrl.Result{}, r.Client.Update(ctx, space) } func (r *Reconciler) ensureFields(logger logr.Logger, space *toolchainv1alpha1.Space) (bool, error) {