Skip to content

Conversation

@cathteng
Copy link
Member

Title

Should merge #102918 first. Also removes need for get_detectors_by_groupevents_bulk!

@cathteng cathteng requested review from a team as code owners November 10, 2025 18:56
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 10, 2025
@codecov
Copy link

codecov bot commented Nov 10, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
29559 1 29558 236
View the top 1 failed test(s) by shortest run time
tests.sentry.workflow_engine.processors.test_delayed_workflow.TestFireActionsForGroups::test_fire_actions_for_groups__fire_actions
Stack Traces | 33s run time
#x1B[1m#x1B[.../workflow_engine/processors/test_delayed_workflow.py#x1B[0m:926: in test_fire_actions_for_groups__fire_actions
    assert first_call_kwargs["detector_id"] == self.detector.id
#x1B[1m#x1B[31mE   KeyError: 'detector_id'#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

total_actions += len(filtered_actions)

fire_actions(filtered_actions, detector, workflow_event_data)
fire_actions(filtered_actions, workflow_event_data)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Invalid Events Trigger Failing Actions

Removing the detector existence check allows workflow fire histories to be created and actions to be triggered for events without detectors. Previously, events missing detectors were skipped with a warning. Now, trigger_action tasks will be queued and fail when get_detector_by_event raises Detector.DoesNotExist, causing unnecessary task failures and retries instead of gracefully handling missing detectors upfront.

Fix in Cursor Fix in Web


if detector is None:
detector = get_detector_by_event(event_data)
detector = get_detector_by_event(event_data)
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: Activity Actions Fail: Detector Type Mismatch

The unconditional call to get_detector_by_event raises TypeError for Activity events since it only supports GroupEvent. Previously, the detector was passed via detector_id parameter, avoiding this call for Activity-triggered actions. Now Activity events that trigger actions will fail when the async task attempts to fetch the detector.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants