Closed kinueng closed 4 years ago
I found this link where the same failure a few days ago led openshift/odo to move their ref to goautoneg from bitbucket to github: https://github.com/openshift/odo/issues/3983 I tried applying the same changes to the operator’s go.mod (added a replace) and go.sum (removed the bitbucket goautoneg ref). It helped a little but still failed at the next step:
Step 9/27 : RUN go build github.com/kappnav/operator/cmd/manager
---> Running in 65ccb3b37bab
go: github.com/munnerz/goautoneg@v0.0.0-20120707110453-a547fc61f48d used for two different module paths (bitbucket.org/ww/goautoneg and github.com/munnerz/goautoneg)
The command '/bin/sh -c go build github.com/kappnav/operator/cmd/manager' returned a non-zero code: 1
I believe the root cause is the dependency on an old operator-sdk
v0.10.0.
I tracked down the nested dependency that is still referencing the now deleted bitbucket repo for `goautoneg. With the fix from https://github.com/kappnav/issues/issues/210#issuecomment-696378901, and trying various changes, I was able to produce this error:
go build github.com/kappnav/operator/cmd/manager
go: github.com/operator-framework/operator-sdk@v0.10.1-0.20190917191403-5f663690a3bb requires
github.com/operator-framework/operator-lifecycle-manager@v0.0.0-20190128024246-5eb7ae5bdb7a requires
github.com/operator-framework/operator-registry@v1.0.4 requires
github.com/operator-framework/operator-lifecycle-manager@v0.0.0-20190105193533-81104ffdc4fb requires
bitbucket.org/ww/goautoneg@v0.0.0-20120707110453-75cd24fc2f2c: reading github.com/munnerz/goautoneg/go.mod at revision v0.0.0: unknown revision v0.0.0
In operator-sdk v0.18.0, the dependency on operator-lifecycle-manager
was removed. Note operator-lifecycle-manager is the dep that is trying to pull goautoneg
from bitbucket.
However, when I changed the https://github.com/kappnav/operator/blob/45641d267c2106bbd48fbcefffa8e5983086f32c/go.mod#L44 to v0.18.0
, I get the following error
go: finding module for package sigs.k8s.io/controller-runtime/pkg/log/zap
cmd/manager/main.go:35:2: module github.com/operator-framework/operator-sdk@latest found (v1.0.1, replaced by github.com/operator-framework/operator-sdk@v0.18.0), but does not contain package github.com/operator-framework/operator-sdk/pkg/restmapper
/go/pkg/mod/github.com/operator-framework/operator-sdk@v0.18.0/pkg/k8sutil/k8sutil.go:30:2: module sigs.k8s.io/controller-runtime@latest found (v0.6.3, replaced by sigs.k8s.io/controller-runtime@v0.1.12), but does not contain package sigs.k8s.io/controller-runtime/pkg/log
/go/pkg/mod/github.com/operator-framework/operator-sdk@v0.18.0/pkg/log/zap/logger.go:26:2: module sigs.k8s.io/controller-runtime@latest found (v0.6.3, replaced by sigs.k8s.io/controller-runtime@v0.1.12), but does not contain package sigs.k8s.io/controller-runtime/pkg/log/zap
Edit: The error is also in the travis build. The build failed to report a failure and marked the build as success (false positive)
~Odd finding, master
branch on travis builds successfully.~ See build https://travis-ci.com/github/kappnav/operator/builds/186012034
just executing operator new command gives the error. I sthere a different verison that works.
go: github.com/operator-framework/operator-sdk@v1.0.1-0.20200925193542-4ce0d1627f3a requires
github.com/operator-framework/operator-registry@v1.1.1 requires
bitbucket.org/ww/goautoneg@v0.0.0-20120707110453-75cd24fc2f2c: reading https://api.bitbucket.org/2.0/repositories/ww/goautoneg?fields=scm: 404 Not Found
kappnav/operator is not building due the
goautoneg