Skip to content

Commit 84f240e

Browse files
authored
Revert "Migrate to dskit/ring (#4539)" (#4606)
This reverts commit f2656f8. Signed-off-by: Arve Knudsen <[email protected]>
1 parent e0807c4 commit 84f240e

File tree

88 files changed

+6724
-89
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+6724
-89
lines changed

pkg/alertmanager/alertmanager_client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import (
77
"github.com/go-kit/log"
88
"github.com/grafana/dskit/crypto/tls"
99
"github.com/grafana/dskit/grpcclient"
10-
"github.com/grafana/dskit/ring/client"
1110
"github.com/pkg/errors"
1211
"github.com/prometheus/client_golang/prometheus"
1312
"github.com/prometheus/client_golang/prometheus/promauto"
1413
"google.golang.org/grpc"
1514
"google.golang.org/grpc/health/grpc_health_v1"
1615

1716
"github.com/cortexproject/cortex/pkg/alertmanager/alertmanagerpb"
17+
"github.com/cortexproject/cortex/pkg/ring/client"
1818
)
1919

2020
// ClientsPool is the interface used to get the client from the pool for a specified address.

pkg/alertmanager/alertmanager_ring.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"github.com/go-kit/log/level"
1111
"github.com/grafana/dskit/flagext"
1212
"github.com/grafana/dskit/kv"
13-
"github.com/grafana/dskit/ring"
1413

14+
"github.com/cortexproject/cortex/pkg/ring"
1515
util_log "github.com/cortexproject/cortex/pkg/util/log"
1616
)
1717

pkg/alertmanager/alertmanager_ring_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/grafana/dskit/ring"
87
"github.com/stretchr/testify/assert"
8+
9+
"github.com/cortexproject/cortex/pkg/ring"
910
)
1011

