You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix reusing merge objects for patch without copying (#34)
I was seeing an issue where there was a delta in the spec, but it was never being applied back to the object. I tracked down that the `latest` object returned from `sdkFind` was correct, but the patch was not being applied.
When using the method that patches both spec and status, changes to the `latest` were being applied in the spec, but not in the status. The root cause of this is that the `client.MergeFrom` is overriding the `status` fields when merging the `spec` with `desired`. Therefore after patching the spec `desired == latest`. This patch ensures that we copy the `latest` object as part of patching so as to not override changes when using `client.MergeFrom`.
0 commit comments