-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[release-1.4] 🐛 Fix AddAnnotations for unstructured.Unstructured #9178
[release-1.4] 🐛 Fix AddAnnotations for unstructured.Unstructured #9178
Conversation
The previous implementation worked well for most Object implementations (definitely all embedding metav1.ObjectMeta) because it relies on: * The fact that GetAnnotations doesn't return a copy of the annotations but the underlying map storing them. * When calling set annotations, the input map is used for storage in the Object implementation, hence when adding entries to that map from the outside, it changes the content of the Object's annotations. This is not necessarily part of the contract specified by metav1.Object so we can't really guarantee all implementations will satisfy these 2 conditions. It turns out, unstructured.Unstructured doesn't.
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.
/area util
/lgtm
/approve
LGTM label has been added. Git tree hash: 4b39fd5bb8f40f9a822c39234dba3808b54c0e89
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: killianmuldoon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
5b97514
into
kubernetes-sigs:release-1.4
This is an automated cherry-pick of #9164
/assign killianmuldoon