Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1796092

Summary: Catalog operator assumes transitive dependency on package requiring CGO
Product: OpenShift Container Platform Reporter: Ben Luddy <bluddy>
Component: OLMAssignee: Ben Luddy <bluddy>
OLM sub component: OLM QA Contact: Bruno Andrade <bandrade>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: medium CC: kuiwang, scolange, tbuskey
Version: 4.4   
Target Milestone: ---   
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-04 11:27:29 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:
Embargoed:

Description Ben Luddy 2020-01-29 15:34:20 UTC
The catalog operator assumes a spurious transitive dependency on github.com/mattn/go-sqlite3 via an imported operator-registry package. This dependency forces the catalog operator builder to itself enable CGO and install a C compiler, which would not otherwise be necessary.

Comment 2 Ben Luddy 2020-02-04 17:04:22 UTC
Inspecting the symbol table of the catalog binary shows that the references to github.com/mattn/go-sqlite3 are no longer there:

---
$ oc adm release info --pullspecs registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-01-29-221825 | grep operator-lifecycle-manager | awk '{print $2}' | xargs -I{} sh -c 'docker run {} /bin/nm /usr/bin/catalog | grep github.com/mattn/go-sqlite3'
000000000156a3e0 t github.com/mattn/go-sqlite3.(*ErrNo).Error
000000000156a470 t github.com/mattn/go-sqlite3.(*ErrNo).Extend
000000000156a4d0 t github.com/mattn/go-sqlite3.(*ErrNoExtended).Error
...
000000000156aa40 t type..hash.github.com/mattn/go-sqlite3.SQLiteStmt
000000000156a860 t type..hash.github.com/mattn/go-sqlite3.handleVal
000000000156a700 t type..hash.github.com/mattn/go-sqlite3.namedValue
$ oc adm release info --pullspecs registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-02-04-122053 | grep operator-lifecycle-manager | awk '{print $2}' | xargs -I{} sh -c 'docker run {} /bin/nm /usr/bin/catalog | grep github.com/mattn/go-sqlite3'
$
---

Comment 3 Ben Luddy 2020-02-04 17:13:32 UTC
*** Bug 1795658 has been marked as a duplicate of this bug. ***

Comment 4 Bruno Andrade 2020-02-05 20:25:06 UTC
Just run the same command from comment #3 to ensure that binary references do not have github.com/mattn/go-sqlite3

oc adm release info --pullspecs registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-02-04-122053 | grep operator-lifecycle-manager | awk '{print $2}' | xargs -I{} sh -c 'docker run {} /bin/nm /usr/bin/catalog | grep github.com/mattn/go-sqlite3'
Unable to find image 'quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d57f7db9844dd9d4b28cf08a04481298d2407fb299f9ce737ee2f39d182655f9' locally
sha256:d57f7db9844dd9d4b28cf08a04481298d2407fb299f9ce737ee2f39d182655f9: Pulling from openshift-release-dev/ocp-v4.0-art-dev
964d57e311cc: Pulling fs layer
6d1814359c74: Pulling fs layer
104cc276e39f: Pulling fs layer
2e4f07cab3ec: Pulling fs layer
7ba94dfe0680: Pulling fs layer
2e4f07cab3ec: Waiting
7ba94dfe0680: Waiting
6d1814359c74: Download complete
104cc276e39f: Verifying Checksum
104cc276e39f: Download complete
2e4f07cab3ec: Verifying Checksum
2e4f07cab3ec: Download complete
7ba94dfe0680: Verifying Checksum
7ba94dfe0680: Download complete
964d57e311cc: Verifying Checksum
964d57e311cc: Download complete
964d57e311cc: Pull complete
6d1814359c74: Pull complete
104cc276e39f: Pull complete
2e4f07cab3ec: Pull complete
7ba94dfe0680: Pull complete
Digest: sha256:d57f7db9844dd9d4b28cf08a04481298d2407fb299f9ce737ee2f39d182655f9
Status: Downloaded newer image for quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d57f7db9844dd9d4b28cf08a04481298d2407fb299f9ce737ee2f39d182655f9

Considering the result, marking as VERIFIED

Comment 6 errata-xmlrpc 2020-05-04 11:27:29 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, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2020:0581