Etcd: Can't install etcd/tools/benchmark via go get

Created on 16 Jan 2020  路  7Comments  路  Source: etcd-io/etcd

Using go get go.etcd.io/etcd/tools/benchmark results in:

go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/balancer_conn_wrappers.go:28:2: use of internal package google.golang.org/grpc/internal/buffer not allowed 
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/clientconn.go:49:2: use of internal package google.golang.org/grpc/internal/resolver/dns not allowed
go/src/go.etcd.io/etcd/vendor/google.golang.org/grpc/clientconn.go:50:2: use of internal package google.golang.org/grpc/internal/resolver/passthrough not allowed

This has worked previously and is running on go version go1.11.5 linux/amd64

Most helpful comment

go get go.etcd.io/etcd/tools/benchmark

go.etcd.io/etcd/clientv3/balancer/picker

../go/src/go.etcd.io/etcd/clientv3/balancer/picker/err.go:25:9: cannot use &errPicker literal (type *errPicker) as type Picker in return argument:
*errPicker does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
../go/src/go.etcd.io/etcd/clientv3/balancer/picker/roundrobin_balanced.go:33:9: cannot use &rrBalanced literal (type *rrBalanced) as type Picker in return argument:
*rrBalanced does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

I am getting this error on:
go version go1.15.2 linux/amd64

All 7 comments

This command does work however on go version go1.10.4 linux/amd64

@Cjen1 can you also please try the latest supported go 1.13 and see how that goes? Thanks!

Hi trying on go version go1.13.6 linux/amd64 fails with the same error. I've gotten around this by cloning the repo locally and then using go build && go install and that has appeared to work, it is just the go get version which fails.

@Cjen1 thanks for verifying. I think the error is due to the vendor directory is missing the referenced internal packages. I am digging into it more and will work on fix. Thanks!

/cc @YoyinZyc

@Cjen1 This is fixed under https://github.com/etcd-io/etcd/pull/11557 I am closing the issue after successfully running the go get. Please reopen if needed. Thanks!

go get go.etcd.io/etcd/tools/benchmark

go.etcd.io/etcd/clientv3/balancer/picker

../go/src/go.etcd.io/etcd/clientv3/balancer/picker/err.go:25:9: cannot use &errPicker literal (type *errPicker) as type Picker in return argument:
*errPicker does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)
../go/src/go.etcd.io/etcd/clientv3/balancer/picker/roundrobin_balanced.go:33:9: cannot use &rrBalanced literal (type *rrBalanced) as type Picker in return argument:
*rrBalanced does not implement Picker (wrong type for Pick method)
have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
want Pick(balancer.PickInfo) (balancer.PickResult, error)

I am getting this error on:
go version go1.15.2 linux/amd64

Was this page helpful?
0 / 5 - 0 ratings

Related issues

r007m4n picture r007m4n  路  3Comments

olalonde picture olalonde  路  4Comments

el10savio picture el10savio  路  4Comments

cheyang picture cheyang  路  3Comments

yuchengwu picture yuchengwu  路  4Comments