Skip to content

Conversation

@cathteng
Copy link
Member

@cathteng cathteng commented Jan 5, 2026

We will not fire issue alert notifications for issue types that already have separate detectors (metric, crons, uptime), at least for the initial GA.

This means we should collect a singular detector and only fallback to the issue stream detector if no directly associated detector exists.

@cathteng cathteng requested a review from a team as a code owner January 5, 2026 20:52
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jan 5, 2026
try:
if issue_occurrence is None or evt.group.issue_type.detector_settings is None:
# if there are no detector settings, default to the error detector
if issue_occurrence is None or evt.group.issue_type == ErrorGroupType:
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed checking detector settings here because we will fall back to issue stream detector in logic outside of this function

Copy link
Member Author

Choose a reason for hiding this comment

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

Also because any detector that has not been created yet will have None for detector_settings by default

@override_options({"workflow_engine.exclude_issue_stream_detector": False})
def test_multiple_detectors(self) -> None:
issue_stream_workflow, issue_stream_detector, _, _ = self.create_detector_and_workflow(
def test_multiple_detectors__preferred(self) -> None:
Copy link
Member

Choose a reason for hiding this comment

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

Should we test that we're not getting back any metric detectors?

Copy link
Member Author

Choose a reason for hiding this comment

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

We only get back the error detector as the preferred detector. The only other possible detector we get back would be the issue stream detector given that we only return 1 specific detector

@cathteng cathteng marked this pull request as draft January 5, 2026 21:19
@cathteng cathteng marked this pull request as ready for review January 6, 2026 01:14
@cathteng cathteng requested review from a team, kcons and saponifi3d January 6, 2026 01:14
@cathteng cathteng requested a review from a team as a code owner January 6, 2026 23:27

from sentry.notifications.notification_action.utils import should_fire_workflow_actions
from sentry.workflow_engine.processors.detector import get_detector_from_event_data
from sentry.workflow_engine.processors.detector import get_specific_detector

This comment was marked as outdated.

@cathteng cathteng enabled auto-merge (squash) January 7, 2026 17:50
@cathteng cathteng merged commit b0c413d into master Jan 7, 2026
65 checks passed
@cathteng cathteng deleted the cathy/aci/preferred-detector branch January 7, 2026 18:13
@cathteng cathteng added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Jan 7, 2026
@getsentry-bot
Copy link
Contributor

PR reverted: d272a54

getsentry-bot added a commit that referenced this pull request Jan 7, 2026
@cathteng cathteng restored the cathy/aci/preferred-detector branch January 7, 2026 22:10
@github-actions github-actions bot locked and limited conversation to collaborators Jan 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components Trigger: Revert Add to a merged PR to revert it (skips CI)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants