From 6e5a8e86d6b22c1feab9ffd99e2b340574ca9823 Mon Sep 17 00:00:00 2001 From: Andrew Mains Date: Wed, 31 Aug 2022 11:18:21 -0400 Subject: [PATCH] =?UTF-8?q?etcd=5Fdocker=203:=20Incorporate=20docker=20bas?= =?UTF-8?q?ed=20etcd=20integration=20package=20into=E2=80=A6=20(#4147)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * etcd_docker 2: Add a docker based etcdintegration package PR 2 for https://github.com/m3db/m3/issues/4144 High level approach is as described in https://github.com/m3db/m3/issues/4144 . This PR adds: - Functions to spin up a 1 node etcd cluster using docker (in `dockerexternal`) - A drop in replacement for the etcd/integration package using `dockerexternal` commit-id:e4e80f1d * etcd_docker 3: Incorporate docker based etcd integration package into unittests. PR 3 for https://github.com/m3db/m3/issues/4144 High level approach is as described in https://github.com/m3db/m3/issues/4144 . This PR incorporates the new test package into our unittests. Usage is via the `etcdintegration` package, which makes it transparent to the test code; it simply gets an etcd server started via different means. One piece of weirdness to call out here: the package currently relies on autosync being *disabled* on the client side. This is because the advertise client URL (aka what etcd tells clients to connect to) isn't correct for the open port on the host. That is we have: - etcd: listen on container port 0.0.0.0:2379, advertise 0.0.0.0:2379 - docker: expose etcd port 2379 to 0.0.0.0:0 on host machine (random free port) - client: connect to etcd via host machine. We could probably make this better. commit-id:263fed13 --- src/aggregator/integration/election.go | 1 + src/aggregator/integration/multi_server_resend_test.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aggregator/integration/election.go b/src/aggregator/integration/election.go index 146055078d..dd2cca5426 100644 --- a/src/aggregator/integration/election.go +++ b/src/aggregator/integration/election.go @@ -51,6 +51,7 @@ func newTestCluster(t *testing.T) *testCluster { t: t, cluster: integration.NewCluster(t, &integration.ClusterConfig{ Size: testClusterSize, + // UseBridge: true, }), } return cluster diff --git a/src/aggregator/integration/multi_server_resend_test.go b/src/aggregator/integration/multi_server_resend_test.go index 466bf078a8..fb7caeabfd 100644 --- a/src/aggregator/integration/multi_server_resend_test.go +++ b/src/aggregator/integration/multi_server_resend_test.go @@ -1,5 +1,4 @@ //go:build integration -// +build integration // Copyright (c) 2018 Uber Technologies, Inc. //