-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go get fails in coreos/etcd with undefined: resolver.BuildOption #11931
Comments
I have the same problem :( |
Same here:
|
Looks like etcd is still using an experimental grpc-go API that was marked as deprecated and announced for deletion 6 months ago: Someone will need to migrate this to the new API, although that doesn't fix the long-term problem that it will again be relying upon an experimental API, also subject to further changes. |
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. |
In my case what i did was to get only the modules that i am using in my project with just |
Can we cherrypick the fix to v3.3? |
As a workaround locally, I just did |
Be 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 grpc/grpc-go#3353 |
Thank you @utrack - that's good to know. |
Dang it. Go starts to remind me a node.js with outdated stuff which just don't work anymore 🤦♂️ |
@arges proposed a fix in #11580 but it has not received any attention and was closed UPD: if you use vendoring here is how to apply the patch from pull request go mod download
go mod vendor
cd vendor/github.com/coreos/etcd/
curl -Ls https://github.com/etcd-io/etcd/pull/11580.patch | patch -p1
cd - aaaaand... it will fail to compile because grpc api has changed. Dang it. UPD2: to make clientv3 build I've made a separate patch (WARNING: I have no idea what I am doing, "I am just out for a walk") corpix@adb7dca (with support for grpc 1.30.x), apply it with: cd vendor/github.com/coreos/etcd/
curl -Ls https://github.com/corpix/etcd/commit/adb7dcade831f698e657bf1ccab6c138be05fb84.patch | patch -p1
cd - |
|
This did not help. Only As long this bug exists, it is not possible to upgrade grpc. |
It seams this should be fixed with v3.5: #12124 (comment). See also: #12124 |
Faced the same issue. The short term solution by @dfawley of changing the names locally helped.
Tried both |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
Any chance this will be fixed? As of May 19th it is still broken.
|
Please try:
|
Thanks! That works. However, |
Please test and provide feedback. The more issues we detect early the higher chances good GA will land in 2-3 weeks. |
Will do. Thanks for helping and thanks for your work. |
There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar errors were encountered, as follows: etcd-io#13108 ``` ➜ ~ go version go version go1.16.5 darwin/amd64 ➜ ~ go get go.etcd.io/etcd/clientv3 go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 # github.com/coreos/etcd/clientv3/balancer/picker go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions # github.com/coreos/etcd/clientv3/balancer/resolver/endpoint go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption ``` There are many examples of confusion here: - etcd-io#12577 - etcd-io#12181 - etcd-io#12068 - etcd-io#11931 ...... So, As suggested by @lilic , I submitted Readme update.
There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar errors were encountered, as follows: etcd-io#13108 ``` ➜ ~ go version go version go1.16.5 darwin/amd64 ➜ ~ go get go.etcd.io/etcd/clientv3 go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 # github.com/coreos/etcd/clientv3/balancer/picker go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions # github.com/coreos/etcd/clientv3/balancer/resolver/endpoint go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption ``` There are many examples of confusion here: - etcd-io#12577 - etcd-io#12181 - etcd-io#12068 - etcd-io#11931 ...... So, As suggested by @lilic , I submitted Readme update.
There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar errors were encountered, as follows: etcd-io#13108 ``` ➜ ~ go version go version go1.16.5 darwin/amd64 ➜ ~ go get go.etcd.io/etcd/clientv3 go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 # github.com/coreos/etcd/clientv3/balancer/picker go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions # github.com/coreos/etcd/clientv3/balancer/resolver/endpoint go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption ``` There are many examples of confusion here: - etcd-io#12577 - etcd-io#12181 - etcd-io#12068 - etcd-io#11931 ...... So, As suggested by @lilic , I submitted Readme update.
There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar errors were encountered, as follows: etcd-io#13108 ``` ➜ ~ go version go version go1.16.5 darwin/amd64 ➜ ~ go get go.etcd.io/etcd/clientv3 go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 # github.com/coreos/etcd/clientv3/balancer/picker go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions # github.com/coreos/etcd/clientv3/balancer/resolver/endpoint go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption ``` There are many examples of confusion here: - etcd-io#12577 - etcd-io#12181 - etcd-io#12068 - etcd-io#11931 ...... So, As suggested by @lilic , I submitted Readme update.
There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar errors were encountered, as follows: etcd-io#13108 ``` ➜ ~ go version go version go1.16.5 darwin/amd64 ➜ ~ go get go.etcd.io/etcd/clientv3 go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 # github.com/coreos/etcd/clientv3/balancer/picker go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions # github.com/coreos/etcd/clientv3/balancer/resolver/endpoint go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption ``` There are many examples of confusion here: - etcd-io#12577 - etcd-io#12181 - etcd-io#12068 - etcd-io#11931 ...... So, As suggested by @lilic , I submitted Readme update.
There are many developers on the web, confused by how to install etcd v3 for the development of go project. A number of similar errors were encountered, as follows: etcd-io#13108 ``` ➜ ~ go version go version go1.16.5 darwin/amd64 ➜ ~ go get go.etcd.io/etcd/clientv3 go: downloading golang.org/x/net v0.0.0-20201021035429-f5854403a974 # github.com/coreos/etcd/clientv3/balancer/picker go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/err.go:37:44: undefined: balancer.PickOptions go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/picker/roundrobin_balanced.go:55:54: undefined: balancer.PickOptions # github.com/coreos/etcd/clientv3/balancer/resolver/endpoint go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:114:78: undefined: resolver.BuildOption go/pkg/mod/github.com/coreos/etcd@v3.3.25+incompatible/clientv3/balancer/resolver/endpoint/endpoint.go:182:31: undefined: resolver.ResolveNowOption ``` There are many examples of confusion here: - etcd-io#12577 - etcd-io#12181 - etcd-io#12068 - etcd-io#11931 ...... So, As suggested by @lilic , I submitted Readme update.
i have resolve it. |
这个bug到现在都还没解决? |
GOROOT=D:\go #gosetup github.com/coreos/etcd/clientv3/balancer/resolver/endpointD:\go\pkg\mod\github.com\coreos\etcd@v3.3.17+incompatible\clientv3\balancer\resolver\endpoint\endpoint.go:114:87: undefined: resolver.BuildOption github.com/coreos/etcd/clientv3/balancer/pickerD:\go\pkg\mod\github.com\coreos\etcd@v3.3.17+incompatible\clientv3\balancer\picker\err.go:37:53: undefined: balancer.PickOptions Compilation finished with exit code 2 |
change it to go.etcd.io/etcd/client/v3 instead of go.etcd.io/etcd/clientv3 |
Following this example which I upgraded to use go-micro v2. When I run
go get -u
I get this error:This looks like an error in coreos/etcd v 3.3.22. Here is my go.mod file:
The text was updated successfully, but these errors were encountered: