-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
fix(aci): use singular preferred detector in workflow processing #105674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| 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: |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
064ff81 to
c548a6f
Compare
|
|
||
| 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.
This comment was marked as outdated.
Sorry, something went wrong.
|
PR reverted: d272a54 |
…ing (#105674)" This reverts commit b0c413d. Co-authored-by: cathteng <[email protected]>
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.