Skip to content

Commit

Permalink
fix(syncer): wrong address operator on transform Patch func (#586)
Browse files Browse the repository at this point in the history
## What type of PR is this?

/kind bug

## What this PR does / why we need it:

The underlying type of `dest` is `*unstructured.Unstructured`, and the
address operator makes the return value be a pointer to a pointer, which
causes keyFunc `DeletionHandlingMetaNamespaceKeyFunc` to return errors.
  • Loading branch information
iamryanchia authored Aug 13, 2024
1 parent 69cac5a commit 48c7531
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/syncer/transform/transform.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func Patch(original interface{}, patchText string) (interface{}, error) {
if err := json.Unmarshal(modifiedJSON, &dest); err != nil {
return nil, errors.Wrap(err, "json decoding error")
}
return &dest, nil
return dest, nil
}

// Replace function replaces the original data structure with the new one derived from the JSON string.
Expand Down

0 comments on commit 48c7531

Please sign in to comment.