From fb6f97fa26c7c957e7f34f6579e820ce7b944bca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Tue, 4 Oct 2022 14:27:27 +0300 Subject: [PATCH] *: update dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update prometheus dependency. Signed-off-by: Giedrius Statkevičius --- cmd/thanos/receive.go | 3 +-- go.mod | 6 +++--- go.sum | 10 +++++----- internal/cortex/chunk/series_store.go | 2 +- .../cortex/ingester/client/compat_test.go | 20 +++++++++---------- internal/cortex/querier/querier_test.go | 2 +- internal/cortex/util/metrics_helper.go | 4 ++-- pkg/alert/alert.go | 2 +- pkg/block/index.go | 2 +- pkg/compact/downsample/downsample.go | 2 +- pkg/compact/downsample/downsample_test.go | 10 +++++----- pkg/compactv2/chunk_series_set.go | 2 +- pkg/compactv2/compactor_test.go | 2 +- pkg/dedup/iter.go | 2 +- pkg/store/bucket_test.go | 10 +++++----- pkg/store/postings_codec_test.go | 2 +- pkg/store/storepb/testutil/series.go | 4 ++-- pkg/testutil/e2eutil/prometheus.go | 2 +- 18 files changed, 43 insertions(+), 44 deletions(-) diff --git a/cmd/thanos/receive.go b/cmd/thanos/receive.go index 4733fa26a1a..f45eb1c0ffd 100644 --- a/cmd/thanos/receive.go +++ b/cmd/thanos/receive.go @@ -82,7 +82,6 @@ func registerReceive(app *extkingpin.App) { RetentionDuration: int64(time.Duration(*conf.retention) / time.Millisecond), NoLockfile: conf.noLockFile, WALCompression: conf.walCompression, - AllowOverlappingBlocks: conf.tsdbAllowOverlappingBlocks, MaxExemplars: conf.tsdbMaxExemplars, EnableExemplarStorage: true, HeadChunksWriteQueueSize: int(conf.tsdbWriteQueueSize), @@ -837,7 +836,7 @@ func (rc *receiveConfig) registerFlag(cmd extkingpin.FlagClause) { rc.tsdbMaxBlockDuration = extkingpin.ModelDuration(cmd.Flag("tsdb.max-block-duration", "Max duration for local TSDB blocks").Default("2h").Hidden()) - cmd.Flag("tsdb.allow-overlapping-blocks", "Allow overlapping blocks, which in turn enables vertical compaction and vertical query merge.").Default("false").BoolVar(&rc.tsdbAllowOverlappingBlocks) + cmd.Flag("tsdb.allow-overlapping-blocks", "Allow overlapping blocks, which in turn enables vertical compaction and vertical query merge. Does not do anything, enabled all the time.").Default("false").BoolVar(&rc.tsdbAllowOverlappingBlocks) cmd.Flag("tsdb.wal-compression", "Compress the tsdb WAL.").Default("true").BoolVar(&rc.walCompression) diff --git a/go.mod b/go.mod index c2411d8630d..16cb4e837ae 100644 --- a/go.mod +++ b/go.mod @@ -66,10 +66,10 @@ require ( github.com/prometheus/common v0.37.0 github.com/prometheus/exporter-toolkit v0.7.1 // Prometheus maps version 2.x.y to tags v0.x.y. - github.com/prometheus/prometheus v0.38.0 + github.com/prometheus/prometheus v0.38.1-0.20221003141934-f7a7b18cdcca github.com/sony/gobreaker v0.5.0 github.com/stretchr/testify v1.8.0 - github.com/thanos-community/promql-engine v0.0.0-20220926123320-18a0a4b4be8f + github.com/thanos-community/promql-engine v0.0.0-20221004075442-da92170150df github.com/thanos-io/objstore v0.0.0-20220923084403-cec51c61948b github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.4.1+incompatible @@ -124,7 +124,7 @@ require ( github.com/aliyun/aliyun-oss-go-sdk v2.2.2+incompatible // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/aws/aws-sdk-go v1.44.102 // indirect + github.com/aws/aws-sdk-go v1.44.109 // indirect github.com/aws/aws-sdk-go-v2 v1.16.0 // indirect github.com/aws/aws-sdk-go-v2/config v1.15.1 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.11.0 // indirect diff --git a/go.sum b/go.sum index 38091bafac2..92c2cc50a59 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.102 h1:6tUCTGL2UDbFZae1TLGk8vTgeXuzkb8KbAe2FiAeKHc= -github.com/aws/aws-sdk-go v1.44.102/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.109 h1:+Na5JPeS0kiEHoBp5Umcuuf+IDqXqD0lXnM920E31YI= +github.com/aws/aws-sdk-go v1.44.109/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.16.0 h1:cBAYjiiexRAg9v2z9vb6IdxAa7ef4KCtjW7w7e3GxGo= github.com/aws/aws-sdk-go-v2 v1.16.0/go.mod h1:lJYcuZZEHWNIb6ugJjbQY1fykdoobWbOS7kJYb4APoI= @@ -935,8 +935,8 @@ github.com/tencentyun/cos-go-sdk-v5 v0.7.34 h1:xm+Pg+6m486y4eugRI7/E4WasbVmpY1hp github.com/tencentyun/cos-go-sdk-v5 v0.7.34/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM= -github.com/thanos-community/promql-engine v0.0.0-20220926123320-18a0a4b4be8f h1:S+IFfNs2XA2pbd0cRtk8aOpLH8D/Q7Ipess3WRfcgPw= -github.com/thanos-community/promql-engine v0.0.0-20220926123320-18a0a4b4be8f/go.mod h1:IEJ3g2fmXAun4Rj39T4Anfm1AYvcDmxqWWSuYdn2TRM= +github.com/thanos-community/promql-engine v0.0.0-20221004075442-da92170150df h1:vrevr7p2FtiqD48UiuuPyFvu2t8WdHEENDD+6jMyFyU= +github.com/thanos-community/promql-engine v0.0.0-20221004075442-da92170150df/go.mod h1:xPhabVMItFWDcYsyOJ1QBZtjl0zBytHdgv8P+6dPtPM= github.com/thanos-io/objstore v0.0.0-20220923084403-cec51c61948b h1:P+MnJn+NoU6N2v7wLexTVRCu6ZvcOdPU4L8f2dgEfiY= github.com/thanos-io/objstore v0.0.0-20220923084403-cec51c61948b/go.mod h1:Vx5dZs9ElxEhNLnum/OgB0pNTqNdI2zdXL82BeJr3T4= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU= @@ -1079,8 +1079,8 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= diff --git a/internal/cortex/chunk/series_store.go b/internal/cortex/chunk/series_store.go index ee203ba4cb9..8955030020f 100644 --- a/internal/cortex/chunk/series_store.go +++ b/internal/cortex/chunk/series_store.go @@ -532,7 +532,7 @@ func injectShardLabels(chunks []Chunk, shard astmapper.ShardAnnotation) { b := labels.NewBuilder(chunk.Metric) l := shard.Label() b.Set(l.Name, l.Value) - chunk.Metric = b.Labels() + chunk.Metric = b.Labels(nil) chunks[i] = chunk } } diff --git a/internal/cortex/ingester/client/compat_test.go b/internal/cortex/ingester/client/compat_test.go index 0f2058b0e95..f6b3a6eb9a9 100644 --- a/internal/cortex/ingester/client/compat_test.go +++ b/internal/cortex/ingester/client/compat_test.go @@ -109,19 +109,19 @@ func TestFingerprintCollisions(t *testing.T) { const _label2 = "KiqbryhzUpn" metric := labels.NewBuilder(labels.FromStrings("__name__", "logs")) - c1 = metric.Set("_", _label1).Labels() - c2 = metric.Set("_", _label2).Labels() + c1 = metric.Set("_", _label1).Labels(nil) + c2 = metric.Set("_", _label2).Labels(nil) verifyCollision(t, true, c1, c2) metric = labels.NewBuilder(labels.FromStrings("__name__", "up", "instance", "hello")) - c1 = metric.Set("_", _label1).Labels() - c2 = metric.Set("_", _label2).Labels() + c1 = metric.Set("_", _label1).Labels(nil) + c2 = metric.Set("_", _label2).Labels(nil) verifyCollision(t, true, c1, c2) // here it breaks, because "Z" label is sorted before "_" label. metric = labels.NewBuilder(labels.FromStrings("__name__", "up", "Z", "hello")) - c1 = metric.Set("_", _label1).Labels() - c2 = metric.Set("_", _label2).Labels() + c1 = metric.Set("_", _label1).Labels(nil) + c2 = metric.Set("_", _label2).Labels(nil) verifyCollision(t, false, c1, c2) // A="K6sjsNNczPl" and A="cswpLMIZpwt" label has similar property. @@ -132,14 +132,14 @@ func TestFingerprintCollisions(t *testing.T) { const Alabel2 = "cswpLMIZpwt" metric = labels.NewBuilder(labels.FromStrings("__name__", "up", "Z", "hello")) - c1 = metric.Set("A", Alabel1).Labels() - c2 = metric.Set("A", Alabel2).Labels() + c1 = metric.Set("A", Alabel1).Labels(nil) + c2 = metric.Set("A", Alabel2).Labels(nil) verifyCollision(t, true, c1, c2) // Adding the same suffix to the "A" label also works. metric = labels.NewBuilder(labels.FromStrings("__name__", "up", "Z", "hello")) - c1 = metric.Set("A", Alabel1+"suffix").Labels() - c2 = metric.Set("A", Alabel2+"suffix").Labels() + c1 = metric.Set("A", Alabel1+"suffix").Labels(nil) + c2 = metric.Set("A", Alabel2+"suffix").Labels(nil) verifyCollision(t, true, c1, c2) } diff --git a/internal/cortex/querier/querier_test.go b/internal/cortex/querier/querier_test.go index 1336752f828..0f1f33e1754 100644 --- a/internal/cortex/querier/querier_test.go +++ b/internal/cortex/querier/querier_test.go @@ -175,7 +175,7 @@ func mockTSDB(t *testing.T, mint model.Time, samples int, step, chunkOffset time opts := tsdb.DefaultHeadOptions() opts.ChunkDirRoot = t.TempDir() // We use TSDB head only. By using full TSDB DB, and appending samples to it, closing it would cause unnecessary HEAD compaction, which slows down the test. - head, err := tsdb.NewHead(nil, nil, nil, opts, nil) + head, err := tsdb.NewHead(nil, nil, nil, nil, opts, nil) require.NoError(t, err) t.Cleanup(func() { _ = head.Close() diff --git a/internal/cortex/util/metrics_helper.go b/internal/cortex/util/metrics_helper.go index 2a3feeb8f8e..2fac9bf4e49 100644 --- a/internal/cortex/util/metrics_helper.go +++ b/internal/cortex/util/metrics_helper.go @@ -716,7 +716,7 @@ func FromLabelPairsToLabels(pairs []*dto.LabelPair) labels.Labels { for _, pair := range pairs { builder.Set(pair.GetName(), pair.GetValue()) } - return builder.Labels() + return builder.Labels(nil) } // GetSumOfHistogramSampleCount returns the sum of samples count of histograms matching the provided metric name @@ -782,7 +782,7 @@ nextMetric: lbls.Set(lp.GetName(), lp.GetValue()) } - result = append(result, lbls.Labels()) + result = append(result, lbls.Labels(nil)) } return result, errs.Err() diff --git a/pkg/alert/alert.go b/pkg/alert/alert.go index ac0b63e3b7b..42bc9f7bf1e 100644 --- a/pkg/alert/alert.go +++ b/pkg/alert/alert.go @@ -183,7 +183,7 @@ func (q *Queue) Push(alerts []*notifier.Alert) { for _, l := range q.toAddLset { lb.Set(l.Name, l.Value) } - a.Labels = relabel.Process(lb.Labels(), q.alertRelabelConfigs...) + a.Labels = relabel.Process(lb.Labels(nil), q.alertRelabelConfigs...) if a.Labels != nil { relabeledAlerts = append(relabeledAlerts, a) } diff --git a/pkg/block/index.go b/pkg/block/index.go index 4bc13195d49..0696cbbcd3b 100644 --- a/pkg/block/index.go +++ b/pkg/block/index.go @@ -579,7 +579,7 @@ func rewrite( sort.Sort(lset) for i, c := range chks { - chks[i].Chunk, err = chunkr.Chunk(c.Ref) + chks[i].Chunk, err = chunkr.Chunk(c) if err != nil { return errors.Wrap(err, "chunk read") } diff --git a/pkg/compact/downsample/downsample.go b/pkg/compact/downsample/downsample.go index 639d54c7cd1..7731eab877d 100644 --- a/pkg/compact/downsample/downsample.go +++ b/pkg/compact/downsample/downsample.go @@ -130,7 +130,7 @@ func Downsample( // While #183 exists, we sanitize the chunks we retrieved from the block // before retrieving their samples. for i, c := range chks { - chk, err := chunkr.Chunk(c.Ref) + chk, err := chunkr.Chunk(c) if err != nil { return id, errors.Wrapf(err, "get chunk %d, series %d", c.Ref, postings.At()) } diff --git a/pkg/compact/downsample/downsample_test.go b/pkg/compact/downsample/downsample_test.go index 5ebbcbb5e21..8ad54d4e214 100644 --- a/pkg/compact/downsample/downsample_test.go +++ b/pkg/compact/downsample/downsample_test.go @@ -481,7 +481,7 @@ func TestDownsample(t *testing.T) { var got []map[AggrType][]sample for _, c := range chks { - chk, err := chunkr.Chunk(c.Ref) + chk, err := chunkr.Chunk(c) testutil.Ok(t, err) m := map[AggrType][]sample{} @@ -982,12 +982,12 @@ func (b *memBlock) Series(id storage.SeriesRef, lset *labels.Labels, chks *[]chu return nil } -func (b *memBlock) Chunk(id chunks.ChunkRef) (chunkenc.Chunk, error) { - if uint64(id) >= b.numberOfChunks { - return nil, errors.Wrapf(storage.ErrNotFound, "chunk with ID %d does not exist", id) +func (b *memBlock) Chunk(m chunks.Meta) (chunkenc.Chunk, error) { + if uint64(m.Ref) >= b.numberOfChunks { + return nil, errors.Wrapf(storage.ErrNotFound, "chunk with ID %d does not exist", m.Ref) } - return b.chunks[id], nil + return b.chunks[m.Ref], nil } func (b *memBlock) Symbols() index.StringIter { diff --git a/pkg/compactv2/chunk_series_set.go b/pkg/compactv2/chunk_series_set.go index bf76c0019dc..bc8be1a10d4 100644 --- a/pkg/compactv2/chunk_series_set.go +++ b/pkg/compactv2/chunk_series_set.go @@ -104,7 +104,7 @@ func (e errChunk) Compact() {} func (l *lazyPopulatableChunk) populate() { // TODO(bwplotka): In most cases we don't need to parse anything, just copy. Extend reader/writer for this. var err error - l.populated, err = l.cr.Chunk(l.m.Ref) + l.populated, err = l.cr.Chunk(*l.m) if err != nil { l.m.Chunk = errChunk{err: errChunkIterator{err: errors.Wrapf(err, "cannot populate chunk %d", l.m.Ref)}} return diff --git a/pkg/compactv2/compactor_test.go b/pkg/compactv2/compactor_test.go index fb3278df5cb..e2b66b29d25 100644 --- a/pkg/compactv2/compactor_test.go +++ b/pkg/compactv2/compactor_test.go @@ -669,7 +669,7 @@ func readBlockSeries(t *testing.T, bDir string) []seriesSamples { testutil.Ok(t, indexr.Series(all.At(), &s.lset, &chks)) for _, c := range chks { - c.Chunk, err = chunkr.Chunk(c.Ref) + c.Chunk, err = chunkr.Chunk(c) testutil.Ok(t, err) var chk []sample diff --git a/pkg/dedup/iter.go b/pkg/dedup/iter.go index 0222734376d..9737de279f7 100644 --- a/pkg/dedup/iter.go +++ b/pkg/dedup/iter.go @@ -49,7 +49,7 @@ func NewSeriesSet(set storage.SeriesSet, replicaLabels map[string]struct{}, f st // trimPushdownMarker trims the pushdown marker from the given labels. // Returns true if there was a pushdown marker. func trimPushdownMarker(lbls labels.Labels) (labels.Labels, bool) { - return labels.NewBuilder(lbls).Del(PushdownMarker.Name).Labels(), lbls.Has(PushdownMarker.Name) + return labels.NewBuilder(lbls).Del(PushdownMarker.Name).Labels(nil), lbls.Has(PushdownMarker.Name) } func (s *dedupSeriesSet) Next() bool { diff --git a/pkg/store/bucket_test.go b/pkg/store/bucket_test.go index 4da878ff4af..f51f9d6236e 100644 --- a/pkg/store/bucket_test.go +++ b/pkg/store/bucket_test.go @@ -1084,7 +1084,7 @@ func uploadTestBlock(t testing.TB, tmpDir string, bkt objstore.Bucket, series in headOpts := tsdb.DefaultHeadOptions() headOpts.ChunkDirRoot = tmpDir headOpts.ChunkRange = 1000 - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) testutil.Ok(t, err) defer func() { testutil.Ok(t, h.Close()) @@ -1462,7 +1462,7 @@ func TestBucketSeries_OneBlock_InMemIndexCacheSegfault(t *testing.T) { // This allows to pick time range that will correspond to number of series picked 1:1. { // Block 1. - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) testutil.Ok(t, err) defer func() { testutil.Ok(t, h.Close()) }() @@ -1501,7 +1501,7 @@ func TestBucketSeries_OneBlock_InMemIndexCacheSegfault(t *testing.T) { var b2 *bucketBlock { // Block 2, do not load this block yet. - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) testutil.Ok(t, err) defer func() { testutil.Ok(t, h.Close()) }() @@ -1742,7 +1742,7 @@ func TestSeries_BlockWithMultipleChunks(t *testing.T) { headOpts.ChunkDirRoot = filepath.Join(tmpDir, "block") headOpts.ChunkRange = 10000000000 - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) testutil.Ok(t, err) defer func() { testutil.Ok(t, h.Close()) }() @@ -1889,7 +1889,7 @@ func createBlockWithOneSeriesWithStep(t testutil.TB, dir string, lbls labels.Lab headOpts := tsdb.DefaultHeadOptions() headOpts.ChunkDirRoot = dir headOpts.ChunkRange = int64(totalSamples) * step - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) testutil.Ok(t, err) defer func() { testutil.Ok(t, h.Close()) }() diff --git a/pkg/store/postings_codec_test.go b/pkg/store/postings_codec_test.go index 46a17c5673f..c6e85fe0585 100644 --- a/pkg/store/postings_codec_test.go +++ b/pkg/store/postings_codec_test.go @@ -25,7 +25,7 @@ func TestDiffVarintCodec(t *testing.T) { headOpts := tsdb.DefaultHeadOptions() headOpts.ChunkDirRoot = chunksDir headOpts.ChunkRange = 1000 - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) testutil.Ok(t, err) defer func() { testutil.Ok(t, h.Close()) diff --git a/pkg/store/storepb/testutil/series.go b/pkg/store/storepb/testutil/series.go index 0b69130c157..6c730423b8d 100644 --- a/pkg/store/storepb/testutil/series.go +++ b/pkg/store/storepb/testutil/series.go @@ -83,7 +83,7 @@ func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, headOpts := tsdb.DefaultHeadOptions() headOpts.ChunkDirRoot = opts.TSDBDir - h, err := tsdb.NewHead(nil, nil, w, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, w, headOpts, nil) testutil.Ok(t, err) app := h.Appender(context.Background()) @@ -129,7 +129,7 @@ func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, } for _, c := range chunkMetas { - chEnc, err := chks.Chunk(c.Ref) + chEnc, err := chks.Chunk(c) testutil.Ok(t, err) // Open Chunk. diff --git a/pkg/testutil/e2eutil/prometheus.go b/pkg/testutil/e2eutil/prometheus.go index 4796441a168..c2fbd3731c5 100644 --- a/pkg/testutil/e2eutil/prometheus.go +++ b/pkg/testutil/e2eutil/prometheus.go @@ -429,7 +429,7 @@ func createBlock( headOpts := tsdb.DefaultHeadOptions() headOpts.ChunkDirRoot = filepath.Join(dir, "chunks") headOpts.ChunkRange = 10000000000 - h, err := tsdb.NewHead(nil, nil, nil, headOpts, nil) + h, err := tsdb.NewHead(nil, nil, nil, nil, headOpts, nil) if err != nil { return id, errors.Wrap(err, "create head block") }