Skip to content

Commit

Permalink
Fixes after upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
  • Loading branch information
saswatamcode committed Nov 18, 2024
1 parent 1cf70d5 commit 10fd9d1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions cmd/thanos/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ func (b *erroringBucket) Name() string {
return b.bkt.Name()
}

// IterWithAttributes allows to iterate over objects in the bucket with their attributes.
func (b *erroringBucket) IterWithAttributes(ctx context.Context, dir string, f func(objstore.IterObjectAttributes) error, options ...objstore.IterOption) error {
return b.bkt.IterWithAttributes(ctx, dir, f, options...)
}

// SupportedIterOptions returns the supported iteration options.
func (b *erroringBucket) SupportedIterOptions() []objstore.IterOptionType {
return b.bkt.SupportedIterOptions()
}

// Ensures that downsampleBucket() stops its work properly
// after an error occurs with some blocks in the backlog.
// Testing for https://github.com/thanos-io/thanos/issues/4960.
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/query/v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ func processAnalysis(a *engine.AnalyzeOutputNode) queryTelemetry {
analysis.PeakSamples = a.PeakSamples()
analysis.TotalSamples = a.TotalSamples()
for _, c := range a.Children {
analysis.Children = append(analysis.Children, processAnalysis(&c))
analysis.Children = append(analysis.Children, processAnalysis(c))
}
return analysis
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/block/fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (f *RecursiveLister) GetActiveAndPartialBlockIDs(ctx context.Context, ch ch
case ch <- id:
}
return nil
}, objstore.WithRecursiveIter)
}, objstore.WithRecursiveIter())
return partialBlocks, err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/cache/groupcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func NewGroupcacheWithConfig(logger log.Logger, reg prometheus.Registerer, conf
if err := bucket.Iter(ctx, parsedData.Name, func(s string) error {
list = append(list, s)
return nil
}, objstore.WithRecursiveIter); err != nil {
}, objstore.WithRecursiveIter()); err != nil {
return err
}

Expand Down

0 comments on commit 10fd9d1

Please sign in to comment.