Skip to content

Commit

Permalink
Update mimir-prometheus to 320f0c9c4a88 (#6085)
Browse files Browse the repository at this point in the history
* Update mimir-prometheus to 320f0c9c4a88

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Co-authored-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Co-authored-by: Marco Pracucci <marco@pracucci.com>
  • Loading branch information
3 people committed Sep 28, 2023
1 parent 888c2fe commit d7567db
Show file tree
Hide file tree
Showing 97 changed files with 2,035 additions and 1,628 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
* [BUGFIX] Query-frontend: Don't retry read requests rejected by the ingester due to utilization based read path limiting. #6032
* [BUGFIX] Ring: Ensure network addresses used for component hash rings are formatted correctly when using IPv6. #6068
* [BUGFIX] Query-scheduler: don't retain connections from queriers that have shut down, leading to gradually increasing enqueue latency over time. #6100 #6145
* [BUGFIX] Ingester: prevent query logic from continuing to execute after queries are canceled. #6085
* [BUGFIX] Ensure correct nesting of children of the `querier.Select` tracing span. #6085

### Mixin

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,13 @@ require (
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/telebot.v3 v3.1.3 // indirect
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230711102312-30195339c3c7 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

// Using a fork of Prometheus with Mimir-specific changes.
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20230922140437-a10cef685b49
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20230921081126-320f0c9c4a88

// Replace memberlist with our fork which includes some fixes that haven't been
// merged upstream yet:
Expand Down
22 changes: 10 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,6 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4=
github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA=
github.com/google/gnostic v0.6.9 h1:ZK/5VhkoX835RikCHpSUJV9a+S3e1zLh59YnyWeBW+0=
github.com/google/gnostic v0.6.9/go.mod h1:Nm8234We1lq6iB9OmlgNv3nH91XLLVZHCDayfA3xq+E=
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -555,8 +553,8 @@ github.com/grafana/gomemcache v0.0.0-20230914135007-70d78eaabfe1 h1:MLYY2R60/74h
github.com/grafana/gomemcache v0.0.0-20230914135007-70d78eaabfe1/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe h1:yIXAAbLswn7VNWBIvM71O2QsgfgW9fRXZNR0DXe6pDU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/grafana/mimir-prometheus v0.0.0-20230922140437-a10cef685b49 h1:xHAr5q6HZQM3XpK6yys5HBwVF5OSTiia8DBYehyz8co=
github.com/grafana/mimir-prometheus v0.0.0-20230922140437-a10cef685b49/go.mod h1:2aAcvnA2UHVyZtgOoBWuMzrAmVPGxIcKl3XCyUuKUHE=
github.com/grafana/mimir-prometheus v0.0.0-20230921081126-320f0c9c4a88 h1:eYbyOALz00tUNQhRG3qyxX4yKyih6NonnT8BHI/9HxQ=
github.com/grafana/mimir-prometheus v0.0.0-20230921081126-320f0c9c4a88/go.mod h1:FS+VpDcgSX2unPDcuzLAH4+qdraB8f/Kwy73bYwxFJo=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956 h1:em1oddjXL8c1tL0iFdtVtPloq2hRPen2MJQKoAWpxu0=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=
github.com/grafana/regexp v0.0.0-20221005093135-b4c2bcb0a4b6 h1:A3dhViTeFDSQcGOXuUi6ukCQSMyDtDISBp2z6OOo2YM=
Expand Down Expand Up @@ -1586,17 +1584,17 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
k8s.io/api v0.27.3 h1:yR6oQXXnUEBWEWcvPWS0jQL575KoAboQPfJAuKNrw5Y=
k8s.io/api v0.27.3/go.mod h1:C4BNvZnQOF7JA/0Xed2S+aUyJSfTGkGFxLXz9MnpIpg=
k8s.io/apimachinery v0.27.3 h1:Ubye8oBufD04l9QnNtW05idcOe9Z3GQN8+7PqmuVcUM=
k8s.io/apimachinery v0.27.3/go.mod h1:XNfZ6xklnMCOGGFNqXG7bUrQCoR04dh/E7FprV6pb+E=
k8s.io/client-go v0.27.3 h1:7dnEGHZEJld3lYwxvLl7WoehK6lAq7GvgjxpA3nv1E8=
k8s.io/client-go v0.27.3/go.mod h1:2MBEKuTo6V1lbKy3z1euEGnhPfGZLKTS9tiJ2xodM48=
k8s.io/api v0.28.1 h1:i+0O8k2NPBCPYaMB+uCkseEbawEt/eFaiRqUx8aB108=
k8s.io/api v0.28.1/go.mod h1:uBYwID+66wiL28Kn2tBjBYQdEU0Xk0z5qF8bIBqk/Dg=
k8s.io/apimachinery v0.28.1 h1:EJD40og3GizBSV3mkIoXQBsws32okPOy+MkRyzh6nPY=
k8s.io/apimachinery v0.28.1/go.mod h1:X0xh/chESs2hP9koe+SdIAcXWcQ+RM5hy0ZynB+yEvw=
k8s.io/client-go v0.28.1 h1:pRhMzB8HyLfVwpngWKE8hDcXRqifh1ga2Z/PU9SXVK8=
k8s.io/client-go v0.28.1/go.mod h1:pEZA3FqOsVkCc07pFVzK076R+P/eXqsgx5zuuRWukNE=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961 h1:pqRVJGQJz6oeZby8qmPKXYIBjyrcv7EHCe/33UkZMYA=
k8s.io/kube-openapi v0.0.0-20230601164746-7562a1006961/go.mod h1:l8HTwL5fqnlns4jOveW1L75eo7R9KFHxiE0bsPGy428=
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ=
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM=
k8s.io/utils v0.0.0-20230711102312-30195339c3c7 h1:ZgnF1KZsYxWIifwSNZFZgNtWE89WI5yiP5WwlfDoIyc=
k8s.io/utils v0.0.0-20230711102312-30195339c3c7/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
Expand Down
3 changes: 2 additions & 1 deletion integration/compactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ func TestCompactBlocksContainingNativeHistograms(t *testing.T) {
ixReader, err := index.NewFileReader(filepath.Join(outDir, blockID, block.IndexFilename))
require.NoError(t, err)

all, err := ixReader.Postings(index.AllPostingsKey())
n, v := index.AllPostingsKey()
all, err := ixReader.Postings(context.Background(), n, v)
require.NoError(t, err)

for p := ixReader.SortedPostings(all); p.Next(); {
Expand Down
2 changes: 1 addition & 1 deletion pkg/compactor/compactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1573,7 +1573,7 @@ func createCustomTSDBBlock(t *testing.T, bkt objstore.Bucket, userID string, ext

appendFunc(db)

require.NoError(t, db.Compact())
require.NoError(t, db.Compact(context.Background()))
require.NoError(t, db.Snapshot(snapshotDir, true))

// Look for the created block (we expect one).
Expand Down
2 changes: 1 addition & 1 deletion pkg/compactor/split_merge_compactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ func TestMultitenantCompactor_ShouldGuaranteeSeriesShardingConsistencyOverTheTim
require.NoError(t, err)

// Find all series in the block.
postings, err := indexReader.PostingsForMatchers(false, labels.MustNewMatcher(labels.MatchRegexp, "series_id", ".+"))
postings, err := indexReader.PostingsForMatchers(ctx, false, labels.MustNewMatcher(labels.MatchRegexp, "series_id", ".+"))
require.NoError(t, err)

builder := labels.NewScratchBuilder(1)
Expand Down
9 changes: 5 additions & 4 deletions pkg/frontend/querymiddleware/astmapper/astmapper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/parser/posrange"
"github.com/stretchr/testify/require"
)

Expand All @@ -32,8 +33,8 @@ func TestCloneExpr(t *testing.T) {
},
&parser.BinaryExpr{
Op: parser.ADD,
LHS: &parser.NumberLiteral{Val: 1, PosRange: parser.PositionRange{Start: 0, End: 1}},
RHS: &parser.NumberLiteral{Val: 1, PosRange: parser.PositionRange{Start: 4, End: 5}},
LHS: &parser.NumberLiteral{Val: 1, PosRange: posrange.PositionRange{Start: 0, End: 1}},
RHS: &parser.NumberLiteral{Val: 1, PosRange: posrange.PositionRange{Start: 4, End: 5}},
},
},
{
Expand All @@ -56,13 +57,13 @@ func TestCloneExpr(t *testing.T) {
LabelMatchers: []*labels.Matcher{
mustLabelMatcher(labels.MatchEqual, string(model.MetricNameLabel), "some_metric"),
},
PosRange: parser.PositionRange{
PosRange: posrange.PositionRange{
Start: 19,
End: 30,
},
},
Grouping: []string{"foo"},
PosRange: parser.PositionRange{
PosRange: posrange.PositionRange{
Start: 0,
End: 31,
},
Expand Down
5 changes: 3 additions & 2 deletions pkg/frontend/querymiddleware/astmapper/instant_splitting.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/promql/parser/posrange"
)

type instantSplitter struct {
Expand Down Expand Up @@ -194,7 +195,7 @@ func (i *instantSplitter) mapParenExpr(expr *parser.ParenExpr) (mapped parser.Ex

return &parser.ParenExpr{
Expr: parenExpr,
PosRange: parser.PositionRange{},
PosRange: posrange.PositionRange{},
}, true, nil
}

Expand Down Expand Up @@ -331,7 +332,7 @@ func (i *instantSplitter) mapCallByRangeInterval(expr *parser.Call, rangeInterva
Param: nil,
Grouping: grouping,
Without: groupingWithout,
PosRange: parser.PositionRange{},
PosRange: posrange.PositionRange{},
}, true, nil
}

Expand Down
17 changes: 9 additions & 8 deletions pkg/frontend/querymiddleware/querysharding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/annotations"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -1434,10 +1435,10 @@ func TestQuerySharding_ShouldReturnErrorInCorrectFormat(t *testing.T) {
return int64(1 * time.Minute / (time.Millisecond / time.Nanosecond))
},
})
queryableInternalErr = storage.QueryableFunc(func(ctx context.Context, mint, maxt int64) (storage.Querier, error) {
queryableInternalErr = storage.QueryableFunc(func(mint, maxt int64) (storage.Querier, error) {
return nil, httpgrpc.ErrorFromHTTPResponse(&httpgrpc.HTTPResponse{Code: http.StatusInternalServerError, Body: []byte("fatal queryable error")})
})
queryablePrometheusExecErr = storage.QueryableFunc(func(ctx context.Context, mint, maxt int64) (storage.Querier, error) {
queryablePrometheusExecErr = storage.QueryableFunc(func(mint, maxt int64) (storage.Querier, error) {
return nil, apierror.Newf(apierror.TypeExec, "expanding series: %s", validation.NewMaxQueryLengthError(744*time.Hour, 720*time.Hour))
})
queryable = storageSeriesQueryable([]*promql.StorageSeries{
Expand Down Expand Up @@ -1551,7 +1552,7 @@ func TestQuerySharding_EngineErrorMapping(t *testing.T) {
series = append(series, newSeries(newTestCounterLabels(i), start.Add(-lookbackDelta), end, step, factor(float64(i)*0.1)))
}

queryable := storage.QueryableFunc(func(ctx context.Context, mint, maxt int64) (storage.Querier, error) {
queryable := storage.QueryableFunc(func(mint, maxt int64) (storage.Querier, error) {
return &querierMock{series: series}, nil
})

Expand Down Expand Up @@ -1989,7 +1990,7 @@ func (h *downstreamHandler) Do(ctx context.Context, r Request) (Response, error)
}

func storageSeriesQueryable(series []*promql.StorageSeries) storage.Queryable {
return storage.QueryableFunc(func(ctx context.Context, mint, maxt int64) (storage.Querier, error) {
return storage.QueryableFunc(func(mint, maxt int64) (storage.Querier, error) {
return &querierMock{series: series}, nil
})
}
Expand All @@ -1998,7 +1999,7 @@ type querierMock struct {
series []*promql.StorageSeries
}

func (m *querierMock) Select(sorted bool, _ *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
func (m *querierMock) Select(_ context.Context, sorted bool, _ *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
shard, matchers, err := sharding.RemoveShardFromMatchers(matchers)
if err != nil {
return storage.ErrSeriesSet(err)
Expand Down Expand Up @@ -2026,11 +2027,11 @@ func (m *querierMock) Select(sorted bool, _ *storage.SelectHints, matchers ...*l
return newSeriesIteratorMock(filtered)
}

func (m *querierMock) LabelValues(_ string, _ ...*labels.Matcher) ([]string, storage.Warnings, error) {
func (m *querierMock) LabelValues(context.Context, string, ...*labels.Matcher) ([]string, annotations.Annotations, error) {
return nil, nil, nil
}

func (m *querierMock) LabelNames(_ ...*labels.Matcher) ([]string, storage.Warnings, error) {
func (m *querierMock) LabelNames(context.Context, ...*labels.Matcher) ([]string, annotations.Annotations, error) {
return nil, nil, nil
}

Expand Down Expand Up @@ -2240,7 +2241,7 @@ func (i *seriesIteratorMock) Err() error {
return nil
}

func (i *seriesIteratorMock) Warnings() storage.Warnings {
func (i *seriesIteratorMock) Warnings() annotations.Annotations {
return nil
}

Expand Down
12 changes: 7 additions & 5 deletions pkg/frontend/querymiddleware/querysharding_test_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/tsdb/chunkenc"
"github.com/prometheus/prometheus/util/annotations"
"github.com/stretchr/testify/require"

"github.com/grafana/mimir/pkg/mimirpb"
Expand Down Expand Up @@ -95,13 +96,13 @@ type mockShardedQueryable struct {
}

// Querier impls storage.Queryable
func (q *mockShardedQueryable) Querier(_ context.Context, _, _ int64) (storage.Querier, error) {
func (q *mockShardedQueryable) Querier(_, _ int64) (storage.Querier, error) {
return q, nil
}

// Select implements storage.Querier interface.
// The bool passed is ignored because the series is always sorted.
func (q *mockShardedQueryable) Select(_ bool, _ *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
func (q *mockShardedQueryable) Select(_ context.Context, _ bool, _ *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
tStart := time.Now()

shard, _, err := sharding.ShardFromMatchers(matchers)
Expand Down Expand Up @@ -186,12 +187,12 @@ func (s *shardLabelSeries) Labels() labels.Labels {
}

// LabelValues impls storage.Querier
func (q *mockShardedQueryable) LabelValues(_ string, _ ...*labels.Matcher) ([]string, storage.Warnings, error) {
func (q *mockShardedQueryable) LabelValues(context.Context, string, ...*labels.Matcher) ([]string, annotations.Annotations, error) {
return nil, nil, errors.Errorf("unimplemented")
}

// LabelNames returns all the unique label names present in the block in sorted order.
func (q *mockShardedQueryable) LabelNames(_ ...*labels.Matcher) ([]string, storage.Warnings, error) {
func (q *mockShardedQueryable) LabelNames(context.Context, ...*labels.Matcher) ([]string, annotations.Annotations, error) {
return nil, nil, errors.Errorf("unimplemented")
}

Expand Down Expand Up @@ -261,10 +262,11 @@ func TestNewMockShardedQueryable(t *testing.T) {
q := newMockShardedQueryable(tc.nSamples, tc.nHistograms, tc.labelSet, tc.labelBuckets, 0)
expectedSeries := int(math.Pow(float64(tc.labelBuckets), float64(len(tc.labelSet))))

ctx := context.Background()
seriesCt := 0
for i := uint64(0); i < tc.shards; i++ {

set := q.Select(false, nil, &labels.Matcher{
set := q.Select(ctx, false, nil, &labels.Matcher{
Type: labels.MatchEqual,
Name: sharding.ShardLabel,
Value: sharding.ShardSelector{
Expand Down
14 changes: 7 additions & 7 deletions pkg/frontend/querymiddleware/sharded_queryable.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/prometheus/prometheus/model/value"
"github.com/prometheus/prometheus/promql/parser"
"github.com/prometheus/prometheus/storage"
"github.com/prometheus/prometheus/util/annotations"

"github.com/grafana/mimir/pkg/frontend/querymiddleware/astmapper"
"github.com/grafana/mimir/pkg/mimirpb"
Expand Down Expand Up @@ -50,8 +51,8 @@ func newShardedQueryable(req Request, next Handler) *shardedQueryable {
}

// Querier implements storage.Queryable.
func (q *shardedQueryable) Querier(ctx context.Context, _, _ int64) (storage.Querier, error) {
return &shardedQuerier{ctx: ctx, req: q.req, handler: q.handler, responseHeaders: q.responseHeaders}, nil
func (q *shardedQueryable) Querier(_, _ int64) (storage.Querier, error) {
return &shardedQuerier{req: q.req, handler: q.handler, responseHeaders: q.responseHeaders}, nil
}

// getResponseHeaders returns the merged response headers received by the downstream
Expand All @@ -64,7 +65,6 @@ func (q *shardedQueryable) getResponseHeaders() []*PrometheusResponseHeader {
// from the astmapper.EmbeddedQueriesMetricName metric label value and concurrently run embedded queries
// through the downstream handler.
type shardedQuerier struct {
ctx context.Context
req Request
handler Handler

Expand All @@ -74,7 +74,7 @@ type shardedQuerier struct {

// Select implements storage.Querier.
// The sorted bool is ignored because the series is always sorted.
func (q *shardedQuerier) Select(_ bool, hints *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
func (q *shardedQuerier) Select(ctx context.Context, _ bool, hints *storage.SelectHints, matchers ...*labels.Matcher) storage.SeriesSet {
var embeddedQuery string
var isEmbedded bool
for _, matcher := range matchers {
Expand All @@ -100,7 +100,7 @@ func (q *shardedQuerier) Select(_ bool, hints *storage.SelectHints, matchers ...
return storage.ErrSeriesSet(err)
}

return q.handleEmbeddedQueries(q.ctx, queries, hints)
return q.handleEmbeddedQueries(ctx, queries, hints)
}

// handleEmbeddedQueries concurrently executes the provided queries through the downstream handler.
Expand Down Expand Up @@ -133,12 +133,12 @@ func (q *shardedQuerier) handleEmbeddedQueries(ctx context.Context, queries []st
}

// LabelValues implements storage.LabelQuerier.
func (q *shardedQuerier) LabelValues(_ string, _ ...*labels.Matcher) ([]string, storage.Warnings, error) {
func (q *shardedQuerier) LabelValues(context.Context, string, ...*labels.Matcher) ([]string, annotations.Annotations, error) {
return nil, nil, errNotImplemented
}

// LabelNames implements storage.LabelQuerier.
func (q *shardedQuerier) LabelNames(_ ...*labels.Matcher) ([]string, storage.Warnings, error) {
func (q *shardedQuerier) LabelNames(context.Context, ...*labels.Matcher) ([]string, annotations.Annotations, error) {
return nil, nil, errNotImplemented
}

Expand Down
Loading

0 comments on commit d7567db

Please sign in to comment.