Uploaded image for project: 'AMQ Streams'
  1. AMQ Streams
  2. ENTMQST-6636

Refactor KafkaRebalanceAssemblyOperator class

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False

      The KafkaRebalance Operator is inherently complex, and as a result, the KafkaRebalanceAssemblyOperator code has become increasingly intricate over time. We've already had to apply suppression annotations to manage Checkstyle warnings—such as @SuppressWarnings({"checkstyle:NPathComplexity"}) on the main reconcile method, and @SuppressWarnings({"checkstyle:ClassFanOutComplexity", "checkstyle:CyclomaticComplexity"}) on the class itself. 

       

      We should refactor this class in a way that follows the pattern of the other reconcilers [2] [3] in the cluster-operator module that breaks the nested asynchronous calls into smaller methods and the reconciled state between those methods. This will make it easier to fix bugs, add features, and add more test coverage.

      [1] https://github.com/strimzi/strimzi-kafka-operator/blob/main/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaRebalanceAssemblyOperator.java

      [2] https://github.com/strimzi/strimzi-kafka-operator/blob/main/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/KafkaReconciler.java

      [3] https://github.com/strimzi/strimzi-kafka-operator/blob/main/cluster-operator/src/main/java/io/strimzi/operator/cluster/operator/assembly/CruiseControlReconciler.java

              Unassigned Unassigned
              kliberti Kyle Liberti
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: