Bug 1876799

Summary: Upgrade k8s to 1.18 to fix missing dependency
Product: OpenShift Container Platform Reporter: Ricardo Lüders <rluders>
Component: Insights OperatorAssignee: Martin Kunc <mkunc>
Status: CLOSED ERRATA QA Contact: Pavel Šimovec <psimovec>
Severity: high Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: medium    
Version: unspecifiedCC: aos-bugs, avicenzi, inecas, tremes
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:38:28 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 Ricardo Lüders 2020-09-08 08:14:09 UTC
Description of problem:

We have some broken/missing indirect dependencies in the project, most of them related to openshift/library-go

How reproducible:

Pretty easy to reproduce and it blocks new contributors.

Steps to Reproduce:

1. Clone the IO project
2. Clean up your GoLang cache (cd <project_root> && go clean --cache --modcache)
3. Try to compile the project

Actual results:

go: github.com/openshift/library-go.0-20200120153246-906409ae5e38 requires
        bitbucket.org/ww/goautoneg.0-20120707110453-75cd24fc2f2c: reading https://api.bitbucket.org/2.0/repositories/ww/goautoneg?fields=scm: 403 Forbidden
        server response: Repository currently not available.

Expected results:

Successfully compile and run.

Additional info:

The is also another indirect dependency issue related to the openshift/library-go that causes this message:

vbom.ml/util.0-20180919145318-efcd4e0f9787: unrecognized import path "vbom.ml/util": https fetch: Get "https://vbom.ml/util?go-get=1": dial tcp: lookup vbom.ml on 10.0.0.138:53: no such host

I was able to compile/run the project adding a workaround fix to the go.mod file to replace the dependencies:

bitbucket.org/ww/goautoneg => github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d
vbom.ml/util => github.com/fvbommel/util v0.0.2

Comment 4 Martin Kunc 2020-09-23 04:37:46 UTC
Because bitbucket.org/ww/goautoneg was removed we need to upgrade to library-go which is using this reference from github. The new library-go requires k8s api 1.18, so we are switching to 1.18 in the whole project. This also requires change of golang to 1.13.

Comment 6 Pavel Šimovec 2020-09-25 14:45:09 UTC
git clone https://github.com/openshift/insights-operator &&
cd insights-operator&&
go clean --cache --modcache&&
make build&&
make test-e2ebuild 

build output:
go build -ldflags "-X github.com/openshift/insights-operator/vendor/k8s.io/client-go/pkg/version.gitCommit=$(git rev-parse HEAD) -X github.com/openshift/insights-operator/vendor/k8s.io/client-go/pkg/version.gitVersion=v1.0.0+$(git rev-parse --short=7 HEAD)" -o bin/insights-operator ./cmd/insights-operator
make build  152.10s user 12.23s system 627% cpu 26.198 total

no errors

go test ./test/integration -run ^\(TestIsIOHealthy\)$ ^\(TestPullSecretExists\)$ -timeout 1m
ok  	github.com/openshift/insights-operator/test/integration	2.542s

pre-check from tests-e2e works too - piece of code runs without workarounds

VERIFIED

Comment 9 errata-xmlrpc 2020-10-27 16:38:28 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 (OpenShift Container Platform 4.6 GA Images), 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:4196