Skip to content

Commit a9a96cb

Browse files
authored
Use flagext module from grafana/dskit (#4443)
* Update vendor of grafana/dskit Signed-off-by: Nick Pillitteri <[email protected]> * Use flagext module from grafana/dskit This removes pkg/util/flagext and starts making use of the code from dskit. This is mostly a mechanical change with a few exceptions * Some extra configuration is now included anywhere we instantiate a weaveworks/common server due to upstream changes (this mostly happens in tests). * Lints for using util_log had to be disabled in some places so that deprecated CLI flags could be registered (which now requires a logger). Signed-off-by: Nick Pillitteri <[email protected]> * Documentation update for weaveworks/common/server Signed-off-by: Nick Pillitteri <[email protected]> * Code review changes Signed-off-by: Nick Pillitteri <[email protected]>
1 parent 2d4d060 commit a9a96cb

File tree

536 files changed

+26753
-4385
lines changed

Some content is hidden

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

536 files changed

+26753
-4385
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* [CHANGE] Compactor: compactor will no longer try to compact blocks that are already marked for deletion. Previously compactor would consider blocks marked for deletion within `-compactor.deletion-delay / 2` period as eligible for compaction. #4328
2323
* [CHANGE] Memberlist: forward only changes, not entire original message. #4419
2424
* [CHANGE] Memberlist: don't accept old tombstones as incoming change, and don't forward such messages to other gossip members. #4420
25+
* [CHANGE] The metric `cortex_deprecated_flags_inuse_total` has been renamed to `deprecated_flags_inuse_total` as part of using grafana/dskit functionality. #4443
2526
* [ENHANCEMENT] Add timeout for waiting on compactor to become ACTIVE in the ring. #4262
2627
* [ENHANCEMENT] Reduce memory used by streaming queries, particularly in ruler. #4341
2728
* [ENHANCEMENT] Ring: allow experimental configuration of disabling of heartbeat timeouts by setting the relevant configuration value to zero. Applies to the following: #4342

cmd/cortex/main.go

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

1515
"github.com/go-kit/kit/log/level"
16+
"github.com/grafana/dskit/flagext"
1617
"github.com/pkg/errors"
1718
"github.com/prometheus/client_golang/prometheus"
1819
"github.com/prometheus/common/version"
@@ -21,7 +22,6 @@ import (
2122

2223
"github.com/cortexproject/cortex/pkg/cortex"
2324
"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/kit/log/level"
9+
"github.com/grafana/dskit/flagext"
910
"github.com/prometheus/client_golang/prometheus"
1011
"github.com/weaveworks/common/server"
1112
"github.com/weaveworks/common/tracing"
1213

1314
"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

docs/configuration/config-file-reference.md

+8
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ query_scheduler:
268268
The `server_config` configures the HTTP and gRPC server of the launched service(s).
269269

270270
```yaml
271+
# HTTP server listen network, default tcp
272+
# CLI flag: -server.http-listen-network
273+
[http_listen_network: <string> | default = "tcp"]
274+
271275
# HTTP server listen address.
272276
# CLI flag: -server.http-listen-address
273277
[http_listen_address: <string> | default = ""]
@@ -280,6 +284,10 @@ The `server_config` configures the HTTP and gRPC server of the launched service(
280284
# CLI flag: -server.http-conn-limit
281285
[http_listen_conn_limit: <int> | default = 0]
282286
287+
# gRPC server listen network
288+
# CLI flag: -server.grpc-listen-network
289+
[grpc_listen_network: <string> | default = "tcp"]
290+
283291
# gRPC server listen address.
284292
# CLI flag: -server.grpc-listen-address
285293
[grpc_listen_address: <string> | default = ""]

go.mod

+16-13
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ require (
2525
github.com/go-redis/redis/v8 v8.9.0
2626
github.com/gocql/gocql v0.0.0-20200526081602-cd04bd7f22a7
2727
github.com/gogo/protobuf v1.3.2
28-
github.com/gogo/status v1.0.3
28+
github.com/gogo/status v1.1.0
2929
github.com/golang-migrate/migrate/v4 v4.7.0
3030
github.com/golang/protobuf v1.5.2
31-
github.com/golang/snappy v0.0.3
32-
github.com/gorilla/mux v1.7.3
33-
github.com/grafana/dskit v0.0.0-20210818123532-6645f87e9e12
34-
github.com/grpc-ecosystem/go-grpc-middleware v1.2.2
35-
github.com/hashicorp/consul/api v1.8.1
31+
github.com/golang/snappy v0.0.4
32+
github.com/gorilla/mux v1.8.0
33+
github.com/grafana/dskit v0.0.0-20210824090727-039d9afd9208
34+
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
35+
github.com/hashicorp/consul/api v1.9.1
3636
github.com/hashicorp/go-cleanhttp v0.5.1
3737
github.com/hashicorp/go-sockaddr v1.0.2
3838
github.com/hashicorp/memberlist v0.2.3
@@ -55,19 +55,19 @@ require (
5555
github.com/sony/gobreaker v0.4.1
5656
github.com/spf13/afero v1.2.2
5757
github.com/stretchr/testify v1.7.0
58-
github.com/thanos-io/thanos v0.19.1-0.20210729154440-aa148f8fdb28
58+
github.com/thanos-io/thanos v0.22.0
5959
github.com/uber/jaeger-client-go v2.29.1+incompatible
60-
github.com/weaveworks/common v0.0.0-20210419092856-009d1eebd624
61-
go.etcd.io/bbolt v1.3.5
62-
go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489
60+
github.com/weaveworks/common v0.0.0-20210722103813-e649eff5ab4a
61+
go.etcd.io/bbolt v1.3.6
62+
go.etcd.io/etcd v3.3.25+incompatible
6363
go.etcd.io/etcd/client/v3 v3.5.0
64-
go.etcd.io/etcd/server/v3 v3.5.0-alpha.0.0.20210225194612-fa82d11a958a
64+
go.etcd.io/etcd/server/v3 v3.5.0
6565
go.uber.org/atomic v1.9.0
6666
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b
6767
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
6868
golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6
69-
google.golang.org/api v0.48.0
70-
google.golang.org/grpc v1.38.0
69+
google.golang.org/api v0.50.0
70+
google.golang.org/grpc v1.39.0
7171
gopkg.in/yaml.v2 v2.4.0
7272
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
7373
sigs.k8s.io/yaml v1.2.0
@@ -85,3 +85,6 @@ replace github.com/gocql/gocql => github.com/grafana/gocql v0.0.0-20200605141915
8585

8686
// Using a 3rd-party branch for custom dialer - see https://github.com/bradfitz/gomemcache/pull/86
8787
replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab
88+
89+
// TODO review the change introduced by https://github.com/grpc/grpc-go/pull/4416 before upgrading to 1.39.0
90+
replace google.golang.org/grpc => google.golang.org/grpc v1.38.0

0 commit comments

Comments
 (0)