Skip to content

Commit 77e5a2b

Browse files
aknuds1alvinlin123
authored andcommitted
Upgrade to dskit@01ce9286d7d5 (cortexproject#4601)
Signed-off-by: Arve Knudsen <[email protected]> Signed-off-by: Alvin Lin <[email protected]>
1 parent 03b423f commit 77e5a2b

Some content is hidden

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

45 files changed

+428
-455
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
* [CHANGE] Changed default for `-ingester.min-ready-duration` from 1 minute to 15 seconds. #4539
1313
* [CHANGE] query-frontend: Do not print anything in the logs of `query-frontend` if a in-progress query has been canceled (context canceled). #4562
1414
* [CHANGE] Compactor block deletion mark migration, needed when upgrading from v1.7, is now disabled by default. #4597
15+
* [CHANGE] The `status_code` label on gRPC client metrics has changed from '200' and '500' to '2xx', '5xx', '4xx', 'cancel' or 'error'. 4601
16+
* [CHANGE] Memberlist: changed probe interval from `1s` to `5s` and probe timeout from `500ms` to `2s`. #4601
1517
* [ENHANCEMENT] Update Go version to 1.17.5. #4602 #4604
1618
* [ENHANCEMENT] Keep track of discarded samples due to relabel configuration in `cortex_discarded_samples_total`. #4503
1719
* [ENHANCEMENT] Ruler: Add `-ruler.disable-rule-group-label` to disable the `rule_group` label on exported metrics. #4571
@@ -22,9 +24,12 @@
2224
* [ENHANCEMENT] Updated Prometheus to latest. Includes changes from prometheus#9239, adding 15 new functions. Multiple TSDB bugfixes prometheus#9438 & prometheus#9381. #4524
2325
* [ENHANCEMENT] Query Frontend: Add setting `-frontend.forward-headers-list` in frontend to configure the set of headers from the requests to be forwarded to downstream requests. #4486
2426
* [ENHANCEMENT] Blocks storage: Add `-blocks-storage.azure.http.*`, `-alertmanager-storage.azure.http.*`, and `-ruler-storage.azure.http.*` to configure the Azure storage client. #4581
27+
* [ENHANCEMENT] Optimise memberlist receive path when used as a backing store for rings with a large number of members. #4601
2528
* [BUGFIX] AlertManager: remove stale template files. #4495
2629
* [BUGFIX] Distributor: fix bug in query-exemplar where some results would get dropped. #4582
2730
* [BUGFIX] Update Thanos dependency: compactor tracing support, azure blocks storage memory fix. #4585
31+
* [BUGFIX] Querier: Disable query scheduler SRV DNS lookup, which removes noisy log messages about "failed DNS SRV record lookup". #4601
32+
* [BUGFIX] Memberlist: fixed corrupted packets when sending compound messages with more than 255 messages or messages bigger than 64KB. #4601
2833

2934
## 1.11.0 2021-11-25
3035

@@ -123,7 +128,6 @@
123128
* [BUGFIX] Update go-kit package to fix spurious log messages #4544
124129
>>>>>>> Merge release 1.11 to master (#4569)
125130
126-
127131
## 1.10.0 / 2021-08-03
128132

129133
* [CHANGE] Prevent path traversal attack from users able to control the HTTP header `X-Scope-OrgID`. #4375 (CVE-2021-36157)

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ require (
2929
github.com/golang/protobuf v1.5.2
3030
github.com/golang/snappy v0.0.4
3131
github.com/gorilla/mux v1.8.0
32-
github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1
32+
github.com/grafana/dskit v0.0.0-20220105080720-01ce9286d7d5
3333
github.com/json-iterator/go v1.1.12
3434
github.com/lib/pq v1.3.0
3535
github.com/minio/minio-go/v7 v7.0.10

go.sum

+2-1
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,9 @@ github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB7
860860
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
861861
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
862862
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
863-
github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1 h1:Qf+/W3Tup0nO21tgJmO14WJK0yyrm4L2UJipZP+Zoow=
864863
github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1/go.mod h1:uPG2nyK4CtgNDmWv7qyzYcdI+S90kHHRWvHnBtEMBXM=
864+
github.com/grafana/dskit v0.0.0-20220105080720-01ce9286d7d5 h1:IXo/V2+KKLYLD724qh3uRaZgAy3BV3HdtXuSs7lb3jU=
865+
github.com/grafana/dskit v0.0.0-20220105080720-01ce9286d7d5/go.mod h1:M0/dlftwBvH7+hdNNpjMa/CUXD7gsew67mbkCuDlFXE=
865866
github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85 h1:xLuzPoOzdfNb/RF/IENCw+oLVdZB4G21VPhkHBgwSHY=
866867
github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85/go.mod h1:crI9WX6p0IhrqB+DqIUHulRW853PaNFf7o4UprV//3I=
867868
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=

pkg/compactor/compactor.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ import (
3737
)
3838

3939
const (
40+
// ringKey is the key under which we store the compactors ring in the KVStore.
41+
ringKey = "compactor"
42+
4043
blocksMarkedForDeletionName = "cortex_compactor_blocks_marked_for_deletion_total"
4144
blocksMarkedForDeletionHelp = "Total number of blocks marked for deletion in compactor."
4245
)
@@ -408,12 +411,12 @@ func (c *Compactor) starting(ctx context.Context) error {
408411
// Initialize the compactors ring if sharding is enabled.
409412
if c.compactorCfg.ShardingEnabled {
410413
lifecyclerCfg := c.compactorCfg.ShardingRing.ToLifecyclerConfig()
411-
c.ringLifecycler, err = ring.NewLifecycler(lifecyclerCfg, ring.NewNoopFlushTransferer(), "compactor", ring.CompactorRingKey, false, c.logger, prometheus.WrapRegistererWithPrefix("cortex_", c.registerer))
414+
c.ringLifecycler, err = ring.NewLifecycler(lifecyclerCfg, ring.NewNoopFlushTransferer(), "compactor", ringKey, false, c.logger, prometheus.WrapRegistererWithPrefix("cortex_", c.registerer))
412415
if err != nil {
413416
return errors.Wrap(err, "unable to initialize compactor ring lifecycler")
414417
}
415418

416-
c.ring, err = ring.New(lifecyclerCfg.RingConfig, "compactor", ring.CompactorRingKey, c.logger, prometheus.WrapRegistererWithPrefix("cortex_", c.registerer))
419+
c.ring, err = ring.New(lifecyclerCfg.RingConfig, "compactor", ringKey, c.logger, prometheus.WrapRegistererWithPrefix("cortex_", c.registerer))
417420
if err != nil {
418421
return errors.Wrap(err, "unable to initialize compactor ring")
419422
}

pkg/compactor/compactor_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,7 @@ func removeIgnoredLogs(input []string) []string {
10861086
`level=debug component=compactor msg="unregistering instance from ring" ring=compactor`: {},
10871087
`level=info component=compactor msg="instance removed from the KV store" ring=compactor`: {},
10881088
`level=info component=compactor msg="observing tokens before going ACTIVE" ring=compactor`: {},
1089+
`level=info component=compactor msg="lifecycler entering final sleep before shutdown" final_sleep=0s`: {},
10891090
}
10901091

10911092
out := make([]string, 0, len(input))

pkg/cortex/modules.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (t *Cortex) initServer() (services.Service, error) {
137137

138138
func (t *Cortex) initRing() (serv services.Service, err error) {
139139
t.Cfg.Ingester.LifecyclerConfig.RingConfig.KVStore.Multi.ConfigProvider = multiClientRuntimeConfigChannel(t.RuntimeConfig)
140-
t.Ring, err = ring.New(t.Cfg.Ingester.LifecyclerConfig.RingConfig, "ingester", ring.IngesterRingKey, util_log.Logger, prometheus.WrapRegistererWithPrefix("cortex_", prometheus.DefaultRegisterer))
140+
t.Ring, err = ring.New(t.Cfg.Ingester.LifecyclerConfig.RingConfig, "ingester", ingester.RingKey, util_log.Logger, prometheus.WrapRegistererWithPrefix("cortex_", prometheus.DefaultRegisterer))
141141
if err != nil {
142142
return nil, err
143143
}

pkg/distributor/distributor.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ var (
5454
)
5555

5656
const (
57+
// ringKey is the key under which we store the distributors ring in the KVStore.
58+
ringKey = "distributor"
59+
5760
typeSamples = "samples"
5861
typeMetadata = "metadata"
5962

@@ -211,12 +214,12 @@ func New(cfg Config, clientConfig ingester_client.Config, limits *validation.Ove
211214
if !canJoinDistributorsRing {
212215
ingestionRateStrategy = newInfiniteIngestionRateStrategy()
213216
} else if limits.IngestionRateStrategy() == validation.GlobalIngestionRateStrategy {
214-
distributorsLifeCycler, err = ring.NewLifecycler(cfg.DistributorRing.ToLifecyclerConfig(), nil, "distributor", ring.DistributorRingKey, true, log, prometheus.WrapRegistererWithPrefix("cortex_", reg))
217+
distributorsLifeCycler, err = ring.NewLifecycler(cfg.DistributorRing.ToLifecyclerConfig(), nil, "distributor", ringKey, true, log, prometheus.WrapRegistererWithPrefix("cortex_", reg))
215218
if err != nil {
216219
return nil, err
217220
}
218221

219-
distributorsRing, err = ring.New(cfg.DistributorRing.ToRingConfig(), "distributor", ring.DistributorRingKey, log, prometheus.WrapRegistererWithPrefix("cortex_", reg))
222+
distributorsRing, err = ring.New(cfg.DistributorRing.ToRingConfig(), "distributor", ringKey, log, prometheus.WrapRegistererWithPrefix("cortex_", reg))
220223
if err != nil {
221224
return nil, errors.Wrap(err, "failed to initialize distributors' ring client")
222225
}

pkg/distributor/distributor_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636

3737
"github.com/cortexproject/cortex/pkg/chunk/encoding"
3838
"github.com/cortexproject/cortex/pkg/cortexpb"
39+
"github.com/cortexproject/cortex/pkg/ingester"
3940
"github.com/cortexproject/cortex/pkg/ingester/client"
4041
"github.com/cortexproject/cortex/pkg/prom1/storage/metric"
4142
"github.com/cortexproject/cortex/pkg/tenant"
@@ -1626,7 +1627,7 @@ func BenchmarkDistributor_Push(b *testing.B) {
16261627
kvStore, closer := consul.NewInMemoryClient(ring.GetCodec(), log.NewNopLogger(), nil)
16271628
b.Cleanup(func() { assert.NoError(b, closer.Close()) })
16281629

1629-
err := kvStore.CAS(context.Background(), ring.IngesterRingKey,
1630+
err := kvStore.CAS(context.Background(), ingester.RingKey,
16301631
func(_ interface{}) (interface{}, bool, error) {
16311632
d := &ring.Desc{}
16321633
d.AddIngester("ingester-1", "127.0.0.1", "", ring.GenerateTokens(128, nil), ring.ACTIVE, time.Now())
@@ -1639,7 +1640,7 @@ func BenchmarkDistributor_Push(b *testing.B) {
16391640
KVStore: kv.Config{Mock: kvStore},
16401641
HeartbeatTimeout: 60 * time.Minute,
16411642
ReplicationFactor: 1,
1642-
}, ring.IngesterRingKey, ring.IngesterRingKey, nil, nil)
1643+
}, ingester.RingKey, ingester.RingKey, nil, nil)
16431644
require.NoError(b, err)
16441645
require.NoError(b, services.StartAndAwaitRunning(context.Background(), ingestersRing))
16451646
b.Cleanup(func() {
@@ -1983,7 +1984,7 @@ func prepare(t *testing.T, cfg prepConfig) ([]*Distributor, []mockIngester, []*p
19831984
kvStore, closer := consul.NewInMemoryClient(ring.GetCodec(), log.NewNopLogger(), nil)
19841985
t.Cleanup(func() { assert.NoError(t, closer.Close()) })
19851986

1986-
err := kvStore.CAS(context.Background(), ring.IngesterRingKey,
1987+
err := kvStore.CAS(context.Background(), ingester.RingKey,
19871988
func(_ interface{}) (interface{}, bool, error) {
19881989
return &ring.Desc{
19891990
Ingesters: ingesterDescs,
@@ -2004,7 +2005,7 @@ func prepare(t *testing.T, cfg prepConfig) ([]*Distributor, []mockIngester, []*p
20042005
},
20052006
HeartbeatTimeout: 60 * time.Minute,
20062007
ReplicationFactor: rf,
2007-
}, ring.IngesterRingKey, ring.IngesterRingKey, nil, nil)
2008+
}, ingester.RingKey, ingester.RingKey, nil, nil)
20082009
require.NoError(t, err)
20092010
require.NoError(t, services.StartAndAwaitRunning(context.Background(), ingestersRing))
20102011

pkg/ingester/ingester.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func New(cfg Config, clientConfig client.Config, limits *validation.Overrides, c
267267
// During WAL recovery, it will create new user states which requires the limiter.
268268
// Hence initialise the limiter before creating the WAL.
269269
// The '!cfg.WALConfig.WALEnabled' argument says don't flush on shutdown if the WAL is enabled.
270-
i.lifecycler, err = ring.NewLifecycler(cfg.LifecyclerConfig, i, "ingester", ring.IngesterRingKey, !cfg.WALConfig.WALEnabled || cfg.WALConfig.FlushOnShutdown, logger, prometheus.WrapRegistererWithPrefix("cortex_", registerer))
270+
i.lifecycler, err = ring.NewLifecycler(cfg.LifecyclerConfig, i, "ingester", RingKey, !cfg.WALConfig.WALEnabled || cfg.WALConfig.FlushOnShutdown, logger, prometheus.WrapRegistererWithPrefix("cortex_", registerer))
271271
if err != nil {
272272
return nil, err
273273
}

pkg/ingester/ingester_v2.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ import (
4747
"github.com/cortexproject/cortex/pkg/util/validation"
4848
)
4949

50+
const (
51+
// RingKey is the key under which we store the ingesters ring in the KVStore.
52+
RingKey = "ring"
53+
)
54+
5055
const (
5156
errTSDBCreateIncompatibleState = "cannot create a new TSDB while the ingester is not in active state (current state: %s)"
5257
errTSDBIngest = "err: %v. timestamp=%s, series=%s" // Using error.Wrap puts the message before the error and if the series is too long, its truncated.
@@ -511,7 +516,7 @@ func NewV2(cfg Config, clientConfig client.Config, limits *validation.Overrides,
511516
}, i.getOldestUnshippedBlockMetric)
512517
}
513518

514-
i.lifecycler, err = ring.NewLifecycler(cfg.LifecyclerConfig, i, "ingester", ring.IngesterRingKey, cfg.BlocksStorageConfig.TSDB.FlushBlocksOnShutdown, logger, prometheus.WrapRegistererWithPrefix("cortex_", registerer))
519+
i.lifecycler, err = ring.NewLifecycler(cfg.LifecyclerConfig, i, "ingester", RingKey, cfg.BlocksStorageConfig.TSDB.FlushBlocksOnShutdown, logger, prometheus.WrapRegistererWithPrefix("cortex_", registerer))
515520
if err != nil {
516521
return nil, err
517522
}

pkg/ingester/lifecycle_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func TestIngesterRestart(t *testing.T) {
8383
}
8484

8585
test.Poll(t, 100*time.Millisecond, 1, func() interface{} {
86-
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", ring.IngesterRingKey)
86+
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", RingKey)
8787
})
8888

8989
{
@@ -96,7 +96,7 @@ func TestIngesterRestart(t *testing.T) {
9696
time.Sleep(200 * time.Millisecond)
9797

9898
test.Poll(t, 100*time.Millisecond, 1, func() interface{} {
99-
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", ring.IngesterRingKey)
99+
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", RingKey)
100100
})
101101
}
102102

@@ -111,7 +111,7 @@ func TestIngester_ShutdownHandler(t *testing.T) {
111111

112112
// Make sure the ingester has been added to the ring.
113113
test.Poll(t, 100*time.Millisecond, 1, func() interface{} {
114-
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", ring.IngesterRingKey)
114+
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", RingKey)
115115
})
116116

117117
recorder := httptest.NewRecorder()
@@ -120,7 +120,7 @@ func TestIngester_ShutdownHandler(t *testing.T) {
120120

121121
// Make sure the ingester has been removed from the ring even when UnregisterFromRing is false.
122122
test.Poll(t, 100*time.Millisecond, 0, func() interface{} {
123-
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", ring.IngesterRingKey)
123+
return numTokens(config.LifecyclerConfig.RingConfig.KVStore.Mock, "localhost", RingKey)
124124
})
125125
})
126126
}
@@ -341,7 +341,7 @@ func TestIngesterFlush(t *testing.T) {
341341
// the ring, the data is in the chunk store.
342342
require.NoError(t, services.StopAndAwaitTerminated(context.Background(), ing.lifecycler))
343343
test.Poll(t, 200*time.Millisecond, 0, func() interface{} {
344-
r, err := ing.lifecycler.KVStore.Get(context.Background(), ring.IngesterRingKey)
344+
r, err := ing.lifecycler.KVStore.Get(context.Background(), RingKey)
345345
if err != nil {
346346
return -1
347347
}

pkg/ruler/lifecycle_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestRulerShutdown(t *testing.T) {
3939

4040
// Wait until the tokens are registered in the ring
4141
test.Poll(t, 100*time.Millisecond, config.Ring.NumTokens, func() interface{} {
42-
return numTokens(ringStore, "localhost", ring.RulerRingKey)
42+
return numTokens(ringStore, "localhost", ringKey)
4343
})
4444

4545
require.Equal(t, ring.ACTIVE, r.lifecycler.GetState())
@@ -48,7 +48,7 @@ func TestRulerShutdown(t *testing.T) {
4848

4949
// Wait until the tokens are unregistered from the ring
5050
test.Poll(t, 100*time.Millisecond, 0, func() interface{} {
51-
return numTokens(ringStore, "localhost", ring.RulerRingKey)
51+
return numTokens(ringStore, "localhost", ringKey)
5252
})
5353
}
5454

@@ -75,7 +75,7 @@ func TestRuler_RingLifecyclerShouldAutoForgetUnhealthyInstances(t *testing.T) {
7575
defer services.StopAndAwaitTerminated(ctx, r) //nolint:errcheck
7676

7777
// Add an unhealthy instance to the ring.
78-
require.NoError(t, ringStore.CAS(ctx, ring.RulerRingKey, func(in interface{}) (interface{}, bool, error) {
78+
require.NoError(t, ringStore.CAS(ctx, ringKey, func(in interface{}) (interface{}, bool, error) {
7979
ringDesc := ring.GetOrCreateRingDesc(in)
8080

8181
instance := ringDesc.AddIngester(unhealthyInstanceID, "1.1.1.1", "", generateSortedTokens(config.Ring.NumTokens), ring.ACTIVE, time.Now())
@@ -87,7 +87,7 @@ func TestRuler_RingLifecyclerShouldAutoForgetUnhealthyInstances(t *testing.T) {
8787

8888
// Ensure the unhealthy instance is removed from the ring.
8989
test.Poll(t, time.Second*5, false, func() interface{} {
90-
d, err := ringStore.Get(ctx, ring.RulerRingKey)
90+
d, err := ringStore.Get(ctx, ringKey)
9191
if err != nil {
9292
return err
9393
}

pkg/ruler/ruler.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ var (
4848
)
4949

5050
const (
51+
// ringKey is the key under which we store the rulers ring in the KVStore.
52+
ringKey = "ring"
53+
5154
// Number of concurrent group list and group loads operations.
5255
loadRulesConcurrency = 10
5356
fetchRulesConcurrency = 16
@@ -316,12 +319,12 @@ func enableSharding(r *Ruler, ringStore kv.Client) error {
316319
delegate = ring.NewAutoForgetDelegate(r.cfg.Ring.HeartbeatTimeout*ringAutoForgetUnhealthyPeriods, delegate, r.logger)
317320

318321
rulerRingName := "ruler"
319-
r.lifecycler, err = ring.NewBasicLifecycler(lifecyclerCfg, rulerRingName, ring.RulerRingKey, ringStore, delegate, r.logger, prometheus.WrapRegistererWithPrefix("cortex_", r.registry))
322+
r.lifecycler, err = ring.NewBasicLifecycler(lifecyclerCfg, rulerRingName, ringKey, ringStore, delegate, r.logger, prometheus.WrapRegistererWithPrefix("cortex_", r.registry))
320323
if err != nil {
321324
return errors.Wrap(err, "failed to initialize ruler's lifecycler")
322325
}
323326

324-
r.ring, err = ring.NewWithStoreClientAndStrategy(r.cfg.Ring.ToRingConfig(), rulerRingName, ring.RulerRingKey, ringStore, ring.NewIgnoreUnhealthyInstancesReplicationStrategy(), prometheus.WrapRegistererWithPrefix("cortex_", r.registry), r.logger)
327+
r.ring, err = ring.NewWithStoreClientAndStrategy(r.cfg.Ring.ToRingConfig(), rulerRingName, ringKey, ringStore, ring.NewIgnoreUnhealthyInstancesReplicationStrategy(), prometheus.WrapRegistererWithPrefix("cortex_", r.registry), r.logger)
325328
if err != nil {
326329
return errors.Wrap(err, "failed to initialize ruler's ring")
327330
}

pkg/ruler/ruler_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ func TestGetRules(t *testing.T) {
436436
}
437437

438438
if tc.sharding {
439-
err := kvStore.CAS(context.Background(), ring.RulerRingKey, func(in interface{}) (out interface{}, retry bool, err error) {
439+
err := kvStore.CAS(context.Background(), ringKey, func(in interface{}) (out interface{}, retry bool, err error) {
440440
d, _ := in.(*ring.Desc)
441441
if d == nil {
442442
d = ring.NewDesc()
@@ -946,7 +946,7 @@ func TestSharding(t *testing.T) {
946946
}
947947

948948
if tc.setupRing != nil {
949-
err := kvStore.CAS(context.Background(), ring.RulerRingKey, func(in interface{}) (out interface{}, retry bool, err error) {
949+
err := kvStore.CAS(context.Background(), ringKey, func(in interface{}) (out interface{}, retry bool, err error) {
950950
d, _ := in.(*ring.Desc)
951951
if d == nil {
952952
d = ring.NewDesc()

pkg/util/dns_watcher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func NewDNSWatcher(address string, dnsLookupPeriod time.Duration, notifications
3333
return nil, err
3434
}
3535

36-
watcher, err := resolver.Resolve(address)
36+
watcher, err := resolver.Resolve(address, "")
3737
if err != nil {
3838
return nil, err
3939
}

vendor/github.com/grafana/dskit/closer/closer.go

-9
This file was deleted.

vendor/github.com/grafana/dskit/concurrency/runner.go

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/grafana/dskit/crypto/tls/tls.go

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/grafana/dskit/flagext/day.go

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)