etcd: go get fails in coreos/etcd with undefined: resolver.BuildOption
Following this example which I upgraded to use go-micro v2. When I run go get -u
I get this error:
go: finding gopkg.in/tomb.v1 latest
# github.com/coreos/etcd/clientv3/balancer/picker
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.22+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.22+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions
# github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.22+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption
../../../../../go3p/pkg/mod/github.com/coreos/etcd@v3.3.22+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption
This looks like an error in coreos/etcd v 3.3.22. Here is my go.mod file:
require (
github.com/coreos/etcd v3.3.22+incompatible // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/gogo/protobuf v1.3.1 // indirect
github.com/golang/protobuf v1.4.2
github.com/imdario/mergo v0.3.9 // indirect
github.com/micro/go-micro/v2 v2.7.0
github.com/miekg/dns v1.1.29 // indirect
github.com/nats-io/nats.go v1.10.0 // indirect
go.uber.org/zap v1.15.0 // indirect
golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37 // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2 // indirect
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 // indirect
golang.org/x/tools v0.0.0-20200521211927-2b542361a4fc // indirect
google.golang.org/genproto v0.0.0-20200521103424-e9a78aa275b7 // indirect
google.golang.org/grpc v1.29.1 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
honnef.co/go/tools v0.0.1-2020.1.4 // indirect
)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 15
- Comments: 27 (4 by maintainers)
Commits related to this issue
- jmroh: #212 go.mod:incorrect pacakge dependency in etcd 3.3 without go.mod https://github.com/etcd-io/etcd/issues/11931 — committed to snetsystems/cloudhub by jaemyeongroh 4 years ago
- Update Readme for install etcd client v3 more visibility #13108 There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar erro... — committed to forging2012/etcd by forging2012 3 years ago
- Update Readme for Install etcd client v3 more visibility #13108 There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar erro... — committed to forging2012/etcd by forging2012 3 years ago
- Update Readme for install etcd client v3 more visibility #13108 There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar erro... — committed to wilsonwang371/etcd by forging2012 3 years ago
- Update Readme for Install etcd client v3 more visibility #13108 There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar erro... — committed to wilsonwang371/etcd by forging2012 3 years ago
- Update Readme for install etcd client v3 more visibility #13108 There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar erro... — committed to wilsonwang371/etcd by forging2012 3 years ago
- Update Readme for Install etcd client v3 more visibility #13108 There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar erro... — committed to wilsonwang371/etcd by forging2012 3 years ago
As a workaround locally, I just did
go get google.golang.org/grpc@v1.26.0
- that updated the go.mod and builds are working again.change it to go.etcd.io/etcd/client/v3 instead of go.etcd.io/etcd/clientv3
go clean -modcache
resolve my problemBe careful - grpc >= v1.26.0, <1.27.1 has a nasty bug where temporary failure of DNS resolution will bring your client down until it is restarted. See https://github.com/grpc/grpc-go/issues/3353
Same here:
This did not help. Only
go get google.golang.org/grpc@v1.26.0
as mentioned above helps.As long this bug exists, it is not possible to upgrade grpc.
Dang it. Go starts to remind me a node.js with outdated stuff which just donβt work anymore π€¦ββοΈ
Any chance this will be fixed? As of May 19th it is still broken.
FWIW the fixes to the short-term problem should be quite simple. A few things were renamed (BuildOption -> BuildOptions, ResolveNowOption -> ResolveNowOptions, PickOptions -> PickInfo), and the signature of Pick was changed slightly from the original API.
GOROOT=D:\go #gosetup GOPATH=D:\go;D:\project #gosetup D:\go\bin\go.exe build -o C:\Users\cph\AppData\Local\Temp\GoLand___go_build_go_micro.exe go-micro #gosetup
github.com/coreos/etcd/clientv3/balancer/resolver/endpoint
D:\go\pkg\mod\github.com\coreos\etcd@v3.3.17+incompatible\clientv3\balancer\resolver\endpoint\endpoint.go:114:87: undefined: resolver.BuildOption D:\go\pkg\mod\github.com\coreos\etcd@v3.3.17+incompatible\clientv3\balancer\resolver\endpoint\endpoint.go:182:40: undefined: resolver.ResolveNowOption
github.com/coreos/etcd/clientv3/balancer/picker
D:\go\pkg\mod\github.com\coreos\etcd@v3.3.17+incompatible\clientv3\balancer\picker\err.go:37:53: undefined: balancer.PickOptions D:\go\pkg\mod\github.com\coreos\etcd@v3.3.17+incompatible\clientv3\balancer\picker\roundrobin_balanced.go:55:63: undefined: balancer.PickOptions
Compilation finished with exit code 2
Will do. Thanks for helping and thanks for your work.
Please test and provide feedback. The more issues we detect early the higher chances good GA will land in 2-3 weeks.
Faced the same issue. The short term solution by @dfawley of changing the names locally helped.
go build
now succeeds.go mod tidy
still fails with:Tried both
go clean -modcache
andgo get google.golang.org/grpc@v1.26.0
.