1112
func TestIsHealthyForAlertmanagerOperations(t *testing.T) {

pkg/alertmanager/distributor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212

1313
"github.com/go-kit/log"
1414
"github.com/go-kit/log/level"
15-
"github.com/grafana/dskit/ring"
16-
"github.com/grafana/dskit/ring/client"
1715
"github.com/grafana/dskit/services"
1816
"github.com/opentracing/opentracing-go"
1917
"github.com/pkg/errors"
@@ -22,6 +20,8 @@ import (
2220
"github.com/weaveworks/common/user"
2321

2422
"github.com/cortexproject/cortex/pkg/alertmanager/merger"
23+
"github.com/cortexproject/cortex/pkg/ring"
24+
"github.com/cortexproject/cortex/pkg/ring/client"
2525
"github.com/cortexproject/cortex/pkg/tenant"
2626
"github.com/cortexproject/cortex/pkg/util"
2727
util_log "github.com/cortexproject/cortex/pkg/util/log"

pkg/alertmanager/distributor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/grafana/dskit/flagext"
1818
"github.com/grafana/dskit/kv"
1919
"github.com/grafana/dskit/kv/consul"
20-
"github.com/grafana/dskit/ring"
2120
"github.com/grafana/dskit/services"
2221
"github.com/prometheus/client_golang/prometheus"
2322
"github.com/stretchr/testify/assert"
@@ -28,6 +27,7 @@ import (
2827
"google.golang.org/grpc/health/grpc_health_v1"
2928

3029
"github.com/cortexproject/cortex/pkg/alertmanager/alertmanagerpb"
30+
"github.com/cortexproject/cortex/pkg/ring"
3131
util_log "github.com/cortexproject/cortex/pkg/util/log"
3232
"github.com/cortexproject/cortex/pkg/util/test"
3333
)

pkg/alertmanager/lifecycle.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package alertmanager
22

33
import (
4-
"github.com/grafana/dskit/ring"
4+
"github.com/cortexproject/cortex/pkg/ring"
55
)
66

77
func (r *MultitenantAlertmanager) OnRingInstanceRegister(_ *ring.BasicLifecycler, ringDesc ring.Desc, instanceExists bool, instanceID string, instanceDesc ring.InstanceDesc) (ring.InstanceState, ring.Tokens) {

pkg/alertmanager/multitenant.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import (
1818
"github.com/grafana/dskit/concurrency"
1919
"github.com/grafana/dskit/flagext"
2020
"github.com/grafana/dskit/kv"
21-
"github.com/grafana/dskit/ring"
22-
"github.com/grafana/dskit/ring/client"
2321
"github.com/grafana/dskit/services"
2422
"github.com/pkg/errors"
2523
"github.com/prometheus/alertmanager/cluster"
@@ -36,6 +34,8 @@ import (
3634
"github.com/cortexproject/cortex/pkg/alertmanager/alertmanagerpb"
3735
"github.com/cortexproject/cortex/pkg/alertmanager/alertspb"
3836
"github.com/cortexproject/cortex/pkg/alertmanager/alertstore"
37+
"github.com/cortexproject/cortex/pkg/ring"
38+
"github.com/cortexproject/cortex/pkg/ring/client"
3939
"github.com/cortexproject/cortex/pkg/tenant"
4040
"github.com/cortexproject/cortex/pkg/util"
4141
util_log "github.com/cortexproject/cortex/pkg/util/log"

pkg/alertmanager/multitenant_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/grafana/dskit/concurrency"
2424
"github.com/grafana/dskit/flagext"
2525
"github.com/grafana/dskit/kv/consul"
26-
"github.com/grafana/dskit/ring"
2726
"github.com/grafana/dskit/services"
2827
"github.com/prometheus/alertmanager/cluster/clusterpb"
2928
"github.com/prometheus/alertmanager/notify"
@@ -45,6 +44,7 @@ import (
4544
"github.com/cortexproject/cortex/pkg/alertmanager/alertspb"
4645
"github.com/cortexproject/cortex/pkg/alertmanager/alertstore"
4746
"github.com/cortexproject/cortex/pkg/alertmanager/alertstore/bucketclient"
47+
"github.com/cortexproject/cortex/pkg/ring"
4848
"github.com/cortexproject/cortex/pkg/storage/bucket"
4949
"github.com/cortexproject/cortex/pkg/util"
5050
"github.com/cortexproject/cortex/pkg/util/test"

pkg/api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/felixge/fgprof"
1313
"github.com/go-kit/log"
1414
"github.com/go-kit/log/level"
15-
"github.com/grafana/dskit/ring"
1615
"github.com/prometheus/client_golang/prometheus"
1716
"github.com/prometheus/prometheus/storage"
1817
"github.com/weaveworks/common/middleware"
@@ -31,6 +30,7 @@ import (
3130
"github.com/cortexproject/cortex/pkg/frontend/v2/frontendv2pb"
3231
"github.com/cortexproject/cortex/pkg/ingester/client"
3332
"github.com/cortexproject/cortex/pkg/querier"
33+
"github.com/cortexproject/cortex/pkg/ring"
3434
"github.com/cortexproject/cortex/pkg/ruler"
3535
"github.com/cortexproject/cortex/pkg/scheduler"
3636
"github.com/cortexproject/cortex/pkg/scheduler/schedulerpb"

pkg/compactor/compactor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/go-kit/log/level"
1818
"github.com/grafana/dskit/backoff"
1919
"github.com/grafana/dskit/flagext"
20-
"github.com/grafana/dskit/ring"
2120
"github.com/grafana/dskit/services"
2221
"github.com/pkg/errors"
2322
"github.com/prometheus/client_golang/prometheus"
@@ -29,6 +28,7 @@ import (
2928
"github.com/thanos-io/thanos/pkg/compact/downsample"
3029
"github.com/thanos-io/thanos/pkg/objstore"
3130

31+
"github.com/cortexproject/cortex/pkg/ring"
3232
"github.com/cortexproject/cortex/pkg/storage/bucket"
3333
cortex_tsdb "github.com/cortexproject/cortex/pkg/storage/tsdb"
3434
"github.com/cortexproject/cortex/pkg/storage/tsdb/bucketindex"

0 commit comments

Comments
 (0)