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

OLMv1 - [CRD Upgrade Safety] Add a change validation for handling field type changes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 4.17
    • OLM
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • None
    • None
    • None
    • Rejected
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          it looks like an explicit check for the type change slipped through the cracks. I think this is one that we should have and is pretty low-effort to add.

      Actual results:

          message: 'validating upgrade for CRD "nginxolm75123s.cache.example.com" failed:  CustomResourceDefinition nginxolm75123s.cache.example.com failed upgrade safety  validation. "ChangeValidator" validation failed: version "v1alpha1", field "^.spec.field"  has unknown change, refusing to determine that change is safe'
      
      

      It is considered a breaking change to update the type of a field when upgrading a CRD. We currently do not have an explicit check for this type of change so we get an output similar to:

      message: 'validating upgrade for CRD "nginxolm75123s.cache.example.com" failed:  CustomResourceDefinition nginxolm75123s.cache.example.com failed upgrade safety  validation. "ChangeValidator" validation failed: version "v1alpha1", field "^.spec.field"  has unknown change, refusing to determine that change is safe' 

      We should add a new change validation that explicitly handles this case to improve the UX in identifying the exact reason why a CRD upgrade was rejected and help users make better informed decisions as to if this is a change they are comfortable with going through on their cluster.

      This is not a v1.0.0 blocker as it is a QoL improvement and the existing pre-flight check fails closed on an unrecognized change so we aren't causing any harm to a user's cluster with the current state of the check.

              lmohanty@redhat.com Lalatendu Mohanty
              rhn-support-jitli Keenon Lee
              None
              None
              Xia Zhao Xia Zhao
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: