Skip to content

Commit ed53f01

Browse files
committed
Revert "Use flagext module from grafana/dskit (cortexproject#4443)"
This reverts commit a9a96cb. Signed-off-by: Arve Knudsen <[email protected]>
1 parent a71ff2a commit ed53f01

File tree

90 files changed

+899
-82
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+899
-82
lines changed

cmd/cortex/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"time"
1414

1515
"github.com/go-kit/log/level"
16-
"github.com/grafana/dskit/flagext"
1716
"github.com/pkg/errors"
1817
"github.com/prometheus/client_golang/prometheus"
1918
"github.com/prometheus/common/version"
@@ -22,6 +21,7 @@ import (
2221

2322
"github.com/cortexproject/cortex/pkg/cortex"
2423
"github.com/cortexproject/cortex/pkg/util"
24+
"github.com/cortexproject/cortex/pkg/util/flagext"
2525
util_log "github.com/cortexproject/cortex/pkg/util/log"
2626
)
2727

cmd/test-exporter/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import (
66
"time"
77

88
"github.com/go-kit/log/level"
9-
"github.com/grafana/dskit/flagext"
109
"github.com/prometheus/client_golang/prometheus"
1110
"github.com/weaveworks/common/server"
1211
"github.com/weaveworks/common/tracing"
1312

1413
"github.com/cortexproject/cortex/pkg/testexporter/correctness"
14+
"github.com/cortexproject/cortex/pkg/util/flagext"
1515
"github.com/cortexproject/cortex/pkg/util/log"
1616
)
1717

integration/e2ecortex/storage.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ import (
66
"strings"
77

88
"github.com/go-kit/log"
9-
"github.com/grafana/dskit/flagext"
109
"github.com/oklog/ulid"
1110
"github.com/thanos-io/thanos/pkg/objstore"
1211

1312
"github.com/cortexproject/cortex/integration/e2e"
1413
e2edb "github.com/cortexproject/cortex/integration/e2e/db"
1514
"github.com/cortexproject/cortex/pkg/storage/bucket/s3"
15+
"github.com/cortexproject/cortex/pkg/util/flagext"
1616
)
1717

1818
type S3Client struct {

integration/s3_storage_client_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import (
1010
"net/url"
1111
"testing"
1212

13-
"github.com/grafana/dskit/flagext"
1413
"github.com/stretchr/testify/require"
1514

1615
"github.com/cortexproject/cortex/integration/e2e"
1716
e2edb "github.com/cortexproject/cortex/integration/e2e/db"
1817
s3 "github.com/cortexproject/cortex/pkg/chunk/aws"
1918
cortex_s3 "github.com/cortexproject/cortex/pkg/storage/bucket/s3"
19+
"github.com/cortexproject/cortex/pkg/util/flagext"
2020
)
2121

2222
func TestS3Client(t *testing.T) {

pkg/alertmanager/alertmanager.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515

1616
"github.com/go-kit/log"
1717
"github.com/go-kit/log/level"
18-
"github.com/grafana/dskit/flagext"
1918
"github.com/grafana/dskit/services"
2019
"github.com/pkg/errors"
2120
"github.com/prometheus/alertmanager/api"
@@ -49,6 +48,7 @@ import (
4948
"golang.org/x/time/rate"
5049

5150
"github.com/cortexproject/cortex/pkg/alertmanager/alertstore"
51+
"github.com/cortexproject/cortex/pkg/util/flagext"
5252
util_net "github.com/cortexproject/cortex/pkg/util/net"
5353
)
5454

pkg/alertmanager/alertmanager_ring.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88

99
"github.com/go-kit/log"
1010
"github.com/go-kit/log/level"
11-
"github.com/grafana/dskit/flagext"
1211
"github.com/grafana/dskit/kv"
1312

1413
"github.com/cortexproject/cortex/pkg/ring"
14+
"github.com/cortexproject/cortex/pkg/util/flagext"
1515
util_log "github.com/cortexproject/cortex/pkg/util/log"
1616
)
1717

pkg/alertmanager/api_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111

1212
"github.com/go-kit/log"
1313
"github.com/gorilla/mux"
14-
"github.com/grafana/dskit/flagext"
1514
"github.com/grafana/dskit/services"
1615
"github.com/pkg/errors"
1716
"github.com/prometheus/alertmanager/config"
@@ -25,6 +24,7 @@ import (
2524

2625
"github.com/cortexproject/cortex/pkg/alertmanager/alertspb"
2726
"github.com/cortexproject/cortex/pkg/alertmanager/alertstore/bucketclient"
27+
"github.com/cortexproject/cortex/pkg/util/flagext"
2828
util_log "github.com/cortexproject/cortex/pkg/util/log"
2929
)
3030

pkg/alertmanager/distributor_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
"time"
1515

1616
"github.com/go-kit/log"
17-
"github.com/grafana/dskit/flagext"
1817
"github.com/grafana/dskit/kv"
1918
"github.com/grafana/dskit/kv/consul"
2019
"github.com/grafana/dskit/services"
@@ -28,6 +27,7 @@ import (
2827

2928
"github.com/cortexproject/cortex/pkg/alertmanager/alertmanagerpb"
3029
"github.com/cortexproject/cortex/pkg/ring"
30+
"github.com/cortexproject/cortex/pkg/util/flagext"
3131
util_log "github.com/cortexproject/cortex/pkg/util/log"
3232
"github.com/cortexproject/cortex/pkg/util/test"
3333
)

pkg/alertmanager/multitenant.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/go-kit/log"
1717
"github.com/go-kit/log/level"
1818
"github.com/grafana/dskit/concurrency"
19-
"github.com/grafana/dskit/flagext"
2019
"github.com/grafana/dskit/kv"
2120
"github.com/grafana/dskit/services"
2221
"github.com/pkg/errors"
@@ -38,6 +37,7 @@ import (
3837
"github.com/cortexproject/cortex/pkg/ring/client"
3938
"github.com/cortexproject/cortex/pkg/tenant"
4039
"github.com/cortexproject/cortex/pkg/util"
40+
"github.com/cortexproject/cortex/pkg/util/flagext"
4141
util_log "github.com/cortexproject/cortex/pkg/util/log"
4242
)
4343

pkg/alertmanager/multitenant_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121

2222
"github.com/go-kit/log"
2323
"github.com/grafana/dskit/concurrency"
24-
"github.com/grafana/dskit/flagext"
2524
"github.com/grafana/dskit/kv/consul"
2625
"github.com/grafana/dskit/services"
2726
"github.com/prometheus/alertmanager/cluster/clusterpb"
@@ -47,6 +46,7 @@ import (
4746
"github.com/cortexproject/cortex/pkg/ring"
4847
"github.com/cortexproject/cortex/pkg/storage/bucket"
4948
"github.com/cortexproject/cortex/pkg/util"
49+
"github.com/cortexproject/cortex/pkg/util/flagext"
5050
"github.com/cortexproject/cortex/pkg/util/test"
5151
"github.com/cortexproject/cortex/pkg/util/validation"
5252
)

pkg/chunk/aws/dynamodb_storage_client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbiface"
2020
"github.com/go-kit/log/level"
2121
"github.com/grafana/dskit/backoff"
22-
"github.com/grafana/dskit/flagext"
2322
ot "github.com/opentracing/opentracing-go"
2423
otlog "github.com/opentracing/opentracing-go/log"
2524
"github.com/pkg/errors"
@@ -31,6 +30,7 @@ import (
3130
"github.com/cortexproject/cortex/pkg/chunk"
3231
chunk_util "github.com/cortexproject/cortex/pkg/chunk/util"
3332
"github.com/cortexproject/cortex/pkg/util"
33+
"github.com/cortexproject/cortex/pkg/util/flagext"
3434
"github.com/cortexproject/cortex/pkg/util/log"
3535
"github.com/cortexproject/cortex/pkg/util/math"
3636
"github.com/cortexproject/cortex/pkg/util/spanlogger"

pkg/chunk/aws/s3_storage_client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
v4 "github.com/aws/aws-sdk-go/aws/signer/v4"
2121
"github.com/aws/aws-sdk-go/service/s3"
2222
"github.com/aws/aws-sdk-go/service/s3/s3iface"
23-
"github.com/grafana/dskit/flagext"
2423
"github.com/minio/minio-go/v7/pkg/signer"
2524
"github.com/pkg/errors"
2625
"github.com/prometheus/client_golang/prometheus"
@@ -30,6 +29,7 @@ import (
3029
"github.com/cortexproject/cortex/pkg/chunk"
3130
cortex_s3 "github.com/cortexproject/cortex/pkg/storage/bucket/s3"
3231
"github.com/cortexproject/cortex/pkg/util"
32+
"github.com/cortexproject/cortex/pkg/util/flagext"
3333
)
3434

3535
const (

pkg/chunk/azure/blob_storage_client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import (
1212

1313
"github.com/Azure/azure-pipeline-go/pipeline"
1414
"github.com/Azure/azure-storage-blob-go/azblob"
15-
"github.com/grafana/dskit/flagext"
1615

1716
"github.com/cortexproject/cortex/pkg/chunk"
1817
chunk_util "github.com/cortexproject/cortex/pkg/chunk/util"
1918
"github.com/cortexproject/cortex/pkg/util"
19+
"github.com/cortexproject/cortex/pkg/util/flagext"
2020
"github.com/cortexproject/cortex/pkg/util/log"
2121
)
2222

pkg/chunk/cache/fifo_cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import (
1111
"github.com/dustin/go-humanize"
1212
"github.com/go-kit/log"
1313
"github.com/go-kit/log/level"
14-
"github.com/grafana/dskit/flagext"
1514
"github.com/pkg/errors"
1615
"github.com/prometheus/client_golang/prometheus"
1716
"github.com/prometheus/client_golang/prometheus/promauto"
1817

18+
"github.com/cortexproject/cortex/pkg/util/flagext"
1919
util_log "github.com/cortexproject/cortex/pkg/util/log"
2020
)
2121

pkg/chunk/cache/redis_client.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
"unsafe"
1111

1212
"github.com/go-redis/redis/v8"
13-
"github.com/grafana/dskit/flagext"
13+
14+
"github.com/cortexproject/cortex/pkg/util/flagext"
1415
)
1516

1617
// RedisConfig defines how a RedisCache should be constructed.

pkg/chunk/cassandra/fixtures.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import (
55
"io"
66
"os"
77

8-
"github.com/grafana/dskit/flagext"
9-
108
"github.com/cortexproject/cortex/pkg/chunk"
119
"github.com/cortexproject/cortex/pkg/chunk/testutils"
10+
"github.com/cortexproject/cortex/pkg/util/flagext"
1211
)
1312

1413
// GOCQL doesn't provide nice mocks, so we use a real Cassandra instance.

pkg/chunk/cassandra/storage_client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ import (
1313
"github.com/go-kit/log"
1414
"github.com/go-kit/log/level"
1515
"github.com/gocql/gocql"
16-
"github.com/grafana/dskit/flagext"
1716
"github.com/pkg/errors"
1817
"github.com/prometheus/client_golang/prometheus"
1918
"golang.org/x/sync/semaphore"
2019

2120
"github.com/cortexproject/cortex/pkg/chunk"
2221
"github.com/cortexproject/cortex/pkg/chunk/util"
22+
"github.com/cortexproject/cortex/pkg/util/flagext"
2323
util_log "github.com/cortexproject/cortex/pkg/util/log"
2424
)
2525

pkg/chunk/cassandra/storage_client_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import (
44
"testing"
55

66
"github.com/gocql/gocql"
7-
"github.com/grafana/dskit/flagext"
87
"github.com/stretchr/testify/assert"
98
"github.com/stretchr/testify/require"
9+
10+
"github.com/cortexproject/cortex/pkg/util/flagext"
1011
)
1112

1213
func TestConfig_setClusterConfig_noAuth(t *testing.T) {

pkg/chunk/chunk_store_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
"time"
1010

1111
"github.com/go-kit/log"
12-
"github.com/grafana/dskit/flagext"
1312
"github.com/pkg/errors"
1413
"github.com/prometheus/client_golang/prometheus"
1514
"github.com/prometheus/common/model"
@@ -21,6 +20,7 @@ import (
2120

2221
"github.com/cortexproject/cortex/pkg/chunk/cache"
2322
"github.com/cortexproject/cortex/pkg/chunk/encoding"
23+
"github.com/cortexproject/cortex/pkg/util/flagext"
2424
"github.com/cortexproject/cortex/pkg/util/validation"
2525
)
2626

pkg/chunk/purger/purger_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/grafana/dskit/flagext"
1211
"github.com/grafana/dskit/services"
1312
"github.com/prometheus/client_golang/prometheus"
1413
"github.com/prometheus/client_golang/prometheus/testutil"
@@ -18,6 +17,7 @@ import (
1817

1918
"github.com/cortexproject/cortex/pkg/chunk"
2019
"github.com/cortexproject/cortex/pkg/chunk/testutils"
20+
"github.com/cortexproject/cortex/pkg/util/flagext"
2121
util_log "github.com/cortexproject/cortex/pkg/util/log"
2222
"github.com/cortexproject/cortex/pkg/util/test"
2323
)

pkg/chunk/storage/caching_fixtures.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,14 @@ import (
55
"time"
66

77
"github.com/go-kit/log"
8-
"github.com/grafana/dskit/flagext"
98
"github.com/prometheus/client_golang/prometheus"
109

11-
"github.com/cortexproject/cortex/pkg/util/validation"
12-
10+
"github.com/cortexproject/cortex/pkg/chunk"
1311
"github.com/cortexproject/cortex/pkg/chunk/cache"
1412
"github.com/cortexproject/cortex/pkg/chunk/gcp"
15-
16-
"github.com/cortexproject/cortex/pkg/chunk"
1713
"github.com/cortexproject/cortex/pkg/chunk/testutils"
14+
"github.com/cortexproject/cortex/pkg/util/flagext"
15+
"github.com/cortexproject/cortex/pkg/util/validation"
1816
)
1917

2018
type fixture struct {

pkg/chunk/storage/factory_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import (
88
"time"
99

1010
"github.com/go-kit/log"
11-
"github.com/grafana/dskit/flagext"
1211
"github.com/prometheus/common/model"
1312
"github.com/stretchr/testify/require"
1413

1514
"github.com/cortexproject/cortex/pkg/chunk"
1615
"github.com/cortexproject/cortex/pkg/chunk/cassandra"
1716
"github.com/cortexproject/cortex/pkg/chunk/local"
17+
"github.com/cortexproject/cortex/pkg/util/flagext"
1818
"github.com/cortexproject/cortex/pkg/util/validation"
1919
)
2020

pkg/chunk/testutils/testutils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ import (
66
"strconv"
77
"time"
88

9-
"github.com/grafana/dskit/flagext"
109
"github.com/prometheus/common/model"
1110
"github.com/prometheus/prometheus/model/labels"
1211

1312
"github.com/cortexproject/cortex/pkg/chunk"
1413
"github.com/cortexproject/cortex/pkg/chunk/cache"
1514
promchunk "github.com/cortexproject/cortex/pkg/chunk/encoding"
1615
"github.com/cortexproject/cortex/pkg/ingester/client"
16+
"github.com/cortexproject/cortex/pkg/util/flagext"
1717
"github.com/cortexproject/cortex/pkg/util/validation"
1818
)
1919

pkg/compactor/compactor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"github.com/go-kit/log"
1717
"github.com/go-kit/log/level"
1818
"github.com/grafana/dskit/backoff"
19-
"github.com/grafana/dskit/flagext"
2019
"github.com/grafana/dskit/services"
2120
"github.com/pkg/errors"
2221
"github.com/prometheus/client_golang/prometheus"
@@ -33,6 +32,7 @@ import (
3332
cortex_tsdb "github.com/cortexproject/cortex/pkg/storage/tsdb"
3433
"github.com/cortexproject/cortex/pkg/storage/tsdb/bucketindex"
3534
"github.com/cortexproject/cortex/pkg/util"
35+
"github.com/cortexproject/cortex/pkg/util/flagext"
3636
util_log "github.com/cortexproject/cortex/pkg/util/log"
3737
)
3838

pkg/compactor/compactor_ring.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import (
66
"time"
77

88
"github.com/go-kit/log/level"
9-
"github.com/grafana/dskit/flagext"
109
"github.com/grafana/dskit/kv"
1110

1211
"github.com/cortexproject/cortex/pkg/ring"
12+
"github.com/cortexproject/cortex/pkg/util/flagext"
1313
util_log "github.com/cortexproject/cortex/pkg/util/log"
1414
)
1515

pkg/compactor/compactor_ring_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/grafana/dskit/flagext"
87
"github.com/stretchr/testify/assert"
98

109
"github.com/cortexproject/cortex/pkg/ring"
10+
"github.com/cortexproject/cortex/pkg/util/flagext"
1111
)
1212

1313
func TestRingConfig_DefaultConfigToLifecyclerConfig(t *testing.T) {

pkg/compactor/compactor_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919

2020
"github.com/go-kit/log"
2121
"github.com/grafana/dskit/concurrency"
22-
"github.com/grafana/dskit/flagext"
2322
"github.com/grafana/dskit/kv/consul"
2423
"github.com/grafana/dskit/services"
2524
"github.com/oklog/ulid"
@@ -39,6 +38,7 @@ import (
3938
"github.com/cortexproject/cortex/pkg/ring"
4039
"github.com/cortexproject/cortex/pkg/storage/bucket"
4140
cortex_tsdb "github.com/cortexproject/cortex/pkg/storage/tsdb"
41+
"github.com/cortexproject/cortex/pkg/util/flagext"
4242
cortex_testutil "github.com/cortexproject/cortex/pkg/util/test"
4343
"github.com/cortexproject/cortex/pkg/util/validation"
4444
)

0 commit comments

Comments
 (0)