Skip to content

Commit

Permalink
fix: forward context in SpaceCompletion reconciler (#894)
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Ilario <filario@redhat.com>
Co-authored-by: Francisc Munteanu <fmuntean@redhat.com>
Co-authored-by: Alexey Kazakov <alkazako@redhat.com>
Co-authored-by: Matous Jobanek <mjobanek@redhat.com>
  • Loading branch information
4 people authored Oct 23, 2023
1 parent e3fdd51 commit 7c0a2b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/spacecompletion/space_completion_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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) {
Expand Down

0 comments on commit 7c0a2b2

Please sign in to comment.