Skip to content

Commit

Permalink
Merge pull request #399 from Xieql/remove-patch-option
Browse files Browse the repository at this point in the history
cleanup: remove unused patch option
  • Loading branch information
kurator-bot authored Oct 17, 2023
2 parents c0e0844 + 3822871 commit a82ec3e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pkg/cluster-operator/attachedcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ func (a *AttachedClusterController) Reconcile(ctx context.Context, req ctrl.Requ
}

defer func() {
patchOpts := []patch.Option{}
if err := patchHelper.Patch(ctx, attachedCluster, patchOpts...); err != nil {
if err := patchHelper.Patch(ctx, attachedCluster); err != nil {
reterr = utilerrors.NewAggregate([]error{reterr, errors.Wrapf(err, "failed to patch fleet %s", req.NamespacedName)})
}
}()
Expand Down
3 changes: 1 addition & 2 deletions pkg/fleet-manager/application_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ func (a *ApplicationManager) Reconcile(ctx context.Context, req ctrl.Request) (_
}

defer func() {
patchOpts := []patch.Option{}
if err := patchHelper.Patch(ctx, app, patchOpts...); err != nil {
if err := patchHelper.Patch(ctx, app); err != nil {
reterr = utilerrors.NewAggregate([]error{reterr, errors.Wrapf(err, "failed to patch application %s", req.NamespacedName)})
}
}()
Expand Down
3 changes: 1 addition & 2 deletions pkg/fleet-manager/fleet.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ func (f *FleetManager) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.
}

defer func() {
patchOpts := []patch.Option{}
if err := patchHelper.Patch(ctx, fleet, patchOpts...); err != nil {
if err := patchHelper.Patch(ctx, fleet); err != nil {
reterr = utilerrors.NewAggregate([]error{reterr, errors.Wrapf(err, "failed to patch fleet %s", req.NamespacedName)})
}
}()
Expand Down

0 comments on commit a82ec3e

Please sign in to comment.