Skip to content
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

can't use etcd by go mod? #11336

Closed
smallnest opened this issue Nov 7, 2019 · 6 comments
Closed

can't use etcd by go mod? #11336

smallnest opened this issue Nov 7, 2019 · 6 comments

Comments

@smallnest
Copy link

Go version: 1.13

If I download etcd by go mod, it shows an error:

➜  protocol git:(master) ✗ go get -u -v github.com/coreos/etcd@latest
go: finding golang.org/x/net latest
go: finding golang.org/x/sys latest
go: finding github.com/coreos/pkg latest
go: finding golang.org/x/crypto latest
go: finding github.com/golang/groupcache latest
go: finding golang.org/x/tools latest
go: finding golang.org/x/lint latest
go: finding google.golang.org/genproto latest
go: finding github.com/modern-go/concurrent latest
go: finding github.com/prometheus/client_model latest
go: finding github.com/coreos/go-systemd latest
go: finding golang.org/x/time latest
go: finding github.com/tmc/grpc-websocket-proxy latest
go: finding go.uber.org/tools latest
go: finding github.com/xiang90/probing latest
build github.com/coreos/etcd: cannot load google.golang.org/grpc/resolver/dns: module google.golang.org/grpc@latest (v1.25.0) found, but does not contain package google.golang.org/grpc/resolver/dns

The package google.golang.org/grpc/resolver/dns has becomed "internal" and etcd has use its own the package in vendor, but if I use go module or imported etcd in my go.mod, an error was thrown and the operation failed.

@owend
Copy link

owend commented Nov 8, 2019

I ran into this same build issue today, it's due to the latest release of grpc moving that package. The build error can be worked around if the grpc 1.24.0 version is used.

This ticket could probably use a better name, but the corresponding issue on the grpc side is here: grpc/grpc-go#3157

The long term fix is that etcd probably shouldn't be using this package directly, the public interface is resolver.Get("dns")

@menghanl
Copy link

menghanl commented Nov 8, 2019

FYI, The moved packages will be added back in grpc/grpc-go#3162. Those packages will be thin wrappers of the public APIs (e.g. resolver.Get("dns")). A minor release will be made for this change.

@dfawley
Copy link

dfawley commented Nov 8, 2019

The long term fix is that etcd probably shouldn't be using this package directly, the public interface is resolver.Get("dns")

If it's necessary to get a DNS resolver builder. It's unclear why etcd is importing the DNS package, however, as this is unexpected - can anyone explain?

@stale
Copy link

stale bot commented Apr 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 6, 2020
@spzala spzala removed the stale label Apr 27, 2020
@philips
Copy link
Contributor

philips commented Apr 28, 2020

I think this is fixed via #11823.

I am closing this under that assumption. Please correct me if I am wrong.

@philips philips closed this as completed Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

7 participants