Skip to content

Commit e3ff425

Browse files
committed
Fix pipeline
1 parent c246dc6 commit e3ff425

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

pkg/distributor/distributor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3609,7 +3609,7 @@ func TestDistributor_LabelValuesForLabelName(t *testing.T) {
36093609
to: 300_000,
36103610
hints: &storage.LabelHints{Limit: 1},
36113611
expectedLabelValues: []string{"label_0"},
3612-
}
3612+
},
36133613
}
36143614

36153615
for testName, testCase := range tests {

pkg/querier/blocks_store_queryable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@ func createLabelNamesRequest(minT, maxT int64, blockIDs []ulid.ULID, hints *stor
12211221
func createLabelValuesRequest(minT, maxT int64, label string, blockIDs []ulid.ULID, hints *storage.LabelHints, matchers ...*labels.Matcher) (*storepb.LabelValuesRequest, error) {
12221222
var limit int64
12231223
if hints != nil {
1224-
limit = hints.Limit
1224+
limit = int64(hints.Limit)
12251225
}
12261226

12271227
req := &storepb.LabelValuesRequest{

pkg/querier/distributor_queryable_test.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -640,12 +640,12 @@ func TestDistributorQuerier_Select_CounterResets(t *testing.T) {
640640
func TestDistributorQuerier_LabelNames(t *testing.T) {
641641
const mint, maxt = 0, 10
642642

643-
hints := &storage.LabelHints{Limit: 1}
644643
someMatchers := []*labels.Matcher{labels.MustNewMatcher(labels.MatchEqual, "foo", "bar")}
644+
hints := &storage.LabelHints{Limit: 1}
645645
labelNames := []string{"foo", "job"}
646646

647-
t.Run("with matchers", func(t *testing.T) {
648-
t.Run("queryLabelNamesWithMatchers=true", func(t *testing.T) {
647+
t.Run("querierLabelNames", func(t *testing.T) {
648+
t.Run("with matchers", func(t *testing.T) {
649649
d := &mockDistributor{}
650650
d.On("LabelNames", mock.Anything, model.Time(mint), model.Time(maxt), &storage.LabelHints{}, someMatchers).
651651
Return(labelNames, nil)
@@ -659,11 +659,8 @@ func TestDistributorQuerier_LabelNames(t *testing.T) {
659659
assert.Empty(t, warnings)
660660
assert.Equal(t, labelNames, names)
661661
})
662-
})
663662

664-
t.Run("queryLabelNamesWithMatchers=true, with limit", func(t *testing.T) {
665-
hints := &storage.LabelHints{Limit: 1}
666-
t.Run("queryLabelNamesWithMatchers=true", func(t *testing.T) {
663+
t.Run("with limit", func(t *testing.T) {
667664
d := &mockDistributor{}
668665
d.On("LabelNames", mock.Anything, model.Time(mint), model.Time(maxt), hints, []*labels.Matcher{}).
669666
Return(labelNames[:hints.Limit], nil)

0 commit comments

Comments
 (0)