Skip to content

Commit d3068f9

Browse files
authored
Upgrade Prometheus, Alertmanager and Thanos (#4102)
* Upgrade Prometheus, Alertmanager and Thanos Signed-off-by: Marco Pracucci <[email protected]> * Upgraded Thanos again Signed-off-by: Marco Pracucci <[email protected]> * Upgraded Thanos again and remove go.mod replace directive Signed-off-by: Marco Pracucci <[email protected]>
1 parent 67893aa commit d3068f9

File tree

829 files changed

+28603
-10124
lines changed

Some content is hidden

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

829 files changed

+28603
-10124
lines changed

go.mod

Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ require (
4343
github.com/opentracing-contrib/go-stdlib v1.0.0
4444
github.com/opentracing/opentracing-go v1.2.0
4545
github.com/pkg/errors v0.9.1
46-
github.com/prometheus/alertmanager v0.21.1-0.20210310093010-0f9cab6991e6
46+
github.com/prometheus/alertmanager v0.21.1-0.20210422101724-8176f78a70e1
4747
github.com/prometheus/client_golang v1.10.0
4848
github.com/prometheus/client_model v0.2.0
49-
github.com/prometheus/common v0.20.0
50-
github.com/prometheus/prometheus v1.8.2-0.20210324152458-c7a62b95cea0
49+
github.com/prometheus/common v0.21.0
50+
github.com/prometheus/prometheus v1.8.2-0.20210421143221-52df5ef7a3be
5151
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
5252
github.com/sony/gobreaker v0.4.1
5353
github.com/spf13/afero v1.2.2
5454
github.com/stretchr/testify v1.7.0
55-
github.com/thanos-io/thanos v0.13.1-0.20210401085038-d7dff0c84d17
55+
github.com/thanos-io/thanos v0.19.1-0.20210423085824-268cc30e2dd8
5656
github.com/uber/jaeger-client-go v2.25.0+incompatible
5757
github.com/weaveworks/common v0.0.0-20210419092856-009d1eebd624
5858
go.etcd.io/bbolt v1.3.5
@@ -77,42 +77,8 @@ replace k8s.io/client-go => k8s.io/client-go v0.20.4
7777

7878
replace k8s.io/api => k8s.io/api v0.20.4
7979

80-
// >v1.2.0 has some conflict with prometheus/alertmanager. Hence prevent the upgrade till it's fixed.
81-
replace github.com/satori/go.uuid => github.com/satori/go.uuid v1.2.0
82-
8380
// Use fork of gocql that has gokit logs and Prometheus metrics.
8481
replace github.com/gocql/gocql => github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85
8582

8683
// Using a 3rd-party branch for custom dialer - see https://github.com/bradfitz/gomemcache/pull/86
8784
replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab
88-
89-
// Pin github.com/go-openapi versions to match Prometheus alertmanager to avoid
90-
// breaking changing affecting the alertmanager.
91-
replace github.com/go-openapi/errors => github.com/go-openapi/errors v0.19.4
92-
93-
replace github.com/go-openapi/loads => github.com/go-openapi/loads v0.19.5
94-
95-
replace github.com/go-openapi/runtime => github.com/go-openapi/runtime v0.19.15
96-
97-
replace github.com/go-openapi/spec => github.com/go-openapi/spec v0.19.8
98-
99-
replace github.com/go-openapi/strfmt => github.com/go-openapi/strfmt v0.19.5
100-
101-
replace github.com/go-openapi/swag => github.com/go-openapi/swag v0.19.9
102-
103-
replace github.com/go-openapi/validate => github.com/go-openapi/validate v0.19.8
104-
105-
// Pin these, which are updated as dependencies in Prometheus; we will take those updates separately and carefully
106-
replace (
107-
github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.37.8
108-
github.com/google/pprof => github.com/google/pprof v0.0.0-20210208152844-1612e9be7af6
109-
github.com/miekg/dns => github.com/miekg/dns v1.1.38
110-
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.9.0
111-
golang.org/x/crypto => golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9
112-
golang.org/x/net => golang.org/x/net v0.0.0-20210119194325-5f4716e94777
113-
golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20210210192628-66670185b0cd
114-
golang.org/x/sync => golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
115-
golang.org/x/sys => golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
116-
google.golang.org/api => google.golang.org/api v0.39.0
117-
google.golang.org/grpc => google.golang.org/grpc v1.34.0
118-
)

go.sum

Lines changed: 558 additions & 39 deletions
Large diffs are not rendered by default.

integration/e2ecortex/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,13 @@ func (c *Client) Series(matches []string, start, end time.Time) ([]model.LabelSe
186186

187187
// LabelValues gets label values
188188
func (c *Client) LabelValues(label string, start, end time.Time) (model.LabelValues, error) {
189-
result, _, err := c.querierClient.LabelValues(context.Background(), label, start, end)
189+
result, _, err := c.querierClient.LabelValues(context.Background(), label, nil, start, end)
190190
return result, err
191191
}
192192

193193
// LabelNames gets label names
194194
func (c *Client) LabelNames(start, end time.Time) ([]string, error) {
195-
result, _, err := c.querierClient.LabelNames(context.Background(), start, end)
195+
result, _, err := c.querierClient.LabelNames(context.Background(), nil, start, end)
196196
return result, err
197197
}
198198

pkg/compactor/compactor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ func (c *Compactor) compactUser(ctx context.Context, userID string) error {
627627
return err
628628
}
629629

630-
syncer, err := compact.NewSyncer(
630+
syncer, err := compact.NewMetaSyncer(
631631
ulogger,
632632
reg,
633633
bucket,

pkg/storegateway/bucket_stores.go

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -476,26 +476,31 @@ func (u *BucketStores) getOrCreateStore(userID string) (*store.BucketStore, erro
476476
}
477477

478478
bucketStoreReg := prometheus.NewRegistry()
479+
bucketStoreOpts := []store.BucketStoreOption{
480+
store.WithLogger(userLogger),
481+
store.WithRegistry(bucketStoreReg),
482+
store.WithIndexCache(u.indexCache),
483+
store.WithQueryGate(u.queryGate),
484+
store.WithChunkPool(u.chunksPool),
485+
}
486+
if u.logLevel.String() == "debug" {
487+
bucketStoreOpts = append(bucketStoreOpts, store.WithDebugLogging())
488+
}
489+
479490
bs, err := store.NewBucketStore(
480-
userLogger,
481-
bucketStoreReg,
482491
userBkt,
483492
fetcher,
484493
u.syncDirForUser(userID),
485-
u.indexCache,
486-
u.queryGate,
487-
u.chunksPool,
488494
newChunksLimiterFactory(u.limits, userID),
489495
store.NewSeriesLimiterFactory(0), // No series limiter.
490496
u.partitioner,
491-
u.logLevel.String() == "debug", // Turn on debug logging, if the log level is set to debug
492497
u.cfg.BucketStore.BlockSyncConcurrency,
493-
nil, // Do not limit timerange.
494498
false, // No need to enable backward compatibility with Thanos pre 0.8.0 queriers
495499
u.cfg.BucketStore.PostingOffsetsInMemSampling,
496500
true, // Enable series hints.
497501
u.cfg.BucketStore.IndexHeaderLazyLoadingEnabled,
498502
u.cfg.BucketStore.IndexHeaderLazyLoadingIdleTimeout,
503+
bucketStoreOpts...,
499504
)
500505
if err != nil {
501506
return nil, err

0 commit comments

Comments
 (0)