From 9ed4f3e5f209b6c1752bbdbc8a2cfa78a579eeee Mon Sep 17 00:00:00 2001 From: Andrew Mains Date: Fri, 2 Sep 2022 13:47:12 -0400 Subject: [PATCH] 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 https://github.com/m3db/m3/pull/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 https://github.com/m3db/m3/issues/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 --- go.mod | 38 ++++++++++++++++---------------------- go.sum | 17 ++++++++--------- 2 files changed, 24 insertions(+), 31 deletions(-) diff --git a/go.mod b/go.mod index b628a4a759..10bdbbbbad 100644 --- a/go.mod +++ b/go.mod @@ -59,16 +59,26 @@ require ( github.com/uber/tchannel-go v1.31.1-0.20220504180658-be708aa1a97d github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a github.com/willf/bitset v1.1.11 - // etcd is currently on an alpha version to accomodate a GRPC version upgrade. See - // https://github.com/m3db/m3/issues/4090 for the followup task to move back to a stable version. - // Gory details (why we're doing this): + // Quick note about this etcd version: this version is compatible with our GRPC version (>= 1.41.x) if and only if + // the etcd/embed and etcd/testing/v3/frameworks/integration packages are *not* used. See + // https://github.com/m3db/m3/issues/4144 for a description of the problem. + // As of this writing, we have replaced all usages of those packages with a docker based solution, which eliminates + // the issue. However, if you're seeing conflicts with GRPC and/or otel packages coming from etcd, you may have + // pulled in one of the packages by mistake. + // Use github.com/m3db/m3/src/integration/resources/docker/dockerexternal/etcdintegration + // instead for tests. Don't depend on the `embed` package at all. + // + // Gory details (why the issues occur): // // - We import etcd/server/v3 via etcd/embed and etcd/testing/v3/frameworks/integration. // - etcd/server/v3 in 3.5.2 depends on pre 1.0 opentelemetry. Bleeding edge etcd depends on 1.0 opentelemetry // - M3 depends on 1.0 opentelemetry — this conflicts with etcd 3.5.2, but not bleeding edge etcd - go.etcd.io/etcd/api/v3 v3.6.0-alpha.0 - go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0 - go.etcd.io/etcd/client/v3 v3.6.0-alpha.0 + // + // Later versions of etcd (>= 3.5.5, >= 3.6.0-alpha.0) have fixed the dependency conflicts, but it is still + // probably better to only depend on the client packages here. + go.etcd.io/etcd/api/v3 v3.5.4 + go.etcd.io/etcd/client/pkg/v3 v3.5.4 + go.etcd.io/etcd/client/v3 v3.5.4 go.opentelemetry.io/collector v0.45.0 go.opentelemetry.io/otel v1.4.1 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 replace github.com/uber-go/atomic => github.com/uber-go/atomic v1.4.0 replace google.golang.org/grpc => google.golang.org/grpc v1.40.1 - -// TODO: this can be removed once M3 is on Go 1.17.x -// This is here because of a dependency chain that makes client/v2 hard dependent on Go 1.17. Specifically: -//~ /Code/m3 $ go mod why sigs.k8s.io/json -// # sigs.k8s.io/json -// github.com/m3db/m3/src/aggregator/integration -// go.etcd.io/etcd/tests/v3/framework/integration -// go.etcd.io/etcd/server/v3/etcdserver -// go.etcd.io/etcd/server/v3/etcdserver/api/v2discovery -// go.etcd.io/etcd/client/v2 -// sigs.k8s.io/json -// This dependency chain is recently added, -// (in https://github.com/etcd-io/etcd/commit/b5e4c2d3c483d9c3d03a0f97ae7b07607f38a5cc) -// and not actually relevant to anything used by M3 (we are on client/v3). -// Therefore, replace client/v2 to avoid the bad dependency chain until we upgrade. -replace go.etcd.io/etcd/client/v2 => go.etcd.io/etcd/client/v2 v2.305.0-alpha.0.0.20211029212747-6656181d312a diff --git a/go.sum b/go.sum index f58b617d05..97ea520ea4 100644 --- a/go.sum +++ b/go.sum @@ -1314,6 +1314,7 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.5.1/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= 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= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.6.0-alpha.0 h1:se+XckWlVTTfwjZSsAZJ2zGPzmIMq3j7fKBCmHoB9UA= -go.etcd.io/etcd/api/v3 v3.6.0-alpha.0/go.mod h1:z13pg39zewDLZeXIKeM0xELOeFKcqjLocfwl5M820+w= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0 h1:2UyRzFWbZZzgu/xzxoRukgixvafiJtGyxO+3IKUyJ6c= -go.etcd.io/etcd/client/pkg/v3 v3.6.0-alpha.0/go.mod h1:Vl/FkH40bHqmBFwhr8WVKtV47neyts36zl1voccRq8s= -go.etcd.io/etcd/client/v2 v2.305.0-alpha.0.0.20211029212747-6656181d312a/go.mod h1:FJu6BdnY7u/JiFObq/nS0UPx+p2L3p1tw2kMj/UZGg0= -go.etcd.io/etcd/client/v3 v3.6.0-alpha.0 h1:hHaJ8CvTPJ9iv7xPz3G0gxt3csEqJW8evgty/kYICwo= -go.etcd.io/etcd/client/v3 v3.6.0-alpha.0/go.mod h1:a9JuChoQBDnw7WclHYBYCtTOIC12Wwj+Fw0LX4TI/Gs= +go.etcd.io/etcd/client/pkg/v3 v3.5.4 h1:lrneYvz923dvC14R54XcA7FXoZ3mlGZAgmwhfm7HqOg= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM=