Test-infra: kubetest compile error

Created on 26 Aug 2019  路  14Comments  路  Source: kubernetes/test-infra

What happened:
When trying to install kubetest via go get -u k8s.io/test-infra/kubetest the following error occurs in the client-go package:

src/k8s.io/client-go/transport/round_trippers.go:70:11: cannot convert klog.V(9) (type klog.Verbose) to type bool
src/k8s.io/client-go/transport/round_trippers.go:72:11: cannot convert klog.V(8) (type klog.Verbose) to type bool
src/k8s.io/client-go/transport/round_trippers.go:74:11: cannot convert klog.V(7) (type klog.Verbose) to type bool
src/k8s.io/client-go/transport/round_trippers.go:76:11: cannot convert klog.V(6) (type klog.Verbose) to type bool

What you expected to happen:
Kubetest installs without errors.

How to reproduce it (as minimally and precisely as possible):
Run go get -u k8s.io/test-infra/kubetest in a clean environment.

docker run -it --entrypoint /bin/bash golang:1.12.9
go get -u k8s.io/test-infra/kubetest

Please provide links to example occurrences, if any:

Anything else we need to know?:

kinbug

Most helpful comment

Run with a GO111MODULE=on environment variable?

All 14 comments

I face a same error.

Yes, we've experienced same problems in our own CI.

@fejta could this be related to your changes in this commit https://github.com/kubernetes/test-infra/commit/d6394f164a8d40f9bbf97b043719db5cb5da9783.
We are facing this issue since Friday 24.08.2019 ca. 20:00 CET.

I reverted https://github.com/kubernetes/test-infra/pull/14036 locally and it helped.

I'm seeing this too - is there an ETA for a fix?

I also am facing this issue on my local environment during building e2e test binary.

This is because of https://github.com/kubernetes/kubernetes/issues/81878

A workaround is to drop the -u, aka

  • works: go get k8s.io/test-infra/kubetest, whereas
  • fails: go get -u k8s.io/test-infra/kubetest

at least until one of https://github.com/kubernetes/kubernetes/issues/81878 and/or https://github.com/kubernetes/test-infra/issues/12107 are resolved.

(maybe) related: kubernetes/klog/pull/91

@fejta dropping the -u does not resolve the problem for me

docker run -it --entrypoint /bin/bash golang:1.12.9
root@6ab8989e9adc:/go# go get k8s.io/test-infra/kubetest
# k8s.io/client-go/transport
src/k8s.io/client-go/transport/round_trippers.go:70:11: cannot convert klog.V(9) (type klog.Verbose) to type bool
src/k8s.io/client-go/transport/round_trippers.go:72:11: cannot convert klog.V(8) (type klog.Verbose) to type bool
src/k8s.io/client-go/transport/round_trippers.go:74:11: cannot convert klog.V(7) (type klog.Verbose) to type bool
src/k8s.io/client-go/transport/round_trippers.go:76:11: cannot convert klog.V(6) (type klog.Verbose) to type bool
root@6ab8989e9adc:/go#

Run with a GO111MODULE=on environment variable?

Run with a GO111MODULE=on environment variable?

Yeah, works for me.

Hi,

I am using k8s.io/client-go and I am facing the same issue & my build is failing. On another thread(https://github.com/kubernetes/client-go/issues/656) I saw got closed with suggested resolution of using k8s.io/klog v0.4.0.

I checked and im referring that in my go.mod and still am getting the error.

I would appreciate any help as my build is stuck right now.

Thanks,

-Sreeni

Getting Error
vagrant@master-1:~$ env|grep GO111MODULE
GO111MODULE=on
vagrant@master-1:~$ go get -v -u k8s.io/test-infra/kubetest
go: cannot find main module; see 'go help modules'

Was this page helpful?
0 / 5 - 0 ratings