Skip to content

chore!: Remove deprecated allow_deletes configuration option - #21808

Merged
chaudum merged 6 commits into
mainfrom
chaudum/remove-allow-deletes
May 12, 2026
Merged

chore!: Remove deprecated allow_deletes configuration option#21808
chaudum merged 6 commits into
mainfrom
chaudum/remove-allow-deletes

Conversation

@chaudum

@chaudum chaudum commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

The -compactor.allow-deletes was 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 by deletion_mode.

Overview
Removes the deprecated allow_deletes delete toggle by deleting the limits_config.allow_deletes YAML field and the -compactor.allow-deletes CLI flag (and associated warning/validation code), leaving limits_config.deletion_mode as the supported control.

Updates upgrade docs to call out the breaking change, and adjusts the deprecated-config checker to treat allow_deletes as 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.

@chaudum
chaudum requested a review from a team as a code owner May 11, 2026 12:43
@chaudum chaudum changed the title chore!: Remove deprecated allow_deletes limit May 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

💻 Deploy preview available (chore!: Remove deprecated allow_deletes limit):

paul1r
paul1r previously approved these changes May 11, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Create PR

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.

Comment thread pkg/validation/limits.go
@chaudum

chaudum commented May 11, 2026

Copy link
Copy Markdown
Contributor Author
@cla-assistant

cla-assistant Bot commented May 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

💻 Deploy preview deleted (chore!: Remove deprecated allow_deletes configuration option).

@chaudum
chaudum force-pushed the chaudum/remove-allow-deletes branch from 59dce36 to bbd0402 Compare May 11, 2026 13:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Create PR

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 # DELETED

You can send follow-ups to the cloud agent here.

Comment thread tools/deprecated-config-checker/test-fixtures/config.yaml
Comment thread pkg/validation/limits.go
paul1r
paul1r previously approved these changes May 11, 2026
@chaudum
chaudum enabled auto-merge (squash) May 11, 2026 13:34

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Create PR

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 # DELETED

You can send follow-ups to the cloud agent here.

Comment thread tools/deprecated-config-checker/deprecated-config.yaml

@JStickler JStickler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[docs team] Docs LGTM

@chaudum
chaudum force-pushed the chaudum/remove-allow-deletes branch from 63214f4 to cd447fc Compare May 12, 2026 08:08
@pull-request-size pull-request-size Bot added size/M and removed size/S labels May 12, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

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.

Create PR

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.

Comment thread tools/deprecated-config-checker/checker/checker_test.go
salvacorts
salvacorts previously approved these changes May 12, 2026
@chaudum
chaudum merged commit eb17156 into main May 12, 2026
85 checks passed
@chaudum
chaudum deleted the chaudum/remove-allow-deletes branch May 12, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4 participants