Client-go: cannot convert klog.V(9) (type klog.Verbose) to type bool

Created on 16 Aug 2019  路  6Comments  路  Source: kubernetes/client-go

This is failing with go get.

# k8s.io/client-go/transport
../../../k8s.io/client-go/transport/round_trippers.go:70:11: cannot convert klog.V(9) (type klog.Verbose) to type bool
../../../k8s.io/client-go/transport/round_trippers.go:72:11: cannot convert klog.V(8) (type klog.Verbose) to type bool
../../../k8s.io/client-go/transport/round_trippers.go:74:11: cannot convert klog.V(7) (type klog.Verbose) to type bool
../../../k8s.io/client-go/transport/round_trippers.go:76:11: cannot convert klog.V(6) (type klog.Verbose) to type bool
# k8s.io/utils/trace
../../../k8s.io/utils/trace/trace.go:100:57: invalid operation: stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4) (mismatched types bool and klog.Verbose)
../../../k8s.io/utils/trace/trace.go:112:56: invalid operation: stepThreshold == 0 || stepDuration > stepThreshold || klog.V(4) (mismatched types bool and klog.Verbose)

Most helpful comment

replace klog.V(...) with klog.V(...).Enabled()

All 6 comments

This is a duplicate of https://github.com/kubernetes/client-go/issues/656#issuecomment-521869630

The log library was just changed in the last day on the master branch. You will need to use a compatible tag of that library in your build

Is there any plan to fix it? Some pipelines may not have gomodules support so they are broken from this.

eventually either the klog PR will be reworked or it will be pulled into k8s.io/kubernetes and a compatible version of k8s.io/client-go will be published to master, but I'd recommend avoiding a pipeline that relies on master of all transitive dependencies.

Hi,

Im still having the issue..

Heres the error I get

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

My go.mod refers as follows..

            istio.io/api v0.0.0-20190907133855-07957a9b3cc0

            k8s.io/apimachinery v0.0.0-20190817020851-f2f3a405f61d

            k8s.io/client-go v0.0.0-20190819141724-e14f31a72a77

            k8s.io/klog v0.4.0 // indirect

            k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf // indirect

            k8s.io/utils v0.0.0-20190907131718-3d4f5b7dea0b // indirect

Any help on what I am doing wrong ? Stuck with a broken build now.

Thanks,

-Sreeni

replace klog.V(...) with klog.V(...).Enabled()

@lebinhe lebinhe Can we merge this patch of adding Enabled()

Was this page helpful?
0 / 5 - 0 ratings

Related issues

narasago picture narasago  路  3Comments

h0tbird picture h0tbird  路  3Comments

mheese picture mheese  路  5Comments

tamalsaha picture tamalsaha  路  3Comments

CSharpRU picture CSharpRU  路  7Comments