Skip to content

Upgrade Prometheus, Alertmanager and Thanos #4102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 4 additions & 38 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ require (
github.com/opentracing-contrib/go-stdlib v1.0.0
github.com/opentracing/opentracing-go v1.2.0
github.com/pkg/errors v0.9.1
github.com/prometheus/alertmanager v0.21.1-0.20210310093010-0f9cab6991e6
github.com/prometheus/alertmanager v0.21.1-0.20210422101724-8176f78a70e1
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.20.0
github.com/prometheus/prometheus v1.8.2-0.20210324152458-c7a62b95cea0
github.com/prometheus/common v0.21.0
github.com/prometheus/prometheus v1.8.2-0.20210421143221-52df5ef7a3be
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
github.com/sony/gobreaker v0.4.1
github.com/spf13/afero v1.2.2
github.com/stretchr/testify v1.7.0
github.com/thanos-io/thanos v0.13.1-0.20210401085038-d7dff0c84d17
github.com/thanos-io/thanos v0.19.1-0.20210423085824-268cc30e2dd8
github.com/uber/jaeger-client-go v2.25.0+incompatible
github.com/weaveworks/common v0.0.0-20210419092856-009d1eebd624
go.etcd.io/bbolt v1.3.5
Expand All @@ -77,42 +77,8 @@ replace k8s.io/client-go => k8s.io/client-go v0.20.4

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

// >v1.2.0 has some conflict with prometheus/alertmanager. Hence prevent the upgrade till it's fixed.
replace github.com/satori/go.uuid => github.com/satori/go.uuid v1.2.0

// Use fork of gocql that has gokit logs and Prometheus metrics.
replace github.com/gocql/gocql => github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85

// Using a 3rd-party branch for custom dialer - see https://github.com/bradfitz/gomemcache/pull/86
replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab

// Pin github.com/go-openapi versions to match Prometheus alertmanager to avoid
// breaking changing affecting the alertmanager.
replace github.com/go-openapi/errors => github.com/go-openapi/errors v0.19.4

replace github.com/go-openapi/loads => github.com/go-openapi/loads v0.19.5

replace github.com/go-openapi/runtime => github.com/go-openapi/runtime v0.19.15

replace github.com/go-openapi/spec => github.com/go-openapi/spec v0.19.8

replace github.com/go-openapi/strfmt => github.com/go-openapi/strfmt v0.19.5

replace github.com/go-openapi/swag => github.com/go-openapi/swag v0.19.9

replace github.com/go-openapi/validate => github.com/go-openapi/validate v0.19.8

// Pin these, which are updated as dependencies in Prometheus; we will take those updates separately and carefully
replace (
github.com/aws/aws-sdk-go => github.com/aws/aws-sdk-go v1.37.8
github.com/google/pprof => github.com/google/pprof v0.0.0-20210208152844-1612e9be7af6
github.com/miekg/dns => github.com/miekg/dns v1.1.38
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.9.0
golang.org/x/crypto => golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9
golang.org/x/net => golang.org/x/net v0.0.0-20210119194325-5f4716e94777
golang.org/x/oauth2 => golang.org/x/oauth2 v0.0.0-20210210192628-66670185b0cd
golang.org/x/sync => golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
golang.org/x/sys => golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c
google.golang.org/api => google.golang.org/api v0.39.0
google.golang.org/grpc => google.golang.org/grpc v1.34.0
)
597 changes: 558 additions & 39 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions integration/e2ecortex/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,13 @@ func (c *Client) Series(matches []string, start, end time.Time) ([]model.LabelSe

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

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

Expand Down
2 changes: 1 addition & 1 deletion pkg/compactor/compactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ func (c *Compactor) compactUser(ctx context.Context, userID string) error {
return err
}

syncer, err := compact.NewSyncer(
syncer, err := compact.NewMetaSyncer(
ulogger,
reg,
bucket,
Expand Down
19 changes: 12 additions & 7 deletions pkg/storegateway/bucket_stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,26 +476,31 @@ func (u *BucketStores) getOrCreateStore(userID string) (*store.BucketStore, erro
}

bucketStoreReg := prometheus.NewRegistry()
bucketStoreOpts := []store.BucketStoreOption{
store.WithLogger(userLogger),
store.WithRegistry(bucketStoreReg),
store.WithIndexCache(u.indexCache),
store.WithQueryGate(u.queryGate),
store.WithChunkPool(u.chunksPool),
}
if u.logLevel.String() == "debug" {
bucketStoreOpts = append(bucketStoreOpts, store.WithDebugLogging())
}

bs, err := store.NewBucketStore(
userLogger,
bucketStoreReg,
userBkt,
fetcher,
u.syncDirForUser(userID),
u.indexCache,
u.queryGate,
u.chunksPool,
newChunksLimiterFactory(u.limits, userID),
store.NewSeriesLimiterFactory(0), // No series limiter.
u.partitioner,
u.logLevel.String() == "debug", // Turn on debug logging, if the log level is set to debug
u.cfg.BucketStore.BlockSyncConcurrency,
nil, // Do not limit timerange.
false, // No need to enable backward compatibility with Thanos pre 0.8.0 queriers
u.cfg.BucketStore.PostingOffsetsInMemSampling,
true, // Enable series hints.
u.cfg.BucketStore.IndexHeaderLazyLoadingEnabled,
u.cfg.BucketStore.IndexHeaderLazyLoadingIdleTimeout,
bucketStoreOpts...,
)
if err != nil {
return nil, err
Expand Down
Loading