Uploaded image for project: 'OpenShift Builds'
  1. OpenShift Builds
  2. BUILD-775

Build strategies that use "builder-image" as a parameter can fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • builds-1.0
    • shipwright
    • None
    • 5
    • False
    • None
    • False
    • 2

      Description of problem:

      If a build strategy is created using the `v1alpha1` API and includes a parameter with the name `builder-image`, its value is not set correctly if the `Build` or `BuildRun` uses `paramValues` to set the parameter value.

      Workaround

      Use a parameter name that is not `builder-image`.

      For example, source-to-image build strategies can use the `s2i-builder-image` parameter.

      Prerequisites (if any, like setup, operators/versions):

      • OpenShift 4.14
      • Deploy Shipwright Build v0.12.0 (or downstream builds for Red Hat OpenShift v1.0.0)

      Steps to Reproduce

      1. Create a `ClusterBuildStrategy` that uses the `v1alpha1` API and a `builder-image` parameter
         apiVersion: shipwright.io/v1alpha1
         kind: ClusterBuildStrategy
         metadata:
            name: source-to-image
         spec:
            ...
            parameters:
               - name: builder-image
                 description: Builder image for this build strategy
      
      1. Create a `Build` that utilizes the build strategy: `$ shp build create s2i-ex --strategy source-to-image ...`
      2. Start a build referencing this strategy: `$ shp build run s2i-ex`

      Actual results:

      Builds fail with "MissingParameterValue" error

      Expected results:

      Builds should succeed if the `builder-image` parameter is declared in the build strategy, even for v1alpha1 APIs. The conversion webhook should not overwrite values if they are present.

      Reproducibility (Always/Intermittent/Only Once):

      Always

      Acceptance criteria: 

      See expected results for outcome
       

      Definition of Done:

      Build Details:

      Upstream - Shipwright Build v0.12.0
      Found on OpenShift 4.14.1

      Additional info (Such as Logs, Screenshots, etc):

              rh-ee-apjagtap Apoorva Jagtap (Inactive)
              adkaplan@redhat.com Adam Kaplan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: