Bug 1876799 - Upgrade k8s to 1.18 to fix missing dependency
Summary: Upgrade k8s to 1.18 to fix missing dependency
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Insights Operator
Version: unspecified
Hardware: Unspecified
OS: Linux
Target Milestone: ---
: 4.6.0
Assignee: Martin Kunc
QA Contact: Pavel Šimovec
Marc Muehlfeld
Depends On:
TreeView+ depends on / blocked
Reported: 2020-09-08 08:14 UTC by Ricardo Lüders
Modified: 2020-10-27 16:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-10-27 16:38:28 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift insights-operator pull 186 0 None closed Bug 1876799: Upgrade to k8s 0.18.9 2021-02-09 14:21:25 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:38:41 UTC

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 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


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.


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