Skip to content

Commit 9b71f5c

Browse files
committed
chore(events): Clean up preprocess option (1/3)
Putting up PRs to clean up the preprocess option. I'll probably let the option sit for a day or two longer just to be safe, but wanted to get this out of the way. Steps: 1. Clean up usages 2. Clean up options-automator declaration 3. Clean up sentry declaration This is PR 1/3.
1 parent f304aff commit 9b71f5c

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

src/sentry/options/defaults.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,6 @@
842842
)
843843
register("snuba.search.hits-sample-size", default=100, flags=FLAG_AUTOMATOR_MODIFIABLE)
844844
register("snuba.track-outcomes-sample-rate", default=0.0, flags=FLAG_AUTOMATOR_MODIFIABLE)
845-
register("snuba.preprocess-group-redirects", default=False, flags=FLAG_AUTOMATOR_MODIFIABLE)
846845

847846
# The percentage of tagkeys that we want to cache. Set to 1.0 in order to cache everything, <=0.0 to stop caching
848847
register(

src/sentry/utils/snuba.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from snuba_sdk.legacy import json_to_snql
2828
from snuba_sdk.query import SelectableExpression
2929

30-
from sentry import options
3130
from sentry.api.helpers.error_upsampling import (
3231
UPSAMPLED_ERROR_AGGREGATION,
3332
are_any_projects_error_upsampled,
@@ -928,7 +927,7 @@ def __init__(
928927
# account for merges, here we expand queries to include all group IDs that have
929928
# been merged together.
930929

931-
if options.get("snuba.preprocess-group-redirects") and self.dataset in {
930+
if self.dataset in {
932931
Dataset.Events,
933932
Dataset.IssuePlatform,
934933
}:

tests/sentry/utils/test_snuba.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from urllib3.exceptions import HTTPError, ReadTimeoutError
1010
from urllib3.response import HTTPResponse
1111

12-
from sentry import options
1312
from sentry.models.groupredirect import GroupRedirect
1413
from sentry.models.grouprelease import GroupRelease
1514
from sentry.models.project import Project
@@ -326,8 +325,6 @@ def test_preprocess_group_redirects(self) -> None:
326325
previous_group_id=g3.id,
327326
)
328327

329-
options.set("snuba.preprocess-group-redirects", True)
330-
331328
params = SnubaQueryParams(dataset=Dataset.Events, filter_keys={"group_id": {g1.id}})
332329
assert params.conditions[0] == ["group_id", "IN", {g1.id, g2.id, g3.id}]
333330

0 commit comments

Comments
 (0)