Skip to content

Conversation

saponifi3d
Copy link
Contributor

@saponifi3d saponifi3d commented Jun 13, 2025

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 so workflow_engine can trigger .send_notification (if evaluated to do so).

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 13, 2025
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All 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
Comment on lines +151 to +153
latest_activity = Activity.objects.filter(
group_id=group.id, type=activity_type.value
).order_by("-datetime")
Copy link
Contributor Author

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 🙏

@saponifi3d saponifi3d marked this pull request as ready for review June 13, 2025 21:35
@saponifi3d saponifi3d requested review from a team as code owners June 13, 2025 21:35
@saponifi3d saponifi3d requested a review from wedamija June 13, 2025 21:52
@saponifi3d saponifi3d merged commit 7f9da91 into master Jun 13, 2025
64 checks passed
@saponifi3d saponifi3d deleted the jcalelnder/aci/activity-registry branch June 13, 2025 22:45
billyvg pushed a commit that referenced this pull request Jun 18, 2025
## 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).
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
## 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).
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2025
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants