Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/thanos/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func runRule(
infoOptions = append(
infoOptions,
info.WithLabelSetFunc(func() []labelpb.ZLabelSet {
return tsdbStore.LabelSet()
return labelpb.ZLabelSetsFromPromLabels(tsdbStore.LabelSet()...)
}),
info.WithStoreInfoFunc(func() (*infopb.StoreInfo, error) {
if httpProbe.IsReady() {
Expand Down
13 changes: 5 additions & 8 deletions pkg/receive/multitsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package receive

import (
"context"
"fmt"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -217,7 +216,7 @@ func (l *localClient) Matches(matchers []*labels.Matcher) bool {
}

func (l *localClient) LabelSets() []labels.Labels {
return labelpb.ZLabelSetsToPromLabelSets(l.store.LabelSet()...)
return l.store.LabelSet()
}

func (l *localClient) TimeRange() (mint int64, maxt int64) {
Expand All @@ -233,19 +232,17 @@ func (l *localClient) TSDBInfos() []infopb.TSDBInfo {
mint, maxt := l.store.TimeRange()
return []infopb.TSDBInfo{
{
Labels: labelsets[0],
Labels: labelpb.ZLabelSet{
Labels: labelpb.ZLabelsFromPromLabels(labelsets[0]),
},
MinTime: mint,
MaxTime: maxt,
},
}
}

func (l *localClient) String() string {
mint, maxt := l.store.TimeRange()
return fmt.Sprintf(
"LabelSets: %v MinTime: %d MaxTime: %d",
labelpb.PromLabelSetsToString(l.LabelSets()), mint, maxt,
)
return l.store.String()
}

func (l *localClient) Addr() (string, bool) {
Expand Down
3 changes: 1 addition & 2 deletions pkg/receive/receive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (

"github.com/thanos-io/thanos/pkg/block/metadata"
"github.com/thanos-io/thanos/pkg/store"
"github.com/thanos-io/thanos/pkg/store/labelpb"
"github.com/thanos-io/thanos/pkg/testutil/custom"
)

Expand Down Expand Up @@ -835,7 +834,7 @@ func setupSetsOfExpectedAndActualStoreClientLabelSets(
testStore := store.TSDBStore{}
testStore.SetExtLset(expectedExternalLabelSets[i])

expectedClientLabelSets := labelpb.ZLabelSetsToPromLabelSets(testStore.LabelSet()...)
expectedClientLabelSets := testStore.LabelSet()
setOfExpectedClientLabelSets = append(setOfExpectedClientLabelSets, expectedClientLabelSets)

actualClientLabelSets := actualStoreClients[i].LabelSets()
Expand Down
Loading
Loading