chore!: Remove deprecated allow_deletes configuration option - #21808
Conversation
|
💻 Deploy preview available (chore!: Remove deprecated |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Removed option still classified as deprecated, not deleted
- Moved allow_deletes from deprecated to deleted checker config and updated the checker test expectations and fixtures accordingly.
Or push these changes by commenting:
@cursor push 95c3c4a482
Preview (95c3c4a482)
diff --git a/tools/deprecated-config-checker/checker/checker_test.go b/tools/deprecated-config-checker/checker/checker_test.go
--- a/tools/deprecated-config-checker/checker/checker_test.go
+++ b/tools/deprecated-config-checker/checker/checker_test.go
@@ -36,6 +36,7 @@
"compactor.shared_store_key_prefix",
"limits_config.enforce_metric_name",
"limits_config.ruler_evaluation_delay_duration",
+ "limits_config.allow_deletes",
}
expectedConfigDeprecates = []string{
@@ -64,7 +65,6 @@
"limits_config.ruler_remote_write_sigv4_config",
"limits_config.per_tenant_override_config",
"limits_config.per_tenant_override_period",
- "limits_config.allow_deletes",
"schema_config.configs.[1].store",
"schema_config.configs.[1].object_store",
"schema_config.configs.[2].store",
@@ -86,8 +86,10 @@
expectedRuntimeConfigDeletes = []string{
"overrides.foo.ruler_evaluation_delay_duration",
"overrides.foo.enforce_metric_name",
+ "overrides.foo.allow_deletes",
"overrides.bar.ruler_evaluation_delay_duration",
"overrides.bar.enforce_metric_name",
+ "overrides.bar.allow_deletes",
}
expectedRuntimeConfigDeprecates = []string{
@@ -107,7 +109,6 @@
"overrides.foo.ruler_remote_write_sigv4_config",
"overrides.foo.per_tenant_override_config",
"overrides.foo.per_tenant_override_period",
- "overrides.foo.allow_deletes",
"overrides.bar.unordered_writes",
"overrides.bar.ruler_remote_write_url",
"overrides.bar.ruler_remote_write_timeout",
@@ -124,7 +125,6 @@
"overrides.bar.ruler_remote_write_sigv4_config",
"overrides.bar.per_tenant_override_config",
"overrides.bar.per_tenant_override_period",
- "overrides.bar.allow_deletes",
}
)
diff --git a/tools/deprecated-config-checker/deleted-config.yaml b/tools/deprecated-config-checker/deleted-config.yaml
--- a/tools/deprecated-config-checker/deleted-config.yaml
+++ b/tools/deprecated-config-checker/deleted-config.yaml
@@ -50,3 +50,4 @@
limits_config:
ruler_evaluation_delay_duration: "This setting is removed."
enforce_metric_name: "This setting is removed."
+ allow_deletes: "Use deletion_mode per tenant configuration instead."
diff --git a/tools/deprecated-config-checker/deprecated-config.yaml b/tools/deprecated-config-checker/deprecated-config.yaml
--- a/tools/deprecated-config-checker/deprecated-config.yaml
+++ b/tools/deprecated-config-checker/deprecated-config.yaml
@@ -65,7 +65,6 @@
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"
- allow_deletes: "Use deletion_mode per tenant configuration instead."
server:
grpc_server_stats_tracking_enabled: "Deprecated, currently doesn't do anything, will be removed in a future version."
\ No newline at end of file
diff --git a/tools/deprecated-config-checker/test-fixtures/config.yaml b/tools/deprecated-config-checker/test-fixtures/config.yaml
--- a/tools/deprecated-config-checker/test-fixtures/config.yaml
+++ b/tools/deprecated-config-checker/test-fixtures/config.yaml
@@ -136,4 +136,4 @@
region: "wherever"
per_tenant_override_config: ./overrides.yaml # DEPRECATED
per_tenant_override_period: 5s # DEPRECATED
- allow_deletes: true # DEPRECATED
+ allow_deletes: true # DELETED
diff --git a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml
--- a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml
+++ b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml
@@ -20,7 +20,7 @@
region: "wherever"
per_tenant_override_config: ./overrides.yaml # DEPRECATED
per_tenant_override_period: 5s # DEPRECATED
- allow_deletes: true # DEPRECATED
+ allow_deletes: true # DELETED
"bar": *tenant_overrides
multi_kv_config:You can send follow-ups to the cloud agent here.
|
💻 Deploy preview deleted (chore!: Remove deprecated |
59dce36 to
bbd0402
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Autofix Details
Bugbot Autofix prepared fixes for both issues found in the latest run.
- ✅ Fixed: Test fixture missing entry expected by test assertion
- Restored the config fixture's limits_config.allow_deletes entry as a deleted option so the checker can report the expected deletion.
- ✅ Fixed: Orphaned deprecated CLI flag registration not removed
- Removed the lingering compactor.allow-deletes deprecated flag registration so the removed CLI option is no longer accepted.
Or push these changes by commenting:
@cursor push 45fd138486
Preview (45fd138486)
diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go
--- a/pkg/validation/limits.go
+++ b/pkg/validation/limits.go
@@ -498,9 +498,6 @@
f.StringVar(&l.DeletionMode, "compactor.deletion-mode", "filter-and-delete", "Deletion mode. Can be one of 'disabled', 'filter-only', or 'filter-and-delete'. When set to 'filter-only' or 'filter-and-delete', and if retention_enabled is true, then the log entry deletion API endpoints are available.")
- // Deprecated
- dskit_flagext.DeprecatedFlag(f, "compactor.allow-deletes", "Deprecated. Instead, see compactor.deletion-mode which is another per tenant configuration", util_log.Logger)
-
f.IntVar(&l.IndexGatewayShardSize, "index-gateway.shard-size", 0, "The shard size defines how many index gateways should be used by a tenant for querying. If the global shard factor is 0, the global shard factor is set to the deprecated -replication-factor for backwards compatibility reasons.")
f.Float64Var(&l.IndexGatewayMaxCapacity, "index-gateway.max-capacity", 1.0, "Experimental. Defines a fraction (between 0.0 and 1.0) of the total index gateways available for a each tenant. A value of 0.0 has the same effect as 1.0, meaning all available index gateways. This setting only applies to simple mode.")
diff --git a/tools/deprecated-config-checker/test-fixtures/config.yaml b/tools/deprecated-config-checker/test-fixtures/config.yaml
--- a/tools/deprecated-config-checker/test-fixtures/config.yaml
+++ b/tools/deprecated-config-checker/test-fixtures/config.yaml
@@ -136,3 +136,4 @@
region: "wherever"
per_tenant_override_config: ./overrides.yaml # DEPRECATED
per_tenant_override_period: 5s # DEPRECATED
+ allow_deletes: true # DELETEDYou can send follow-ups to the cloud agent here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Autofix Details
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Removed config not added to deleted-config registry
- Added allow_deletes to the deleted config registry and restored checker fixtures and expectations so config and runtime-config usages warn as deleted.
Or push these changes by commenting:
@cursor push 6ca293ec39
Preview (6ca293ec39)
diff --git a/tools/deprecated-config-checker/checker/checker_test.go b/tools/deprecated-config-checker/checker/checker_test.go
--- a/tools/deprecated-config-checker/checker/checker_test.go
+++ b/tools/deprecated-config-checker/checker/checker_test.go
@@ -34,6 +34,7 @@
"compactor.deletion_mode",
"compactor.shared_store",
"compactor.shared_store_key_prefix",
+ "limits_config.allow_deletes",
"limits_config.enforce_metric_name",
"limits_config.ruler_evaluation_delay_duration",
}
@@ -83,8 +84,10 @@
}
expectedRuntimeConfigDeletes = []string{
+ "overrides.foo.allow_deletes",
"overrides.foo.ruler_evaluation_delay_duration",
"overrides.foo.enforce_metric_name",
+ "overrides.bar.allow_deletes",
"overrides.bar.ruler_evaluation_delay_duration",
"overrides.bar.enforce_metric_name",
}
diff --git a/tools/deprecated-config-checker/deleted-config.yaml b/tools/deprecated-config-checker/deleted-config.yaml
--- a/tools/deprecated-config-checker/deleted-config.yaml
+++ b/tools/deprecated-config-checker/deleted-config.yaml
@@ -48,5 +48,6 @@
max_look_back_period: "Use global or per-tenant max_query_lookback configuration from limits_config."
limits_config:
+ allow_deletes: "Use deletion_mode per tenant configuration instead."
ruler_evaluation_delay_duration: "This setting is removed."
enforce_metric_name: "This setting is removed."
diff --git a/tools/deprecated-config-checker/test-fixtures/config.yaml b/tools/deprecated-config-checker/test-fixtures/config.yaml
--- a/tools/deprecated-config-checker/test-fixtures/config.yaml
+++ b/tools/deprecated-config-checker/test-fixtures/config.yaml
@@ -117,6 +117,7 @@
limits_config:
ingestion_rate_mb: 100
+ allow_deletes: true # DELETED
unordered_writes: true # DEPRECATED
enforce_metric_name: true # DELETED
ruler_evaluation_delay_duration: 1m # DELETED
diff --git a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml
--- a/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml
+++ b/tools/deprecated-config-checker/test-fixtures/runtime-config.yaml
@@ -1,6 +1,7 @@
overrides:
"foo": &tenant_overrides
ingestion_rate_mb: 100
+ allow_deletes: true # DELETED
unordered_writes: true # DEPRECATED
enforce_metric_name: true # DELETED
ruler_evaluation_delay_duration: 1m # DELETEDYou can send follow-ups to the cloud agent here.
63214f4 to
cd447fc
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Missing entries in expected runtime config deletes list
- Added the missing foo and bar allow_deletes runtime delete expectations so the checker test matches deleted-config.yaml.
Or push these changes by commenting:
@cursor push 3cf42ac5f4
Preview (3cf42ac5f4)
diff --git a/tools/deprecated-config-checker/checker/checker_test.go b/tools/deprecated-config-checker/checker/checker_test.go
--- a/tools/deprecated-config-checker/checker/checker_test.go
+++ b/tools/deprecated-config-checker/checker/checker_test.go
@@ -86,8 +86,10 @@
expectedRuntimeConfigDeletes = []string{
"overrides.foo.ruler_evaluation_delay_duration",
"overrides.foo.enforce_metric_name",
+ "overrides.foo.allow_deletes",
"overrides.bar.ruler_evaluation_delay_duration",
"overrides.bar.enforce_metric_name",
+ "overrides.bar.allow_deletes",
}
expectedRuntimeConfigDeprecates = []string{You can send follow-ups to the cloud agent here.
Reviewed by Cursor Bugbot for commit 862d1d6. Configure here.


Summary
The
-compactor.allow-deleteswas already deprecated and unused and only logged a warning.Note
Medium Risk
Removes a previously accepted config field/flag (
allow_deletes), which can cause startup/config-validation failures for deployments still setting it, but the runtime behavior was already controlled bydeletion_mode.Overview
Removes the deprecated
allow_deletesdelete toggle by deleting thelimits_config.allow_deletesYAML field and the-compactor.allow-deletesCLI flag (and associated warning/validation code), leavinglimits_config.deletion_modeas the supported control.Updates upgrade docs to call out the breaking change, and adjusts the deprecated-config checker to treat
allow_deletesas deleted/invalid (including test fixtures and delete lists).Reviewed by Cursor Bugbot for commit 32d6451. Bugbot is set up for automated code reviews on this repo. Configure here.