Skip to content

Commit

Permalink
bah
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakknutsen committed Sep 4, 2024
1 parent 0e28058 commit 5527d2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/unstruct/funcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ func Patch(ctx context.Context, cli client.Client, target *unstructured.Unstruct
currentRes.SetGroupVersionKind(target.GroupVersionKind())

if err := cli.Get(ctx, client.ObjectKeyFromObject(target), currentRes); err != nil {
return fmt.Errorf("failed re-fetching resource: %w", err)
return err //nolint:wrapcheck // Return unwrapped error for retry logic
}

patch := client.MergeFrom(currentRes)
if errPatch := cli.Patch(ctx, target, patch); errPatch != nil {
return fmt.Errorf("failed to patch: %w", errPatch)
return errPatch //nolint:wrapcheck // Return unwrapped error for retry logic
}

return nil
Expand Down

0 comments on commit 5527d2b

Please sign in to comment.