Skip to content

Commit 4e9fc3a

Browse files
authored
Update Thanos and Prometheus (#4560)
* Update Thanos and Prometheus Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Fix imports. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Fix imports. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Fix compactor tests. Planning no longer runs if there is only single block in a group, so we added more blocks. Signed-off-by: Peter Štibraný <pstibrany@gmail.com> * Fix ruler tests. Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
1 parent ca39b4c commit 4e9fc3a

File tree

944 files changed

+283936
-6983
lines changed

Some content is hidden

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

944 files changed

+283936
-6983
lines changed

go.mod

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ require (
99
github.com/Azure/azure-storage-blob-go v0.13.0
1010
github.com/Masterminds/squirrel v0.0.0-20161115235646-20f192218cf5
1111
github.com/NYTimes/gziphandler v1.1.1
12-
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922
12+
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a
1313
github.com/alicebob/miniredis/v2 v2.14.3
14-
github.com/aws/aws-sdk-go v1.40.45
14+
github.com/aws/aws-sdk-go v1.42.8
1515
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
1616
github.com/cespare/xxhash v1.1.0
1717
github.com/dustin/go-humanize v1.0.0
@@ -20,7 +20,7 @@ require (
2020
github.com/fsouza/fake-gcs-server v1.7.0
2121
github.com/go-kit/kit v0.12.0 // indirect
2222
github.com/go-kit/log v0.2.0
23-
github.com/go-openapi/strfmt v0.20.2
23+
github.com/go-openapi/strfmt v0.21.0
2424
github.com/go-openapi/swag v0.19.15
2525
github.com/go-redis/redis/v8 v8.11.4
2626
github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7
@@ -32,6 +32,8 @@ require (
3232
github.com/gorilla/mux v1.8.0
3333
github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1
3434
github.com/json-iterator/go v1.1.12
35+
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
36+
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
3537
github.com/lib/pq v1.3.0
3638
github.com/minio/minio-go/v7 v7.0.10
3739
github.com/mitchellh/go-wordwrap v1.0.0
@@ -44,21 +46,21 @@ require (
4446
github.com/prometheus/alertmanager v0.23.1-0.20210914172521-e35efbddb66a
4547
github.com/prometheus/client_golang v1.11.0
4648
github.com/prometheus/client_model v0.2.0
47-
github.com/prometheus/common v0.31.1
48-
github.com/prometheus/prometheus v1.8.2-0.20211011171444-354d8d2ecfac
49+
github.com/prometheus/common v0.32.1
50+
github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7
4951
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
5052
github.com/sony/gobreaker v0.4.1
51-
github.com/spf13/afero v1.3.4
53+
github.com/spf13/afero v1.6.0
5254
github.com/stretchr/testify v1.7.0
5355
github.com/thanos-io/thanos v0.22.0
5456
github.com/uber/jaeger-client-go v2.29.1+incompatible
5557
github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78
5658
go.etcd.io/bbolt v1.3.6
5759
go.uber.org/atomic v1.9.0
58-
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf
60+
golang.org/x/net v0.0.0-20211020060615-d418f374d309
5961
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
6062
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
61-
google.golang.org/api v0.56.0
63+
google.golang.org/api v0.60.0
6264
google.golang.org/grpc v1.40.0
6365
gopkg.in/yaml.v2 v2.4.0
6466
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
@@ -85,7 +87,7 @@ replace google.golang.org/grpc => google.golang.org/grpc v1.38.0
8587
// currently fails because Thanos isn't merging release branches to main branch, and Go modules system is then
8688
// confused about which version is the latest one. v0.22.0 was released in July, but latest tag reachable from main
8789
// is v0.19.1. We pin version from late september here. Feel free to remove when updating to later version.
88-
replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20210923155558-c15594a03c45
90+
replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211122085937-de0e3848ff60
8991

9092
// Pin aws-sdk to version prior to go-kit update, to reduce the bulk of change.
9193
// Un-pin once Cortex 1.11 is released.

go.sum

Lines changed: 131 additions & 464 deletions
Large diffs are not rendered by default.

integration/alertmanager_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build requires_docker
12
// +build requires_docker
23

34
package integration
@@ -14,7 +15,7 @@ import (
1415
amlabels "github.com/prometheus/alertmanager/pkg/labels"
1516
"github.com/prometheus/alertmanager/types"
1617
"github.com/prometheus/common/model"
17-
"github.com/prometheus/prometheus/pkg/labels"
18+
"github.com/prometheus/prometheus/model/labels"
1819
"github.com/stretchr/testify/assert"
1920
"github.com/stretchr/testify/require"
2021

integration/e2e/metrics_options.go

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

33
import (
44
io_prometheus_client "github.com/prometheus/client_model/go"
5-
"github.com/prometheus/prometheus/pkg/labels"
5+
"github.com/prometheus/prometheus/model/labels"
66
)
77

88
var (

integration/e2e/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"time"
1414

1515
"github.com/prometheus/common/model"
16-
"github.com/prometheus/prometheus/pkg/labels"
16+
"github.com/prometheus/prometheus/model/labels"
1717
"github.com/prometheus/prometheus/prompb"
1818
)
1919

integration/e2ecortex/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
promapi "github.com/prometheus/client_golang/api"
2121
promv1 "github.com/prometheus/client_golang/api/prometheus/v1"
2222
"github.com/prometheus/common/model"
23-
"github.com/prometheus/prometheus/pkg/rulefmt"
23+
"github.com/prometheus/prometheus/model/rulefmt"
2424
"github.com/prometheus/prometheus/prompb"
2525
yaml "gopkg.in/yaml.v3"
2626

integration/getting_started_with_gossiped_ring_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"time"
99

1010
"github.com/prometheus/common/model"
11-
"github.com/prometheus/prometheus/pkg/labels"
11+
"github.com/prometheus/prometheus/model/labels"
1212
"github.com/stretchr/testify/assert"
1313
"github.com/stretchr/testify/require"
1414

integration/ingester_limits_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"testing"
1010
"time"
1111

12-
"github.com/prometheus/prometheus/pkg/labels"
12+
"github.com/prometheus/prometheus/model/labels"
1313
"github.com/prometheus/prometheus/prompb"
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"

integration/ingester_sharding_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
"github.com/prometheus/common/model"
12-
"github.com/prometheus/prometheus/pkg/labels"
12+
"github.com/prometheus/prometheus/model/labels"
1313
"github.com/stretchr/testify/assert"
1414
"github.com/stretchr/testify/require"
1515

integration/querier_remote_read_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
"github.com/gogo/protobuf/proto"
1414
"github.com/golang/snappy"
15-
"github.com/prometheus/prometheus/pkg/labels"
15+
"github.com/prometheus/prometheus/model/labels"
1616
"github.com/prometheus/prometheus/prompb"
1717
"github.com/prometheus/prometheus/storage"
1818
"github.com/prometheus/prometheus/storage/remote"

integration/querier_streaming_mixed_ingester_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"time"
1212

1313
"github.com/prometheus/common/model"
14-
"github.com/prometheus/prometheus/pkg/labels"
14+
"github.com/prometheus/prometheus/model/labels"
1515
"github.com/stretchr/testify/require"
1616
"github.com/weaveworks/common/user"
1717

integration/querier_tenant_federation_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
"github.com/prometheus/common/model"
12-
"github.com/prometheus/prometheus/pkg/labels"
12+
"github.com/prometheus/prometheus/model/labels"
1313
"github.com/prometheus/prometheus/prompb"
1414
"github.com/stretchr/testify/assert"
1515
"github.com/stretchr/testify/require"

integration/querier_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
"github.com/prometheus/common/model"
13-
"github.com/prometheus/prometheus/pkg/labels"
13+
"github.com/prometheus/prometheus/model/labels"
1414
"github.com/prometheus/prometheus/prompb"
1515
"github.com/stretchr/testify/assert"
1616
"github.com/stretchr/testify/require"

integration/query_frontend_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"time"
1515

1616
"github.com/prometheus/common/model"
17-
"github.com/prometheus/prometheus/pkg/labels"
17+
"github.com/prometheus/prometheus/model/labels"
1818
"github.com/prometheus/prometheus/prompb"
1919
"github.com/stretchr/testify/assert"
2020
"github.com/stretchr/testify/require"

integration/ruler_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build requires_docker
12
// +build requires_docker
23

34
package integration
@@ -17,9 +18,9 @@ import (
1718
"time"
1819

1920
"github.com/prometheus/common/model"
20-
"github.com/prometheus/prometheus/pkg/labels"
21-
"github.com/prometheus/prometheus/pkg/rulefmt"
22-
"github.com/prometheus/prometheus/pkg/value"
21+
"github.com/prometheus/prometheus/model/labels"
22+
"github.com/prometheus/prometheus/model/rulefmt"
23+
"github.com/prometheus/prometheus/model/value"
2324
"github.com/prometheus/prometheus/prompb"
2425
"github.com/stretchr/testify/assert"
2526
"github.com/stretchr/testify/require"

integration/zone_aware_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build requires_docker
12
// +build requires_docker
23

34
package integration
@@ -10,7 +11,7 @@ import (
1011

1112
"github.com/pkg/errors"
1213
"github.com/prometheus/common/model"
13-
"github.com/prometheus/prometheus/pkg/labels"
14+
"github.com/prometheus/prometheus/model/labels"
1415
"github.com/stretchr/testify/assert"
1516
"github.com/stretchr/testify/require"
1617

pkg/api/handlers.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ func NewQuerierHandler(
209209
logger,
210210
func(context.Context) v1.RulesRetriever { return &querier.DummyRulesRetriever{} },
211211
0, 0, 0, // Remote read samples and concurrency limit.
212+
false,
212213
regexp.MustCompile(".*"),
213214
func() (v1.RuntimeInfo, error) { return v1.RuntimeInfo{}, errors.New("not implemented") },
214215
&v1.PrometheusVersion{},

pkg/chunk/cache/cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
"github.com/go-kit/log"
1212
"github.com/prometheus/common/model"
13-
"github.com/prometheus/prometheus/pkg/labels"
13+
"github.com/prometheus/prometheus/model/labels"
1414
"github.com/stretchr/testify/require"
1515

1616
"github.com/cortexproject/cortex/pkg/chunk"

pkg/chunk/chunk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
jsoniter "github.com/json-iterator/go"
1414
"github.com/pkg/errors"
1515
"github.com/prometheus/common/model"
16-
"github.com/prometheus/prometheus/pkg/labels"
16+
"github.com/prometheus/prometheus/model/labels"
1717
errs "github.com/weaveworks/common/errors"
1818

1919
prom_chunk "github.com/cortexproject/cortex/pkg/chunk/encoding"

pkg/chunk/chunk_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/prometheus/client_golang/prometheus"
1515
"github.com/prometheus/client_golang/prometheus/promauto"
1616
"github.com/prometheus/common/model"
17-
"github.com/prometheus/prometheus/pkg/labels"
17+
"github.com/prometheus/prometheus/model/labels"
1818

1919
"github.com/cortexproject/cortex/pkg/chunk/cache"
2020
"github.com/cortexproject/cortex/pkg/chunk/encoding"

pkg/chunk/chunk_store_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/pkg/errors"
1414
"github.com/prometheus/client_golang/prometheus"
1515
"github.com/prometheus/common/model"
16-
"github.com/prometheus/prometheus/pkg/labels"
16+
"github.com/prometheus/prometheus/model/labels"
1717
"github.com/prometheus/prometheus/promql/parser"
1818
"github.com/stretchr/testify/assert"
1919
"github.com/stretchr/testify/require"

pkg/chunk/chunk_store_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/go-kit/log/level"
88
"github.com/prometheus/common/model"
9-
"github.com/prometheus/prometheus/pkg/labels"
9+
"github.com/prometheus/prometheus/model/labels"
1010
"github.com/prometheus/prometheus/promql"
1111

1212
"github.com/cortexproject/cortex/pkg/chunk/cache"

pkg/chunk/chunk_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
"github.com/pkg/errors"
1111
"github.com/prometheus/common/model"
12-
"github.com/prometheus/prometheus/pkg/labels"
12+
"github.com/prometheus/prometheus/model/labels"
1313
"github.com/stretchr/testify/require"
1414

1515
"github.com/cortexproject/cortex/pkg/chunk/encoding"

pkg/chunk/composite_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/prometheus/common/model"
10-
"github.com/prometheus/prometheus/pkg/labels"
10+
"github.com/prometheus/prometheus/model/labels"
1111

1212
"github.com/cortexproject/cortex/pkg/chunk/cache"
1313
)

pkg/chunk/composite_store_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/stretchr/testify/require"
1010

1111
"github.com/prometheus/common/model"
12-
"github.com/prometheus/prometheus/pkg/labels"
12+
"github.com/prometheus/prometheus/model/labels"
1313
"github.com/weaveworks/common/test"
1414
)
1515

pkg/chunk/fixtures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"time"
88

99
"github.com/prometheus/common/model"
10-
"github.com/prometheus/prometheus/pkg/labels"
10+
"github.com/prometheus/prometheus/model/labels"
1111

1212
"github.com/cortexproject/cortex/pkg/util"
1313
)

pkg/chunk/grpc/grpc_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"testing"
66

7-
"github.com/prometheus/prometheus/pkg/labels"
7+
"github.com/prometheus/prometheus/model/labels"
88
"github.com/stretchr/testify/require"
99

1010
"github.com/cortexproject/cortex/pkg/chunk"

pkg/chunk/json_helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
jsoniter "github.com/json-iterator/go"
88
"github.com/prometheus/common/model"
9-
"github.com/prometheus/prometheus/pkg/labels"
9+
"github.com/prometheus/prometheus/model/labels"
1010
)
1111

1212
func init() {

pkg/chunk/purger/delete_requests_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"github.com/cortexproject/cortex/pkg/chunk"
1616

1717
"github.com/prometheus/common/model"
18-
"github.com/prometheus/prometheus/pkg/labels"
18+
"github.com/prometheus/prometheus/model/labels"
1919
)
2020

2121
type (

pkg/chunk/purger/tombstones.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"github.com/prometheus/client_golang/prometheus"
1313
"github.com/prometheus/client_golang/prometheus/promauto"
1414
"github.com/prometheus/common/model"
15-
"github.com/prometheus/prometheus/pkg/labels"
15+
"github.com/prometheus/prometheus/model/labels"
1616
"github.com/prometheus/prometheus/promql/parser"
1717

1818
util_log "github.com/cortexproject/cortex/pkg/util/log"

pkg/chunk/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/go-kit/log/level"
1212
jsoniter "github.com/json-iterator/go"
1313
"github.com/prometheus/common/model"
14-
"github.com/prometheus/prometheus/pkg/labels"
14+
"github.com/prometheus/prometheus/model/labels"
1515

1616
"github.com/cortexproject/cortex/pkg/querier/astmapper"
1717
util_log "github.com/cortexproject/cortex/pkg/util/log"

pkg/chunk/schema_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
jsoniter "github.com/json-iterator/go"
1212
"github.com/prometheus/common/model"
13-
"github.com/prometheus/prometheus/pkg/labels"
13+
"github.com/prometheus/prometheus/model/labels"
1414
"github.com/prometheus/prometheus/promql/parser"
1515
"github.com/stretchr/testify/require"
1616
"github.com/weaveworks/common/test"

pkg/chunk/schema_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414

1515
"github.com/pkg/errors"
1616
"github.com/prometheus/common/model"
17-
"github.com/prometheus/prometheus/pkg/labels"
17+
"github.com/prometheus/prometheus/model/labels"
1818
)
1919

2020
// Backwards-compatible with model.Metric.String()

pkg/chunk/schema_util_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"math/rand"
1010
"testing"
1111

12-
"github.com/prometheus/prometheus/pkg/labels"
12+
"github.com/prometheus/prometheus/model/labels"
1313

1414
"github.com/prometheus/common/model"
1515
"github.com/stretchr/testify/assert"

pkg/chunk/series_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/prometheus/client_golang/prometheus"
1212
"github.com/prometheus/client_golang/prometheus/promauto"
1313
"github.com/prometheus/common/model"
14-
"github.com/prometheus/prometheus/pkg/labels"
14+
"github.com/prometheus/prometheus/model/labels"
1515

1616
"github.com/cortexproject/cortex/pkg/chunk/cache"
1717
"github.com/cortexproject/cortex/pkg/querier/astmapper"

pkg/chunk/testutils/testutils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88

99
"github.com/grafana/dskit/flagext"
1010
"github.com/prometheus/common/model"
11-
"github.com/prometheus/prometheus/pkg/labels"
11+
"github.com/prometheus/prometheus/model/labels"
1212

1313
"github.com/cortexproject/cortex/pkg/chunk"
1414
"github.com/cortexproject/cortex/pkg/chunk/cache"

0 commit comments

Comments
 (0)