Class CrdCompatibilityChecker


  • public class CrdCompatibilityChecker
    extends java.lang.Object
    Utility for checking backward CRD compatibility.

    The aim is to provide a very strict compatibility check logic initially that can be improved over time with compatible type changes if necessary by CRD updates

    It performs the following checks:

    • No property removed from any object
    • No enum value removed from enums (changing enum to string is allowed)
    • No type changes for fields
    • No type changes for array/map items
    • No change in extra properties of field schema definitions
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static void checkObjectCompatibility​(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)  
      protected static void checkStringTypeCompatibility​(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)  
      protected static void checkTypeCompatibility​(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)  
      static void main​(java.lang.String[] args)  
      protected static void verifyOtherPropsMatch​(java.lang.String path, com.fasterxml.jackson.databind.JsonNode oldNode, com.fasterxml.jackson.databind.JsonNode newNode)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CrdCompatibilityChecker

        public CrdCompatibilityChecker()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • checkObjectCompatibility

        protected static void checkObjectCompatibility​(java.lang.String path,
                                                       com.fasterxml.jackson.databind.JsonNode oldNode,
                                                       com.fasterxml.jackson.databind.JsonNode newNode)
      • checkTypeCompatibility

        protected static void checkTypeCompatibility​(java.lang.String path,
                                                     com.fasterxml.jackson.databind.JsonNode oldNode,
                                                     com.fasterxml.jackson.databind.JsonNode newNode)
      • verifyOtherPropsMatch

        protected static void verifyOtherPropsMatch​(java.lang.String path,
                                                    com.fasterxml.jackson.databind.JsonNode oldNode,
                                                    com.fasterxml.jackson.databind.JsonNode newNode)
      • checkStringTypeCompatibility

        protected static void checkStringTypeCompatibility​(java.lang.String path,
                                                           com.fasterxml.jackson.databind.JsonNode oldNode,
                                                           com.fasterxml.jackson.databind.JsonNode newNode)