Skip to content

Commit

Permalink
[Querier] Deprecate -querier.compress-http-responses-deprecated (#3544
Browse files Browse the repository at this point in the history
)

* [Querier] Deprecate `-querier.compress-http-responses`

In favour of `-api.response-compression-enabled` which apply to every
other API endpoint we register.

Signed-off-by: gotjosh <[email protected]>

* 1.8 since we're cutting 1.6 when this goes out

Signed-off-by: gotjosh <[email protected]>
  • Loading branch information
gotjosh authored and jtlisi committed Dec 9, 2020
1 parent 1b2b989 commit e8dbbd3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## 1.6.0-rc.0

* [CHANGE] Query Frontend: deprecate `-querier.compress-http-responses` in favour of `-api.response-compression-enabled`. #3544
* [CHANGE] Querier: deprecated `-store.max-look-back-period`. You should use `-querier.max-query-lookback` instead. #3452
* [CHANGE] Blocks storage: increased `-blocks-storage.bucket-store.chunks-cache.attributes-ttl` default from `24h` to `168h` (1 week). #3528
* [CHANGE] Blocks storage: the config option `-blocks-storage.bucket-store.index-cache.postings-compression-enabled` has been deprecated and postings compression is always enabled. #3538
Expand Down
3 changes: 2 additions & 1 deletion docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,8 @@ grpc_client_config:
# CLI flag: -frontend.instance-interface-names
[instance_interface_names: <list of string> | default = [eth0 en0]]
# Compress HTTP responses.
# This flag is about to be deprecated. Please use
# -api.response-compression-enabled instead.
# CLI flag: -querier.compress-http-responses
[compress_responses: <boolean> | default = false]
Expand Down
10 changes: 7 additions & 3 deletions pkg/frontend/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,20 @@ type CombinedFrontendConfig struct {
FrontendV1 v1.Config `yaml:",inline"`
FrontendV2 v2.Config `yaml:",inline"`

CompressResponses bool `yaml:"compress_responses"`
DownstreamURL string `yaml:"downstream_url"`
// Deprecated. Replaced with pkg/api/Config.ResponseCompression field.
// TODO: To be removed in Cortex 1.8.
CompressResponses bool `yaml:"compress_responses"`

DownstreamURL string `yaml:"downstream_url"`
}

func (cfg *CombinedFrontendConfig) RegisterFlags(f *flag.FlagSet) {
cfg.Handler.RegisterFlags(f)
cfg.FrontendV1.RegisterFlags(f)
cfg.FrontendV2.RegisterFlags(f)

f.BoolVar(&cfg.CompressResponses, "querier.compress-http-responses", false, "Compress HTTP responses.")
f.BoolVar(&cfg.CompressResponses, "querier.compress-http-responses", false, "This flag is about to be deprecated. Please use -api.response-compression-enabled instead.")

f.StringVar(&cfg.DownstreamURL, "frontend.downstream-url", "", "URL of downstream Prometheus.")
}

Expand Down

0 comments on commit e8dbbd3

Please sign in to comment.