-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove empty keys when merging unstructured resources #2332
Conversation
Does the PR have any schema changes?Looking good! No breaking changes found. |
79fe424
to
f0e1e97
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks right to me, but will need the mergo dependency to be updated before merging the PR.
Did you confirm that this change fixes the bug in #2331? It would be great if we could cover this case in a test. Perhaps https://github.com/pulumi/pulumi-kubernetes/tree/master/tests/sdk/nodejs/server-side-apply could be extended to do that?
9e895b8
to
1f2cfd5
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
1 similar comment
Does the PR have any schema changes?Looking good! No breaking changes found. |
Yes, I have confirmed that this change fixes the underlying issue. Have updated mergo now that the upstream PR is merged. Also added a new regression test for this instead of expanding on the existing |
1f2cfd5
to
ba2030e
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the Java worktree issue is dependent upon #2337 being merged first, and then this rebased on that. Pending that being done, LGTM!
When merging client-side and server-side patches for diffing, we need to remove any empty/removed keys from the server-side patch in the client-side patch as well. Fixes: #2331
ba2030e
to
dc76730
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
dc76730
to
779afb9
Compare
Does the PR have any schema changes?Looking good! No breaking changes found. |
When merging client-side and server-side patches for diffing, we need to remove any empty/removed keys from the server-side patch in the client-side patch as well.
Without this fix, any external changes (eg. kubectl or controllers) to resources that removes fields would not be re-set on the next
pulumi up
.Partially fixes: #2331 as we still need an upstream fix (darccio/mergo#231) to be merged.