Skip to content

Commit

Permalink
upgrade thanos to latest main (#5617)
Browse files Browse the repository at this point in the history
* upgrade thanos to latest main

Signed-off-by: Alex Le <[email protected]>

* fix lint

Signed-off-by: Alex Le <[email protected]>

---------

Signed-off-by: Alex Le <[email protected]>
  • Loading branch information
alexqyle authored Oct 25, 2023
1 parent 8505ac4 commit f608df2
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 139 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ require (
github.com/stretchr/testify v1.8.4
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed
github.com/thanos-io/promql-engine v0.0.0-20231013104847-4517c0d5f591
github.com/thanos-io/thanos v0.32.5-0.20231020043209-42792d9d0e8c
github.com/thanos-io/thanos v0.32.5-0.20231023172853-513272e70874
github.com/uber/jaeger-client-go v2.30.0+incompatible
github.com/weaveworks/common v0.0.0-20221201103051-7c2720a9024d
go.etcd.io/etcd/api/v3 v3.5.9
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1277,8 +1277,8 @@ github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed h1:iWQdY3S6DpWj
github.com/thanos-io/objstore v0.0.0-20230921130928-63a603e651ed/go.mod h1:oJ82xgcBDzGJrEgUsjlTj6n01+ZWUMMUR8BlZzX5xDE=
github.com/thanos-io/promql-engine v0.0.0-20231013104847-4517c0d5f591 h1:6bZbFM+Mvy2kL8BeL8TJ5+5pV3sUR2PSLaZyw911rtQ=
github.com/thanos-io/promql-engine v0.0.0-20231013104847-4517c0d5f591/go.mod h1:vfXJv1JXNdLfHnjsHsLLJl5tyI7KblF76Wo5lZ9YC4Q=
github.com/thanos-io/thanos v0.32.5-0.20231020043209-42792d9d0e8c h1:M0XaUc+MummgpYJJkYhe2+bEO8H0KNmm/mIIpMTgyYc=
github.com/thanos-io/thanos v0.32.5-0.20231020043209-42792d9d0e8c/go.mod h1:qHdYVTXuIZMXn2VX5KprDH5utFxR+29uqq4GIQ1OM6g=
github.com/thanos-io/thanos v0.32.5-0.20231023172853-513272e70874 h1:7/j60inmFvV9uFvbxDdghob5DR92M7mvmn/Tw+CKK3o=
github.com/thanos-io/thanos v0.32.5-0.20231023172853-513272e70874/go.mod h1:eVFfte7jP1aTcTkQcZEj5/P9rCeMFHllEqfNZqirLLA=
github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU=
github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab/go.mod h1:eheTFp954zcWZXCU8d0AT76ftsQOTo4DTqkN/h3k1MY=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
Expand Down
36 changes: 18 additions & 18 deletions pkg/querier/blocks_consistency_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,52 +36,52 @@ func TestBlocksConsistencyChecker_Check(t *testing.T) {
},
"all known blocks have been queried from a single store-gateway": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{},
queriedBlocks: []ulid.ULID{block1, block2},
},
"all known blocks have been queried from multiple store-gateway": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{},
queriedBlocks: []ulid.ULID{block1, block2},
},
"store-gateway has queried more blocks than expected": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{},
queriedBlocks: []ulid.ULID{block1, block2, block3},
},
"store-gateway has queried less blocks than expected": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block3, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block3, UploadedAt: now.Add(-time.Hour).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{},
queriedBlocks: []ulid.ULID{block1, block3},
expectedMissingBlocks: []ulid.ULID{block2},
},
"store-gateway has queried less blocks than expected, but the missing block has been recently uploaded": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block3, UploadedAt: now.Add(-uploadGracePeriod).Add(time.Minute).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block3, UploadedAt: now.Add(-uploadGracePeriod).Add(time.Minute).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{},
queriedBlocks: []ulid.ULID{block1, block2},
},
"store-gateway has queried less blocks than expected and the missing block has been recently marked for deletion": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block3, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block3, UploadedAt: now.Add(-time.Hour).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{
block3: {DeletionTime: now.Add(-deletionGracePeriod / 2).Unix()},
Expand All @@ -91,9 +91,9 @@ func TestBlocksConsistencyChecker_Check(t *testing.T) {
},
"store-gateway has queried less blocks than expected and the missing block has been marked for deletion long time ago": {
knownBlocks: bucketindex.Blocks{
{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
{ID: block3, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block1, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block2, UploadedAt: now.Add(-time.Hour).Unix()},
&bucketindex.Block{ID: block3, UploadedAt: now.Add(-time.Hour).Unix()},
},
knownDeletionMarks: map[ulid.ULID]*bucketindex.BlockDeletionMark{
block3: {DeletionTime: now.Add(-deletionGracePeriod * 2).Unix()},
Expand Down
Loading

0 comments on commit f608df2

Please sign in to comment.