Skip to content

Commit

Permalink
Vendor latest mimir-prometheus/main (grafana#2243)
Browse files Browse the repository at this point in the history
* Vendor latest mimir-prometheus/main

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

* Update the bytes length of the meta files

With the new vendored version of mimir-prometheus the meta files now
have a new property called out_of_order to state if the block was an
out-of-order block or not.

This new property gets added to every meta file so we need to update the
expected lengths of this tests.

This is how the new property looks in the metas:
- "out_of_order": false,

Co-authored-by: Jesus Vazquez <jesus.vazquez@grafana.com>
  • Loading branch information
2 people authored and mason committed Jul 11, 2022
1 parent dd47a74 commit a5a6710
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 22 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ replace git.apache.org/thrift.git => github.com/apache/thrift v0.0.0-20180902110
replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab

// Using a fork of Prometheus while we work on querysharding to avoid a dependency on the upstream.
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20220624104020-1446b53d874c
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20220627145625-5e8406a1d4a5

// Out of order Support forces us to fork thanos because we've changed the ChunkReader interface.
// Once the out of order support is upstreamed and Thanos has vendored it, we can remove this override.
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,8 @@ github.com/grafana/e2e v0.1.1-0.20220519104354-1db01e4751fe h1:mxrRWDjKtob43xF9n
github.com/grafana/e2e v0.1.1-0.20220519104354-1db01e4751fe/go.mod h1:+26VJWpczg2OU3D0537acnHSHzhJORpxOs6F+M27tZo=
github.com/grafana/memberlist v0.3.1-0.20220425183535-6b97a09b7167 h1:PgEQkGHR4YimSCEGT5IoswN9gJKZDVskf+he6UClCLw=
github.com/grafana/memberlist v0.3.1-0.20220425183535-6b97a09b7167/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/grafana/mimir-prometheus v0.0.0-20220624104020-1446b53d874c h1:oJdK/F/mW2j/dy2nKOtmcMBVnHx70mAf2tE1T2oqLPE=
github.com/grafana/mimir-prometheus v0.0.0-20220624104020-1446b53d874c/go.mod h1:evpqrqffGRI38M1zH3IHpmXTeho8IfX5Qpx6Ixpqhyk=
github.com/grafana/mimir-prometheus v0.0.0-20220627145625-5e8406a1d4a5 h1:xlK4WGUnyG7odN0XeMGHzGB7s1/uuEKacl2X9fXcUbA=
github.com/grafana/mimir-prometheus v0.0.0-20220627145625-5e8406a1d4a5/go.mod h1:evpqrqffGRI38M1zH3IHpmXTeho8IfX5Qpx6Ixpqhyk=
github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 h1:uirlL/j72L93RhV4+mkWhjv0cov2I0MIgPOG9rMDr1k=
github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A=
github.com/grafana/thanos v0.19.1-0.20220610094531-ab07eb568317 h1:DG++oZD7E6YUm8YNZOu7RwZ8J/Slhcx3iOlKQBY6Oh0=
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/tsdb/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestUploadBlock(t *testing.T) {
require.Equal(t, 3, len(bkt.Objects()))
require.Equal(t, 3751, len(bkt.Objects()[path.Join(b1.String(), block.ChunksDirname, "000001")]))
require.Equal(t, 401, len(bkt.Objects()[path.Join(b1.String(), block.IndexFilename)]))
require.Equal(t, 546, len(bkt.Objects()[path.Join(b1.String(), block.MetaFilename)]))
require.Equal(t, 570, len(bkt.Objects()[path.Join(b1.String(), block.MetaFilename)]))

origMeta, err := metadata.ReadFromDir(path.Join(tmpDir, "test", b1.String()))
require.NoError(t, err)
Expand All @@ -131,7 +131,7 @@ func TestUploadBlock(t *testing.T) {
require.Equal(t, 3, len(bkt.Objects()))
require.Equal(t, 3751, len(bkt.Objects()[path.Join(b1.String(), block.ChunksDirname, "000001")]))
require.Equal(t, 401, len(bkt.Objects()[path.Join(b1.String(), block.IndexFilename)]))
require.Equal(t, 546, len(bkt.Objects()[path.Join(b1.String(), block.MetaFilename)]))
require.Equal(t, 570, len(bkt.Objects()[path.Join(b1.String(), block.MetaFilename)]))
})

t.Run("upload with no external labels works just fine", func(t *testing.T) {
Expand All @@ -151,7 +151,7 @@ func TestUploadBlock(t *testing.T) {
require.Equal(t, 6, len(bkt.Objects())) // 3 from b1, 3 from b2
require.Equal(t, 3736, len(bkt.Objects()[path.Join(b2.String(), block.ChunksDirname, "000001")]))
require.Equal(t, 401, len(bkt.Objects()[path.Join(b2.String(), block.IndexFilename)]))
require.Equal(t, 525, len(bkt.Objects()[path.Join(b2.String(), block.MetaFilename)]))
require.Equal(t, 549, len(bkt.Objects()[path.Join(b2.String(), block.MetaFilename)]))

origMeta, err := metadata.ReadFromDir(path.Join(tmpDir, b2.String()))
require.NoError(t, err)
Expand Down
3 changes: 3 additions & 0 deletions vendor/github.com/prometheus/prometheus/tsdb/block.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions vendor/github.com/prometheus/prometheus/tsdb/compact.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 34 additions & 6 deletions vendor/github.com/prometheus/prometheus/tsdb/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions vendor/github.com/prometheus/prometheus/tsdb/head_wal.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a5a6710

Please sign in to comment.