Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-77703

NodePoolAutoScaling.Min pointer change missing omitempty causes N-1 deserialization failures

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.22
    • HyperShift
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Proposed
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The NodePoolAutoScaling.Min field was changed from int32 to *int32 (PR #6975) to support scale-from-zero. However, the JSON struct tag was set to json:"min" without omitempty.

      Without omitempty, a nil *int32 pointer serializes as "min": null in JSON. Consumers that embed and directly serialize these types (rather than going through CRD validation) cannot deserialize null back into int32 if they revert to the previous code level. This causes permanent data corruption for the affected resources.

      Adding omitempty to the JSON tag ensures a nil Min is omitted from JSON rather than serialized as null, making the int32 to *int32 change N-1 compatible.

              Unassigned Unassigned
              rhn-support-jjaggars Jesse Jaggars
              Yu Li Yu Li
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: