Skip to content

Commit c9aa5fa

Browse files
authored
🔧 chore(aci): remove async trigger action flag (#95609)
1 parent 011c36b commit c9aa5fa

File tree

5 files changed

+13
-25
lines changed

5 files changed

+13
-25
lines changed

src/sentry/features/temporary.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,6 @@ def register_temporary_features(manager: FeatureManager):
519519
manager.add("organizations:workflow-engine-ui-links", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
520520
# Use workflow engine serializers to return data for old rule / incident endpoints
521521
manager.add("organizations:workflow-engine-rule-serializers", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
522-
# Enable async processing of event workflows in a task rather than as part of post_process.
523-
manager.add("organizations:workflow-engine-post-process-async", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
524-
# Enable async processing of actions in a task rather than as part of post_process.
525-
manager.add("organizations:workflow-engine-action-trigger-async", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=False)
526522
# Enable EventUniqueUserFrequencyConditionWithConditions special alert condition
527523
manager.add("organizations:event-unique-user-frequency-condition-with-conditions", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
528524
# Use spans instead of transactions for dynamic sampling calculations. This will become the new default.

src/sentry/workflow_engine/processors/delayed_workflow.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from django.utils import timezone
1313
from pydantic import BaseModel, validator
1414

15-
from sentry import buffer, features, nodestore
15+
from sentry import buffer, nodestore
1616
from sentry.buffer.base import BufferField
1717
from sentry.db import models
1818
from sentry.eventstore.models import Event, GroupEvent
@@ -670,9 +670,6 @@ def fire_actions_for_groups(
670670

671671
# Feature check caching to keep us within the trace budget.
672672
should_trigger_actions = should_fire_workflow_actions(organization)
673-
should_trigger_actions_async = features.has(
674-
"organizations:workflow-engine-action-trigger-async", organization
675-
)
676673

677674
total_actions = 0
678675
with track_batch_performance(
@@ -751,13 +748,10 @@ def fire_actions_for_groups(
751748

752749
if should_trigger_actions:
753750
for action in filtered_actions:
754-
if should_trigger_actions_async:
755-
task_params = build_trigger_action_task_params(
756-
action, detector, workflow_event_data
757-
)
758-
trigger_action.delay(**task_params)
759-
else:
760-
action.trigger(workflow_event_data, detector)
751+
task_params = build_trigger_action_task_params(
752+
action, detector, workflow_event_data
753+
)
754+
trigger_action.delay(**task_params)
761755

762756
logger.info(
763757
"workflow_engine.delayed_workflow.triggered_actions_summary",

src/sentry/workflow_engine/processors/workflow.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,8 @@ def process_workflows(
439439
with sentry_sdk.start_span(op="workflow_engine.process_workflows.trigger_actions"):
440440
if should_trigger_actions:
441441
for action in actions:
442-
if features.has(
443-
"organizations:workflow-engine-action-trigger-async",
444-
organization,
445-
):
446-
task_params = build_trigger_action_task_params(action, detector, event_data)
447-
trigger_action.delay(**task_params)
448-
else:
449-
action.trigger(event_data, detector)
442+
task_params = build_trigger_action_task_params(action, detector, event_data)
443+
trigger_action.delay(**task_params)
450444
else:
451445
logger.info(
452446
"workflow_engine.triggered_actions",

tests/sentry/incidents/test_metric_issue_post_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from tests.sentry.workflow_engine.test_base import BaseWorkflowTest
2020

2121

22-
@patch("sentry.workflow_engine.processors.workflow.Action.trigger")
22+
@patch("sentry.workflow_engine.tasks.actions.trigger_action.delay")
2323
class MetricIssueIntegrationTest(BaseWorkflowTest, BaseMetricIssueTest):
2424
def setUp(self):
2525
super().setUp()

tests/sentry/workflow_engine/test_integration.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ def test_workflow_engine__workflows__no_flag(self):
197197
mock_process_workflow.assert_not_called()
198198

199199

200-
@with_feature("organizations:workflow-engine-action-trigger-async")
201200
@mock.patch("sentry.workflow_engine.processors.workflow.trigger_action.delay")
202201
@mock_redis_buffer()
203202
class TestWorkflowEngineIntegrationFromErrorPostProcess(BaseWorkflowIntegrationTest):
@@ -224,6 +223,11 @@ def with_feature_flags(self):
224223
):
225224
yield
226225

226+
@pytest.fixture(autouse=True)
227+
def with_tasks(self):
228+
with self.tasks():
229+
yield
230+
227231
def create_error_event(
228232
self,
229233
project=None,

0 commit comments

Comments
 (0)