From 1913d0b54dafb61bec6d989f82e1d9fe767d8880 Mon Sep 17 00:00:00 2001 From: Matt Cottingham Date: Wed, 5 Jun 2019 15:55:46 +0100 Subject: [PATCH] Update MultiError import for tsdb 0.8.0 --- pkg/compact/compact.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/compact/compact.go b/pkg/compact/compact.go index b2177cb865..61a9f0be1d 100644 --- a/pkg/compact/compact.go +++ b/pkg/compact/compact.go @@ -21,6 +21,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/tsdb" + terrors "github.com/prometheus/tsdb/errors" "github.com/prometheus/tsdb/labels" ) @@ -613,7 +614,7 @@ func (e HaltError) Error() string { // IsHaltError returns true if the base error is a HaltError. // If a multierror is passed, any halt error will return true. func IsHaltError(err error) bool { - if multiErr, ok := err.(tsdb.MultiError); ok { + if multiErr, ok := err.(terrors.MultiError); ok { for _, err := range multiErr { if _, ok := errors.Cause(err).(HaltError); ok { return true @@ -646,7 +647,7 @@ func (e RetryError) Error() string { // IsRetryError returns true if the base error is a RetryError. // If a multierror is passed, all errors must be retriable. func IsRetryError(err error) bool { - if multiErr, ok := err.(tsdb.MultiError); ok { + if multiErr, ok := err.(terrors.MultiError); ok { for _, err := range multiErr { if _, ok := errors.Cause(err).(RetryError); !ok { return false @@ -1055,7 +1056,7 @@ func (c *BucketCompactor) Compact(ctx context.Context) error { close(errChan) workCtxCancel() if err != nil { - errs := tsdb.MultiError{err} + errs := terrors.MultiError{err} // Collect any other errors reported by the workers. for e := range errChan { errs.Add(e)