Skip to content
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 AddAnnotations for unstructured.Unstructured #9164

Merged
merged 1 commit into from
Aug 14, 2023

Commits on Aug 10, 2023

  1. Fix AddAnnotations for unstructured.Unstructured

    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.
    g-gaston committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    da8cb15 View commit details
    Browse the repository at this point in the history