Skip to content

Commit 4919be5

Browse files
committed
lint
Signed-off-by: Alan Protasio <alanprot@gmail.com>
1 parent 30dbe57 commit 4919be5

File tree

6 files changed

+12
-7
lines changed

6 files changed

+12
-7
lines changed

pkg/querier/blocks_finder_bucket_index.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ import (
44
"context"
55
"time"
66

7-
"github.com/cortexproject/cortex/pkg/util/validation"
87
"github.com/go-kit/log"
98
"github.com/oklog/ulid"
109
"github.com/pkg/errors"
1110
"github.com/prometheus/client_golang/prometheus"
1211
"github.com/thanos-io/objstore"
1312

13+
"github.com/cortexproject/cortex/pkg/util/validation"
14+
1415
"github.com/cortexproject/cortex/pkg/storage/bucket"
1516
"github.com/cortexproject/cortex/pkg/storage/tsdb/bucketindex"
1617
"github.com/cortexproject/cortex/pkg/util/services"

pkg/querier/blocks_finder_bucket_index_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/cortexproject/cortex/pkg/util/validation"
1110
"github.com/go-kit/log"
1211
"github.com/oklog/ulid"
1312
"github.com/stretchr/testify/assert"
1413
"github.com/stretchr/testify/require"
1514
"github.com/thanos-io/objstore"
1615

16+
"github.com/cortexproject/cortex/pkg/util/validation"
17+
1718
"github.com/cortexproject/cortex/pkg/storage/tsdb/bucketindex"
1819
cortex_testutil "github.com/cortexproject/cortex/pkg/storage/tsdb/testutil"
1920
"github.com/cortexproject/cortex/pkg/util/services"

pkg/storage/tsdb/bucketindex/loader_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ func TestLoader_ShouldUpdateIndexInBackgroundOnPreviousKeyAcessDenied(t *testing
604604
require.True(t, errors.Is(err, ErrCustomerManagedKeyError))
605605

606606
// Check cached
607-
loader.checkCachedIndexes(ctx)
607+
require.NoError(t, loader.checkCachedIndexes(ctx))
608608

609609
loader.bkt = bkt
610610

@@ -623,7 +623,7 @@ func TestLoader_ShouldUpdateIndexInBackgroundOnPreviousKeyAcessDenied(t *testing
623623
test.Poll(t, 3*time.Second, nil, func() interface{} {
624624
_, err := loader.GetIndex(ctx, "user-1")
625625
// Check cached
626-
loader.checkCachedIndexes(ctx)
626+
require.NoError(t, loader.checkCachedIndexes(ctx))
627627
return err
628628
})
629629

pkg/storage/tsdb/bucketindex/storage.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import (
66
"context"
77
"encoding/json"
88

9-
"github.com/cortexproject/cortex/pkg/storage/tsdb"
109
"github.com/go-kit/log"
1110
"github.com/pkg/errors"
1211
"github.com/thanos-io/objstore"
1312

13+
"github.com/cortexproject/cortex/pkg/storage/tsdb"
14+
1415
"github.com/cortexproject/cortex/pkg/storage/bucket"
1516
"github.com/cortexproject/cortex/pkg/util/runutil"
1617
)

pkg/storage/tsdb/bucketindex/updater.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"path"
88
"time"
99

10-
"github.com/cortexproject/cortex/pkg/storage/tsdb"
1110
"github.com/go-kit/log"
1211
"github.com/go-kit/log/level"
1312
"github.com/oklog/ulid"
@@ -16,6 +15,8 @@ import (
1615
"github.com/thanos-io/thanos/pkg/block"
1716
"github.com/thanos-io/thanos/pkg/block/metadata"
1817

18+
"github.com/cortexproject/cortex/pkg/storage/tsdb"
19+
1920
"github.com/cortexproject/cortex/pkg/storage/bucket"
2021
util_log "github.com/cortexproject/cortex/pkg/util/log"
2122
"github.com/cortexproject/cortex/pkg/util/runutil"

pkg/storage/tsdb/testutil/objstore.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ import (
66
"os"
77
"testing"
88

9-
"github.com/cortexproject/cortex/pkg/util"
109
"github.com/pkg/errors"
1110
"github.com/stretchr/testify/require"
1211
"github.com/thanos-io/objstore"
1312

13+
"github.com/cortexproject/cortex/pkg/util"
14+
1415
"github.com/cortexproject/cortex/pkg/storage/bucket/filesystem"
1516
)
1617

0 commit comments

Comments
 (0)