Uploaded image for project: 'Machine Config Operator'
  1. Machine Config Operator
  2. MCO-1326

Decouple BuildController, ImageBuildRequest, etc.

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • None
    • 5
    • False
    • None
    • False
    • OCPSTRAT-1389 - On Cluster Layering: Phase 3 (GA)
    • 8
    • 0
    • 0.000

      Within BuildController, there is a lot of code concerned with creating all of the ephemeral objects for performing a build, converting secrets from one form to another, cleaning up after the build is completed, etc. Unfortunately, because of how BuildController is currently written, this code has become a bit unwieldy and difficult to modify and test. In addition, it is very difficult to reason about what is actually happening. Therefore, it should be broken up and refactored into separate modules within pkg/controller/build.

      By doing this, we can have very high test granularity as well as tighter assertions for the places where it is needed the most while simultaneously allowing looser and more flexible testing for BuildController itself.

       

      Done When:

      • ImageBuildRequest and all of the various helpers and test code has been repackaged into a submodule within pkg/controller/build.
      • Repackaged code should only have a few ways to use it as opposed to global structs, methods, and functions. This will ensure that the code is effectively modularized.
      • Unneeded code is removed from BuildController, such as anything referring to OpenShift Image Builds.
      • Unit tests are updated.

            zzlotnik@redhat.com Zack Zlotnik
            zzlotnik@redhat.com Zack Zlotnik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: