Skip to content

Commit

Permalink
Make linter happy.
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
  • Loading branch information
pstibrany committed Feb 5, 2024
1 parent 526d274 commit f61fca3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/compactor/blocks_cleaner.go
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ type noopGaugeVec struct {
}

func newNoopGaugeVec() *noopGaugeVec {
return &noopGaugeVec{g: prometheus.NewGauge(prometheus.GaugeOpts{})}
return &noopGaugeVec{g: promauto.With(nil).NewGauge(prometheus.GaugeOpts{})}
}

func (n *noopGaugeVec) WithLabelValues(...string) prometheus.Gauge {
Expand Down
3 changes: 2 additions & 1 deletion pkg/compactor/blocks_cleaner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"github.com/grafana/dskit/services"
"github.com/oklog/ulid"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -1074,7 +1075,7 @@ func TestComputeCompactionJobs(t *testing.T) {

userBucket := bucket.NewUserBucketClient(user, bucketClient, nil)
// Mark block for no-compaction.
require.NoError(t, block.MarkForNoCompact(context.Background(), log.NewNopLogger(), userBucket, blockMarkedForNoCompact, block.CriticalNoCompactReason, "testing", prometheus.NewCounter(prometheus.CounterOpts{})))
require.NoError(t, block.MarkForNoCompact(context.Background(), log.NewNopLogger(), userBucket, blockMarkedForNoCompact, block.CriticalNoCompactReason, "testing", promauto.With(nil).NewCounter(prometheus.CounterOpts{})))

cleaner := NewBlocksCleaner(cfg, bucketClient, tsdb.AllUsers, cfgProvider, log.NewNopLogger(), nil)
split, merge, err := cleaner.computeCompactionJobs(context.Background(), user, userBucket, &index)
Expand Down

0 comments on commit f61fca3

Please sign in to comment.