Skip to content

Commit ef1ceae

Browse files
jangjodiharshithadurai
authored andcommitted
ref(post-process): Use similarity project option instead of flag (#81054)
Replace feature flag check with project option check The feature flag handler checks the project option and was created to be used by the FE
1 parent 1e7cbbb commit ef1ceae

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sentry/tasks/post_process.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,8 +1205,8 @@ def process_plugins(job: PostProcessJob) -> None:
12051205

12061206

12071207
def process_similarity(job: PostProcessJob) -> None:
1208-
if job["is_reprocessed"] or features.has(
1209-
"projects:similarity-embeddings", job["event"].group.project
1208+
if job["is_reprocessed"] or job["event"].group.project.get_option(
1209+
"sentry:similarity_backfill_completed"
12101210
):
12111211
return
12121212

tests/sentry/tasks/test_post_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2436,9 +2436,9 @@ def assert_not_called_with(self, mock_function: Mock):
24362436
return
24372437
raise AssertionError("Expected safe_execute to not be called with similarity.record")
24382438

2439-
@with_feature("projects:similarity-embeddings")
24402439
@patch("sentry.tasks.post_process.safe_execute")
24412440
def test_skip_process_similarity(self, mock_safe_execute):
2441+
self.project.update_option("sentry:similarity_backfill_completed", int(time.time()))
24422442
event = self.create_event(data={}, project_id=self.project.id)
24432443

24442444
self.call_post_process_group(

0 commit comments

Comments
 (0)