$ go version
go version go1.15.2 linux/amd64
$ GO111MODULE=off go get -v go.etcd.io/etcd/v3
get "go.etcd.io/etcd/v3": found meta tag get.metaImport{Prefix:"go.etcd.io/etcd", VCS:"git", RepoRoot:"https://github.com/etcd-io/etcd"} at //go.etcd.io/etcd/v3?go-get=1
get "go.etcd.io/etcd/v3": verifying non-authoritative meta tag
go.etcd.io/etcd (download)
created GOPATH=/home/espindola/go; see 'go help gopath'
cannot find package "go.etcd.io/etcd/v3" in any of:
/usr/lib/golang/src/go.etcd.io/etcd/v3 (from $GOROOT)
/home/espindola/go/src/go.etcd.io/etcd/v3 (from $GOPATH)
$ GO111MODULE=on go get -v go.etcd.io/etcd/v3
get "go.etcd.io/etcd": found meta tag get.metaImport{Prefix:"go.etcd.io/etcd", VCS:"git", RepoRoot:"https://github.com/etcd-io/etcd"} at //go.etcd.io/etcd?go-get=1
get "go.etcd.io/etcd/v3": found meta tag get.metaImport{Prefix:"go.etcd.io/etcd", VCS:"git", RepoRoot:"https://github.com/etcd-io/etcd"} at //go.etcd.io/etcd/v3?go-get=1
get "go.etcd.io/etcd/v3": verifying non-authoritative meta tag
go: downloading go.etcd.io/etcd v0.5.0-alpha.5
go: downloading go.etcd.io/etcd v2.3.8+incompatible
go get go.etcd.io/etcd/v3: module go.etcd.io/etcd@upgrade found (v2.3.8+incompatible), but does not contain package go.etcd.io/etcd/v3
Quoting @ptabor from #12431
"We need to tag the repository properly as 3.5.0-pre to make it work. Will try to do this this week.
For now please depend on the 3.4 branch where client is part of the server.
If you want to depend on release 3.4.13, please use:
go get go.etcd.io/etcd@ae9734e.
Don't worry about:
go.etcd.io/etcd ae9734e => v0.5.0-alpha.5.0.20200824191128-ae9734ed278b
You will find in the go.mod file."
Alternatively, you can replace those modules:
replace (
go.etcd.io/etcd/api/v3 => go.etcd.io/etcd/api/v3 v3.0.0-20201103155942-6e800b9b0161
go.etcd.io/etcd/pkg/v3 => go.etcd.io/etcd/pkg/v3 v3.0.0-20201103155942-6e800b9b0161
)
FYI: The script to make a proper release of e.g. 3.5.0-alpha.0 is being reviewed in https://github.com/etcd-io/etcd/pull/12452
Awesome! I'm really looking forward to it. It'll help the ecosystem a lot as a bunch of basic packages (eg. Viper) depend on etcd and pulls in a plethora of unnecessary dependencies.
My favorite dependency cycle:
etcd -> prometheous-client -> prometheus-common -> go-kit -> etcd
Yeah, that's a disaster. Go kit should really be split up into modules as well.
I'm not sure if this is related, so please bear with me... I'm trying to update my client from 3.3.x to 3.4.x and it is also failing to go get:
# go get go.etcd.io/etcd/client/v3
go: go.etcd.io/etcd/client/v3 upgrade => v3.0.0-20201109164711-01844fd28560
go get: go.etcd.io/etcd/client/[email protected] requires
go.etcd.io/etcd/api/[email protected]: invalid version: unknown revision 000000000000
Maybe the client should not really move from github.com/coreos/etcd/clientv3 to go.etcd.io/etcd/client/v3? I'm a bit confused about this import location change, but I didn't really find any documentation about this, maybe I should keep using the later namespace? Or better, is there a client upgrade guide/documentation somewhere? can you point me to it?
Also, https://etcd.io/docs/v3.4.0/integrations/ mentions the etcd/clientv3 - the officially maintained Go client for v3 but points to a non-existent (404) address https://github.com/etcd-io/etcd/blob/master/clientv3. what should it point to?
BTW, this seems related to #12464, maybe my question belongs there?
# go get go.etcd.io/etcd/client/v3
go: go.etcd.io/etcd/client/v3 upgrade => v3.0.0-20201109164711-01844fd28560
go get: go.etcd.io/etcd/client/[email protected] requires
go.etcd.io/etcd/api/[email protected]: reading https://goproxy.cn/go.etcd.io/etcd/api/v3/@v/v3.0.0-00010101000000-000000000000.mod: 404 Not Found
server response: not found: go.etcd.io/etcd/api/[email protected]: invalid version: unknown revision 000000000000
I have the same problem 馃槶
# go get go.etcd.io/etcd/client/v3
go: downloading go.etcd.io/etcd v0.5.0-alpha.5
go: downloading go.etcd.io/etcd/client/v3 v3.0.0-20201116001935-06e48f04865f
go: downloading go.etcd.io/etcd v3.3.25+incompatible
go: go.etcd.io/etcd/client/v3 upgrade => v3.0.0-20201116001935-06e48f04865f
go get: go.etcd.io/etcd/client/[email protected] requires
go.etcd.io/etcd/api/[email protected]: reading https://goproxy.cn/go.etcd.io/etcd/api/v3/@v/v3.5.0-pre.mod: 404 Not Found
server response: not found: go.etcd.io/etcd/api/[email protected]: invalid version: unknown revision api/v3.5.0-pre
FYI: The release of 3.5.0-alpha.0 is tracked by: https://github.com/etcd-io/etcd/issues/12498
If you want to test is earlier you can play with my fork of the release:
go get github.com/ptabor/etcd/client/[email protected]
go: downloading github.com/ptabor/etcd/client/v3 v3.5.0-alpha.22
go: downloading github.com/ptabor/etcd/pkg/v3 v3.5.0-alpha.22
go: downloading github.com/ptabor/etcd/api/v3 v3.5.0-alpha.22
Most helpful comment
My favorite dependency cycle:
etcd -> prometheous-client -> prometheus-common -> go-kit -> etcd