Description of problem:
We have some broken/missing indirect dependencies in the project, most of them related to openshift/library-go
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
go: firstname.lastname@example.org requires
email@example.com: reading https://api.bitbucket.org/2.0/repositories/ww/goautoneg?fields=scm: 403 Forbidden
server response: Repository currently not available.
Successfully compile and run.
The is also another indirect dependency issue related to the openshift/library-go that causes this message:
firstname.lastname@example.org: 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
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.
git clone https://github.com/openshift/insights-operator &&
go clean --cache --modcache&&
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
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
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.