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

context-rich and case-sensitive config validation for CMO

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • 4.19.0
    • 4.18
    • Monitoring
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • ?
    • Done
    • Enhancement
    • Hide
      * With this release, the strict validation introduced in {product-title} 4.18 is improved. Error messages now clearly identify the affected field, and validation is case-sensitive to ensure more accurate and consistent configuration. For more information, see (link:https://issues.redhat.com/browse/OCPBUGS-42671[OCPBUGS-42671]) and (link:https://issues.redhat.com/browse/OCPBUGS-54516[OCPBUGS-54516]).
      Show
      * With this release, the strict validation introduced in {product-title} 4.18 is improved. Error messages now clearly identify the affected field, and validation is case-sensitive to ensure more accurate and consistent configuration. For more information, see (link: https://issues.redhat.com/browse/OCPBUGS-42671 [ OCPBUGS-42671 ]) and (link: https://issues.redhat.com/browse/OCPBUGS-54516 [ OCPBUGS-54516 ]).
    • None
    • None
    • None
    • None

      Description of problem:

      
      https://issues.redhat.com//browse/OCPBUGS-42671 introduced strict validation.
      that should help identify and correct many "broken" config.
      
      Feedback said that the new "unknown field" and "duplicate field" checks don't provide enough context; `unknown field \"tolerations\"` r.g. isn't always enough, especially that `tolerations` can occur in many places.
      
      this is a limitation of Go "encoding/json" v1, tried to enrich the context in vain https://go-review.googlesource.com/c/go/+/648055/comments/aedcc220_a137107a?tab=comments
      
      https://github.com/kubernetes-sigs/json is an enhanced Go "encoding/json" v1 that provides more context and has also a case-sensitive check (which is another limitation of Go "encoding/json" v1 https://pkg.go.dev/encoding/json#Unmarshal)
      
      This case-sensitive unmarshalling will be helpful for the transition towards CRD based config, as CRD validation is itself case-sensitive.
      
      ---
      
      - [ ] Prepare for this in 4.18
      
      
      
          

      Version-Release number of selected component (if applicable):

      
          

      How reproducible:

      
          

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

      
          

      Expected results:

      
          

      Additional info:

      
          

              rh-ee-amrini Ayoub Mrini
              rh-ee-amrini Ayoub Mrini
              None
              None
              Junqi Zhao Junqi Zhao
              Eliska Romanova Eliska Romanova
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: