Bug 1909464

Summary: Build operator-registry with golang-1.15
Product: OpenShift Container Platform Reporter: Yaakov Selkowitz <yselkowi>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Jian Zhang <jiazha>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: jupierce, krizza, lmeyer, nhale
Version: 4.6   
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1915068 (view as bug list) Environment:
Last Closed: 2021-02-24 15:47:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1915068    

Description Yaakov Selkowitz 2020-12-20 07:24:57 UTC
operator-registry is the only OpenShift container currently building with golang 1.14 due to cross-compilation issues with 1.15.  Now that golang-builder has been updated to 1.15.5, which fixes the darwin cross-compile issue, adding a workaround for https://github.com/golang/go/issues/40795 to the windows build will allow switching to 1.15.

Comment 4 Jian Zhang 2021-01-15 10:18:47 UTC
1, This base image contains the fixed PR:
[root@preserve-olm-env operator-registry]# docker inspect registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.7
                "io.openshift.build.commit.id": "8e6c13fab15be609acdace4e981826091e7effd1",
                "io.openshift.build.commit.url": "https://github.com/operator-framework/operator-registry/commit/8e6c13fab15be609acdace4e981826091e7effd1",
                "io.openshift.build.source-location": "https://github.com/operator-framework/operator-registry",

2, Create a CatalogSource image by using above base image.
[root@preserve-olm-env data]# oc adm catalog build --appregistry-org="olmqe" --auth-token="basic xxx" --from="registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.7" --to=quay.io/olmqe/art:4.7
using registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry:v4.7 as a base image for buildingINFO[0002] loading Bundles                               dir=/tmp/cache-643585830/manifests-119899655
Uploading 146.7MB ...
Pushed sha256:642f1f184a56c7eb718d463d76f72181dbd3b908f9bead55a02bab94bdb058fb to quay.io/olmqe/art:4.7

3, Create a CatalogSoruce CR to consume this image.
[root@preserve-olm-env data]# cat cs.yaml 
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
  name: olm
  namespace: openshift-marketplace
  displayName: OLM Operators
  image: quay.io/olmqe/art:4.7
  publisher: OLM QE
  sourceType: grpc
[root@preserve-olm-env data]# oc create -f cs.yaml 
catalogsource.operators.coreos.com/olm created

4, Check the packagemanifest
[root@preserve-olm-env data]# oc get packagemanifest|grep OLM
descheduler-test                                     OLM Operators                   5m17s
couchbase-enterprise-test                            OLM Operators                   5m17s

Looks good, verify it.
[root@preserve-olm-env data]# oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2021-01-14-211319   True        False         4h14m   Cluster version is 4.7.0-0.nightly-2021-01-14-211319

Comment 7 errata-xmlrpc 2021-02-24 15:47:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.