Bug 1796092 - Catalog operator assumes transitive dependency on package requiring CGO
Summary: Catalog operator assumes transitive dependency on package requiring CGO
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.4.0
Assignee: Ben Luddy
QA Contact: Bruno Andrade
URL:
Whiteboard:
: 1795658 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-29 15:34 UTC by Ben Luddy
Modified: 2020-05-04 11:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:27:29 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github operator-framework operator-lifecycle-manager pull 1258 None closed Bug 1796092: Update operator-registry dependency to v1.5.8. 2020-04-29 09:15:27 UTC
Red Hat Bugzilla 1795658 unspecified CLOSED Operator registry package "pkg/configmap" takes unnecessary dependency on cgo package go-sqlite3 2020-10-14 00:28:05 UTC
Red Hat Product Errata RHBA-2020:0581 None None None 2020-05-04 11:27:45 UTC

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


Note You need to log in before you can comment on or make changes to this bug.