From e1795644a8483377065aa2c373dc5cc6273f41ad Mon Sep 17 00:00:00 2001 From: shantanualshi Date: Wed, 1 Nov 2023 15:43:53 +0530 Subject: [PATCH] Remove deprecated ruler_remote_write_queue_min_backoff, ruler_remote_write_queue_max_backoff and ruler_remote_write_queue_retry_on_ratelimit --- docs/sources/configure/_index.md | 12 ---------- docs/sources/operations/overrides-exporter.md | 2 -- pkg/ruler/compat.go | 3 --- pkg/ruler/registry.go | 12 ---------- pkg/validation/limits.go | 24 ------------------- .../checker/checker_test.go | 9 ------- .../deprecated-config.yaml | 3 --- .../test-fixtures/config.yaml | 3 --- .../test-fixtures/runtime-config.yaml | 3 --- 9 files changed, 71 deletions(-) diff --git a/docs/sources/configure/_index.md b/docs/sources/configure/_index.md index 706ac1d53e86d..4c6b5ddc738a8 100644 --- a/docs/sources/configure/_index.md +++ b/docs/sources/configure/_index.md @@ -2807,18 +2807,6 @@ The `limits_config` block configures global and per-tenant limits in Loki. # will wait in buffer. [ruler_remote_write_queue_batch_send_deadline: ] -# Deprecated: Use 'ruler_remote_write_config' instead. Initial retry delay. Gets -# doubled for every retry. -[ruler_remote_write_queue_min_backoff: ] - -# Deprecated: Use 'ruler_remote_write_config' instead. Maximum retry delay. -[ruler_remote_write_queue_max_backoff: ] - -# Deprecated: Use 'ruler_remote_write_config' instead. Retry upon receiving a -# 429 status code from the remote-write storage. This is experimental and might -# change in the future. -[ruler_remote_write_queue_retry_on_ratelimit: ] - # Deprecated: Use 'ruler_remote_write_config' instead. Configures AWS's # Signature Verification 4 signing process to sign every remote write request. ruler_remote_write_sigv4_config: diff --git a/docs/sources/operations/overrides-exporter.md b/docs/sources/operations/overrides-exporter.md index 5f0ee8bf04a23..225b113ece8ab 100644 --- a/docs/sources/operations/overrides-exporter.md +++ b/docs/sources/operations/overrides-exporter.md @@ -75,9 +75,7 @@ loki_overrides_defaults{limit_name="ruler_max_rule_groups_per_tenant"} 0 loki_overrides_defaults{limit_name="ruler_max_rules_per_rule_group"} 0 loki_overrides_defaults{limit_name="ruler_remote_write_queue_batch_send_deadline"} 0 loki_overrides_defaults{limit_name="ruler_remote_write_queue_capacity"} 0 -loki_overrides_defaults{limit_name="ruler_remote_write_queue_max_backoff"} 0 loki_overrides_defaults{limit_name="ruler_remote_write_queue_max_samples_per_send"} 0 -loki_overrides_defaults{limit_name="ruler_remote_write_queue_min_backoff"} 0 loki_overrides_defaults{limit_name="split_queries_by_interval"} 0 ``` diff --git a/pkg/ruler/compat.go b/pkg/ruler/compat.go index 2abde21c0f099..83ca2edb0ff91 100644 --- a/pkg/ruler/compat.go +++ b/pkg/ruler/compat.go @@ -43,9 +43,6 @@ type RulesLimits interface { RulerRemoteWriteQueueCapacity(userID string) int RulerRemoteWriteQueueMaxSamplesPerSend(userID string) int RulerRemoteWriteQueueBatchSendDeadline(userID string) time.Duration - RulerRemoteWriteQueueMinBackoff(userID string) time.Duration - RulerRemoteWriteQueueMaxBackoff(userID string) time.Duration - RulerRemoteWriteQueueRetryOnRateLimit(userID string) bool RulerRemoteWriteSigV4Config(userID string) *sigv4.SigV4Config RulerRemoteEvaluationTimeout(userID string) time.Duration diff --git a/pkg/ruler/registry.go b/pkg/ruler/registry.go index 9cb73ffd5eac4..8c19c2d10ba1a 100644 --- a/pkg/ruler/registry.go +++ b/pkg/ruler/registry.go @@ -262,22 +262,10 @@ func (r *walRegistry) getTenantRemoteWriteConfig(tenant string, base RemoteWrite clt.QueueConfig.MaxSamplesPerSend = v } - if v := r.overrides.RulerRemoteWriteQueueMinBackoff(tenant); v > 0 { - clt.QueueConfig.MinBackoff = model.Duration(v) - } - - if v := r.overrides.RulerRemoteWriteQueueMaxBackoff(tenant); v > 0 { - clt.QueueConfig.MaxBackoff = model.Duration(v) - } - if v := r.overrides.RulerRemoteWriteQueueBatchSendDeadline(tenant); v > 0 { clt.QueueConfig.BatchSendDeadline = model.Duration(v) } - if v := r.overrides.RulerRemoteWriteQueueRetryOnRateLimit(tenant); v { - clt.QueueConfig.RetryOnRateLimit = v - } - if v := r.overrides.RulerRemoteWriteSigV4Config(tenant); v != nil { clt.SigV4Config = v } diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index 3ac4822796523..afe9a1b3c4215 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -138,12 +138,6 @@ type Limits struct { // deprecated use RulerRemoteWriteConfig instead RulerRemoteWriteQueueBatchSendDeadline time.Duration `yaml:"ruler_remote_write_queue_batch_send_deadline" json:"ruler_remote_write_queue_batch_send_deadline" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum time a sample will wait in buffer."` // deprecated use RulerRemoteWriteConfig instead - RulerRemoteWriteQueueMinBackoff time.Duration `yaml:"ruler_remote_write_queue_min_backoff" json:"ruler_remote_write_queue_min_backoff" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Initial retry delay. Gets doubled for every retry."` - // deprecated use RulerRemoteWriteConfig instead - RulerRemoteWriteQueueMaxBackoff time.Duration `yaml:"ruler_remote_write_queue_max_backoff" json:"ruler_remote_write_queue_max_backoff" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Maximum retry delay."` - // deprecated use RulerRemoteWriteConfig instead - RulerRemoteWriteQueueRetryOnRateLimit bool `yaml:"ruler_remote_write_queue_retry_on_ratelimit" json:"ruler_remote_write_queue_retry_on_ratelimit" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Retry upon receiving a 429 status code from the remote-write storage. This is experimental and might change in the future."` - // deprecated use RulerRemoteWriteConfig instead RulerRemoteWriteSigV4Config *sigv4.SigV4Config `yaml:"ruler_remote_write_sigv4_config" json:"ruler_remote_write_sigv4_config" doc:"deprecated|description=Use 'ruler_remote_write_config' instead. Configures AWS's Signature Verification 4 signing process to sign every remote write request."` RulerRemoteWriteConfig map[string]config.RemoteWriteConfig `yaml:"ruler_remote_write_config,omitempty" json:"ruler_remote_write_config,omitempty" doc:"description=Configures global and per-tenant limits for remote write clients. A map with remote client id as key."` @@ -639,24 +633,6 @@ func (o *Overrides) RulerRemoteWriteQueueBatchSendDeadline(userID string) time.D return o.getOverridesForUser(userID).RulerRemoteWriteQueueBatchSendDeadline } -// Deprecated: use RulerRemoteWriteConfig instead -// RulerRemoteWriteQueueMinBackoff returns the minimum time for an exponential backoff for a given user. -func (o *Overrides) RulerRemoteWriteQueueMinBackoff(userID string) time.Duration { - return o.getOverridesForUser(userID).RulerRemoteWriteQueueMinBackoff -} - -// Deprecated: use RulerRemoteWriteConfig instead -// RulerRemoteWriteQueueMaxBackoff returns the maximum time for an exponential backoff for a given user. -func (o *Overrides) RulerRemoteWriteQueueMaxBackoff(userID string) time.Duration { - return o.getOverridesForUser(userID).RulerRemoteWriteQueueMaxBackoff -} - -// Deprecated: use RulerRemoteWriteConfig instead -// RulerRemoteWriteQueueRetryOnRateLimit returns whether to retry failed remote-write requests (429 response) for a given user. -func (o *Overrides) RulerRemoteWriteQueueRetryOnRateLimit(userID string) bool { - return o.getOverridesForUser(userID).RulerRemoteWriteQueueRetryOnRateLimit -} - // Deprecated: use RulerRemoteWriteConfig instead func (o *Overrides) RulerRemoteWriteSigV4Config(userID string) *sigv4.SigV4Config { return o.getOverridesForUser(userID).RulerRemoteWriteSigV4Config diff --git a/tools/deprecated-config-checker/checker/checker_test.go b/tools/deprecated-config-checker/checker/checker_test.go index 7147b7b309ee0..f7f5993b182cb 100644 --- a/tools/deprecated-config-checker/checker/checker_test.go +++ b/tools/deprecated-config-checker/checker/checker_test.go @@ -52,9 +52,6 @@ var ( "limits_config.ruler_remote_write_queue_capacity", "limits_config.ruler_remote_write_queue_max_samples_per_send", "limits_config.ruler_remote_write_queue_batch_send_deadline", - "limits_config.ruler_remote_write_queue_min_backoff", - "limits_config.ruler_remote_write_queue_max_backoff", - "limits_config.ruler_remote_write_queue_retry_on_ratelimit", "limits_config.ruler_remote_write_sigv4_config", "limits_config.per_tenant_override_config", "limits_config.per_tenant_override_period", @@ -87,9 +84,6 @@ var ( "overrides.foo.ruler_remote_write_queue_capacity", "overrides.foo.ruler_remote_write_queue_max_samples_per_send", "overrides.foo.ruler_remote_write_queue_batch_send_deadline", - "overrides.foo.ruler_remote_write_queue_min_backoff", - "overrides.foo.ruler_remote_write_queue_max_backoff", - "overrides.foo.ruler_remote_write_queue_retry_on_ratelimit", "overrides.foo.ruler_remote_write_sigv4_config", "overrides.foo.per_tenant_override_config", "overrides.foo.per_tenant_override_period", @@ -101,9 +95,6 @@ var ( "overrides.bar.ruler_remote_write_queue_capacity", "overrides.bar.ruler_remote_write_queue_max_samples_per_send", "overrides.bar.ruler_remote_write_queue_batch_send_deadline", - "overrides.bar.ruler_remote_write_queue_min_backoff", - "overrides.bar.ruler_remote_write_queue_max_backoff", - "overrides.bar.ruler_remote_write_queue_retry_on_ratelimit", "overrides.bar.ruler_remote_write_sigv4_config", "overrides.bar.per_tenant_override_config", "overrides.bar.per_tenant_override_period", diff --git a/tools/deprecated-config-checker/deprecated-config.yaml b/tools/deprecated-config-checker/deprecated-config.yaml index 956c81ab4f02d..971e15ecb934e 100644 --- a/tools/deprecated-config-checker/deprecated-config.yaml +++ b/tools/deprecated-config-checker/deprecated-config.yaml @@ -54,9 +54,6 @@ limits_config: ruler_remote_write_queue_capacity: "Use ruler_remote_write_config instead." ruler_remote_write_queue_max_samples_per_send: "Use ruler_remote_write_config instead." ruler_remote_write_queue_batch_send_deadline: "Use ruler_remote_write_config instead." - ruler_remote_write_queue_min_backoff: "Use ruler_remote_write_config instead." - ruler_remote_write_queue_max_backoff: "Use ruler_remote_write_config instead." - ruler_remote_write_queue_retry_on_ratelimit: "Use ruler_remote_write_config instead." ruler_remote_write_sigv4_config: "Use ruler_remote_write_config instead." per_tenant_override_config: "Feature renamed to 'runtime configuration', flag deprecated in favor of runtime_config.file" per_tenant_override_period: "Feature renamed to 'runtime configuration', flag deprecated in favor of runtime_config.period" diff --git a/tools/deprecated-config-checker/test-fixtures/config.yaml b/tools/deprecated-config-checker/test-fixtures/config.yaml index 0c861c19c3ac1..39cc0928bae1c 100644 --- a/tools/deprecated-config-checker/test-fixtures/config.yaml +++ b/tools/deprecated-config-checker/test-fixtures/config.yaml @@ -123,9 +123,6 @@ limits_config: ruler_remote_write_queue_capacity: 10 # DEPRECATED ruler_remote_write_queue_max_samples_per_send: 50 # DEPRECATED ruler_remote_write_queue_batch_send_deadline: 10m # DEPRECATED - ruler_remote_write_queue_min_backoff: 1m # DEPRECATED - ruler_remote_write_queue_max_backoff: 5m # DEPRECATED - ruler_remote_write_queue_retry_on_ratelimit: true # DEPRECATED ruler_remote_write_sigv4_config: # DEPRECATED region: "wherever" per_tenant_override_config: ./overrides.yaml # DEPRECATED diff --git a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml index 71ce9645c2df0..1436e415015b1 100644 --- a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml +++ b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml @@ -8,9 +8,6 @@ overrides: ruler_remote_write_queue_capacity: 10 # DEPRECATED ruler_remote_write_queue_max_samples_per_send: 50 # DEPRECATED ruler_remote_write_queue_batch_send_deadline: 10m # DEPRECATED - ruler_remote_write_queue_min_backoff: 1m # DEPRECATED - ruler_remote_write_queue_max_backoff: 5m # DEPRECATED - ruler_remote_write_queue_retry_on_ratelimit: true # DEPRECATED ruler_remote_write_sigv4_config: # DEPRECATED region: "wherever" per_tenant_override_config: ./overrides.yaml # DEPRECATED