Skip to content

Commit 2caf2ac

Browse files
andrewmains12shaan420
authored andcommitted
etcd_docker 7: move etcd dependency down to 3.5.4 (#4151)
This changes our etcd version *down* to 3.5.4 from 3.6.0-alpha.0. In #4087, we made the choice to go to an alpha version of etcd in order to get around the thorny dependency issues described in that ticket. This was partially on the assumption that etcd would release a full 3.6.0 version in the months following. As of 9/2/2022, that hasn't happened--no progress seems to have been made on etcd 3.6.0. As described in #4144, we've since addressed the dependency issues via other means, removing our dependency on the `embed` and `integration` packages. This allows us to move back to an etcd stable version, 3.5.4. Since stable versions are generally preferable, I'm taking the opportunity to do so. commit-id:720abd40
1 parent 508a2b6 commit 2caf2ac

File tree

2 files changed

+24
-31
lines changed

2 files changed

+24
-31
lines changed

go.mod

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,26 @@ require (
5959
github.com/uber/tchannel-go v1.31.1-0.20220504180658-be708aa1a97d
6060
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a
6161
github.com/willf/bitset v1.1.11
62-
// etcd is currently on an alpha version to accomodate a GRPC version upgrade. See
63-
// https://github.com/m3db/m3/issues/4090 for the followup task to move back to a stable version.
64-
// Gory details (why we're doing this):
62+
// Quick note about this etcd version: this version is compatible with our GRPC version (>= 1.41.x) if and only if
63+
// the etcd/embed and etcd/testing/v3/frameworks/integration packages are *not* used. See
64+
// https://github.com/m3db/m3/issues/4144 for a description of the problem.
65+
// As of this writing, we have replaced all usages of those packages with a docker based solution, which eliminates
66+
// the issue. However, if you're seeing conflicts with GRPC and/or otel packages coming from etcd, you may have
67+
// pulled in one of the packages by mistake.
68+
// Use github.com/m3db/m3/src/integration/resources/docker/dockerexternal/etcdintegration
69+
// instead for tests. Don't depend on the `embed` package at all.
70+
//
71+
// Gory details (why the issues occur):
6572
//
6673
// - We import etcd/server/v3 via etcd/embed and etcd/testing/v3/frameworks/integration.
6774
// - etcd/server/v3 in 3.5.2 depends on pre 1.0 opentelemetry. Bleeding edge etcd depends on 1.0 opentelemetry
6875
// - M3 depends on 1.0 opentelemetry — this conflicts with etcd 3.5.2, but not bleeding edge etcd
69-
go.etcd.io/etcd/api/v3 v3.6.0-alpha.0
70-
go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0
71-
go.etcd.io/etcd/client/v3 v3.6.0-alpha.0
76+
//
77+
// Later versions of etcd (>= 3.5.5, >= 3.6.0-alpha.0) have fixed the dependency conflicts, but it is still
78+
// probably better to only depend on the client packages here.
79+
go.etcd.io/etcd/api/v3 v3.5.4
80+
go.etcd.io/etcd/client/pkg/v3 v3.5.4
81+
go.etcd.io/etcd/client/v3 v3.5.4
7282
go.opentelemetry.io/collector v0.45.0
7383
go.opentelemetry.io/otel v1.4.1
7484
go.opentelemetry.io/otel/bridge/opentracing v1.4.1
@@ -197,19 +207,3 @@ replace github.com/google/flatbuffers => github.com/google/flatbuffers v1.12.1
197207
replace github.com/uber-go/atomic => github.com/uber-go/atomic v1.4.0
198208

199209
replace google.golang.org/grpc => google.golang.org/grpc v1.40.1
200-
201-
// TODO: this can be removed once M3 is on Go 1.17.x
202-
// This is here because of a dependency chain that makes client/v2 hard dependent on Go 1.17. Specifically:
203-
//~ /Code/m3 $ go mod why sigs.k8s.io/json
204-
// # sigs.k8s.io/json
205-
// github.com/m3db/m3/src/aggregator/integration
206-
// go.etcd.io/etcd/tests/v3/framework/integration
207-
// go.etcd.io/etcd/server/v3/etcdserver
208-
// go.etcd.io/etcd/server/v3/etcdserver/api/v2discovery
209-
// go.etcd.io/etcd/client/v2
210-
// sigs.k8s.io/json
211-
// This dependency chain is recently added,
212-
// (in https://github.com/etcd-io/etcd/commit/b5e4c2d3c483d9c3d03a0f97ae7b07607f38a5cc)
213-
// and not actually relevant to anything used by M3 (we are on client/v3).
214-
// Therefore, replace client/v2 to avoid the bad dependency chain until we upgrade.
215-
replace go.etcd.io/etcd/client/v2 => go.etcd.io/etcd/client/v2 v2.305.0-alpha.0.0.20211029212747-6656181d312a

go.sum

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,6 +1314,7 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O
13141314
github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
13151315
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
13161316
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
1317+
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
13171318
github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk=
13181319
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
13191320
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
@@ -1558,17 +1559,15 @@ go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU=
15581559
go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4=
15591560
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
15601561
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg=
1561-
go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
15621562
go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs=
1563-
go.etcd.io/etcd/api/v3 v3.6.0-alpha.0 h1:se+XckWlVTTfwjZSsAZJ2zGPzmIMq3j7fKBCmHoB9UA=
1564-
go.etcd.io/etcd/api/v3 v3.6.0-alpha.0/go.mod h1:z13pg39zewDLZeXIKeM0xELOeFKcqjLocfwl5M820+w=
1565-
go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
1563+
go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc=
1564+
go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
15661565
go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
1567-
go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0 h1:2UyRzFWbZZzgu/xzxoRukgixvafiJtGyxO+3IKUyJ6c=
1568-
go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0/go.mod h1:Vl/FkH40bHqmBFwhr8WVKtV47neyts36zl1voccRq8s=
1569-
go.etcd.io/etcd/client/v2 v2.305.0-alpha.0.0.20211029212747-6656181d312a/go.mod h1:FJu6BdnY7u/JiFObq/nS0UPx+p2L3p1tw2kMj/UZGg0=
1570-
go.etcd.io/etcd/client/v3 v3.6.0-alpha.0 h1:hHaJ8CvTPJ9iv7xPz3G0gxt3csEqJW8evgty/kYICwo=
1571-
go.etcd.io/etcd/client/v3 v3.6.0-alpha.0/go.mod h1:a9JuChoQBDnw7WclHYBYCtTOIC12Wwj+Fw0LX4TI/Gs=
1566+
go.etcd.io/etcd/client/pkg/v3 v3.5.4 h1:lrneYvz923dvC14R54XcA7FXoZ3mlGZAgmwhfm7HqOg=
1567+
go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
1568+
go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs=
1569+
go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4=
1570+
go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
15721571
go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
15731572
go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=
15741573
go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=

0 commit comments

Comments
 (0)