Skip to content

Commit 95574a9

Browse files
authored
chore(aci): allow feedback issues through workflow engine (#100153)
1 parent 71764ad commit 95574a9

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

src/sentry/tasks/post_process.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,7 @@ def kick_off_seer_automation(job: PostProcessJob) -> None:
17271727
feedback_filter_decorator(process_snoozes),
17281728
feedback_filter_decorator(process_inbox_adds),
17291729
feedback_filter_decorator(process_rules),
1730+
feedback_filter_decorator(process_workflow_engine_issue_alerts),
17301731
feedback_filter_decorator(process_resource_change_bounds),
17311732
],
17321733
GroupCategory.METRIC_ALERT: [
@@ -1739,6 +1740,7 @@ def kick_off_seer_automation(job: PostProcessJob) -> None:
17391740
process_inbox_adds,
17401741
kick_off_seer_automation,
17411742
process_rules,
1743+
process_workflow_engine_issue_alerts,
17421744
process_resource_change_bounds,
17431745
process_data_forwarding,
17441746
]

tests/sentry/workflow_engine/test_integration.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from sentry.grouping.grouptype import ErrorGroupType
1010
from sentry.incidents.grouptype import MetricIssue
1111
from sentry.incidents.utils.types import DATA_SOURCE_SNUBA_QUERY_SUBSCRIPTION
12+
from sentry.issues.grouptype import FeedbackGroup
1213
from sentry.issues.ingest import save_issue_occurrence
1314
from sentry.models.group import Group
1415
from sentry.rules.match import MatchType
@@ -524,3 +525,33 @@ def test_schedule_delayed_workflows_integration(self, mock_trigger: MagicMock) -
524525
)
525526
== {}
526527
)
528+
529+
530+
class TestWorkflowEngineIntegrationFromFeedbackPostProcess(BaseWorkflowIntegrationTest):
531+
@override_options({"workflow_engine.issue_alert.group.type_id.rollout": [6001]})
532+
@with_feature("organizations:workflow-engine-single-process-workflows")
533+
def test_workflow_engine(self) -> None:
534+
occurrence_data = self.build_occurrence_data(
535+
type=FeedbackGroup.type_id,
536+
event_id=self.event.event_id,
537+
project_id=self.project.id,
538+
evidence_data={
539+
"contact_email": "[email protected]",
540+
"message": "test",
541+
"name": "Name Test",
542+
"source": "new_feedback_envelope",
543+
"summary": "test",
544+
},
545+
)
546+
547+
self.occurrence, group_info = save_issue_occurrence(occurrence_data, self.event)
548+
assert group_info is not None
549+
550+
self.group = Group.objects.get(grouphash__hash=self.occurrence.fingerprint[0])
551+
assert self.group.type == FeedbackGroup.type_id
552+
553+
with mock.patch(
554+
"sentry.workflow_engine.tasks.workflows.process_workflows_event.apply_async"
555+
) as mock_process_workflow:
556+
self.call_post_process_group(self.group.id)
557+
mock_process_workflow.assert_called_once()

0 commit comments

Comments
 (0)