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

[openshift-4.22] hermetic build failure - ose-ibm-vpc-block-csi-driver

    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • All
    • Approved
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      IBM VPC Block CSI Driver build fails in hermetic mode due to non-deterministic GOPATH handling in Makefile. The build system rewrites $GOPATH causing the binary output path -o ${GOPATH}/bin/${EXE_DRIVER_NAME} to become invalid, resulting in build failures.

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

      OpenShift 4.19+ (affects hermetic build conversion) 

      How reproducible:

      Always - when building ibm-vpc-block-csi-driver in hermetic mode

      Steps to Reproduce:

        1. Build ibm-vpc-block-csi-driver container in hermetic mode
        2. Makefile uses absolute GOPATH-dependent output path: -o ${GOPATH}/bin/${EXE_DRIVER_NAME}
        3. Build system rewrites $GOPATH during hermetic build process     

      Actual results:

      Build fails because binary cannot be found at expected GOPATH location after build system modifies $GOPATH
      
      Error: building at STEP "COPY --from=builder /cachi2/output/deps/gomod/bin/ibm-vpc-block-csi-driver /bin/ibm-vpc-block-csi-driver": checking on sources under [...]: copier: stat: "/cachi2/output/deps/gomod/bin/ibm-vpc-block-csi-driver": no such file or directory

      Expected results:

      Build succeeds using relative path bin/${EXE_DRIVER_NAME} that doesn't depend on GOPATH manipulation, consistent with other CSI drivers like aws-ebs-csi-driver  

      Additional info:

      Fix implemented: Change Makefile to use relative path -o bin/${EXE_DRIVER_NAME} instead of absolute GOPATH-dependent path. This aligns with other CSI drivers and makes builds hermetic-compatible. Comment added to indicate this is a permanent carry patch for OpenShift builds.

              rhn-engineering-jsafrane Jan Safranek
              lgarciaac Luis García Acosta
              None
              None
              Wei Duan Wei Duan
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: