Skip to content

Commit

Permalink
Merge pull request #1583 from OverOrion/reconciler-pointer-fix
Browse files Browse the repository at this point in the history
fix(reconciler): make sure to not update the original object
  • Loading branch information
pepov authored Nov 20, 2023
2 parents 47adfe3 + 3e5b7d4 commit 29d7d66
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/resources/model/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ func NewValidationReconciler(
continue
}

if err := repo.Status().Patch(ctx, req.Obj, req.Patch); err != nil {
obj := req.Obj.DeepCopyObject().(client.Object) // copy object so that the original is not changed by the call to Patch
if err := repo.Status().Patch(ctx, obj, req.Patch); err != nil {
errs = errors.Append(errs, err)
}
}
Expand Down

0 comments on commit 29d7d66

Please sign in to comment.