-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(workflow_engine): Add registry hook for Activity creation #93522
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
…t created the change
…ssagedata diretly
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #93522 +/- ##
========================================
Coverage 88.00% 88.01%
========================================
Files 10319 10321 +2
Lines 594699 594923 +224
Branches 23129 23129
========================================
+ Hits 523376 523596 +220
- Misses 70830 70834 +4
Partials 493 493 |
… in update_status. if there's a new activity, get the latest event and trigger the registry
…ue for 'activity_type'
latest_activity = Activity.objects.filter( | ||
group_id=group.id, type=activity_type.value | ||
).order_by("-datetime") |
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.
don't really like adding this query -- but it's a lot easier than trying to proxy the activity back up through update_group_status
as that would require a fairly large change. open to suggestions though 🙏
## Description Starting implementation for: https://www.notion.so/sentry/Workflow-Status-Changes-1fa8b10e4b5d80a48acddb95d160da1f?source=copy_link#1fa8b10e4b5d80e6bb1aef39cab2c6dc This will add a registry of handlers when an activity is created, we'll use this in the [workflow engine to kick-off a task](#93553) to execute `process_workflows`. This also adds a way to pass the detector_id through the StatusMessageData all the way to a hook that we can invoke and read directly from the StatusMessageData later. We are also passed the `activity` so `workflow_engine` can trigger `.send_notification` (if evaluated to do so).
## Description Starting implementation for: https://www.notion.so/sentry/Workflow-Status-Changes-1fa8b10e4b5d80a48acddb95d160da1f?source=copy_link#1fa8b10e4b5d80e6bb1aef39cab2c6dc This will add a registry of handlers when an activity is created, we'll use this in the [workflow engine to kick-off a task](#93553) to execute `process_workflows`. This also adds a way to pass the detector_id through the StatusMessageData all the way to a hook that we can invoke and read directly from the StatusMessageData later. We are also passed the `activity` so `workflow_engine` can trigger `.send_notification` (if evaluated to do so).
Description
Starting implementation for: https://www.notion.so/sentry/Workflow-Status-Changes-1fa8b10e4b5d80a48acddb95d160da1f?source=copy_link#1fa8b10e4b5d80e6bb1aef39cab2c6dc
This will add a registry of handlers when an activity is created, we'll use this in the workflow engine to kick-off a task to execute
process_workflows
.This also adds a way to pass the detector_id through the StatusMessageData all the way to a hook that we can invoke and read directly from the StatusMessageData later. We are also passed the
activity
soworkflow_engine
can trigger.send_notification
(if evaluated to do so).