sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(workflow_engine): Add support to handle `Activity` events in the `WorkflowEventData`

Open saponifi3d opened this issue 7 months ago • 1 comments

Description

Since so much of the system needs access to the WorkflowEventData.event.group and the Activity model doesn't support it (but we do have access to it), so i moved group to the top level of WorkflowEventData -- this allows a majority of the DataConditions to work seamlessly between activities and events.

The core change here is to WorkflowEventData type and everything else is a cascade that needed to be updated. Thanks to all for typing things so well to make this easier to discover / update.

I'll have another PR that starts to send the activities and connects everything in workflow_engine/tasks.py.

saponifi3d avatar Jun 14 '25 00:06 saponifi3d

Codecov Report

Attention: Patch coverage is 93.02326% with 15 lines in your changes missing coverage. Please review.

:white_check_mark: All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../sentry/notifications/notification_action/types.py 78.94% 4 Missing :warning:
src/sentry/workflow_engine/processors/workflow.py 89.28% 3 Missing :warning:
...gine/handlers/condition/event_attribute_handler.py 50.00% 1 Missing :warning:
...ers/condition/event_created_by_detector_handler.py 66.66% 1 Missing :warning:
...ndlers/condition/latest_adopted_release_handler.py 66.66% 1 Missing :warning:
...ngine/handlers/condition/latest_release_handler.py 50.00% 1 Missing :warning:
...orkflow_engine/handlers/condition/level_handler.py 66.66% 1 Missing :warning:
..._engine/handlers/condition/tagged_event_handler.py 66.66% 1 Missing :warning:
src/sentry/workflow_engine/processors/detector.py 66.66% 1 Missing :warning:
.../handlers/condition/test_age_comparison_handler.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #93580       +/-   ##
===========================================
+ Coverage   87.92%   95.50%    +7.58%     
===========================================
  Files       10425     5627     -4798     
  Lines      603141   459382   -143759     
  Branches    23470        0    -23470     
===========================================
- Hits       530289   438733    -91556     
+ Misses      72346    20649    -51697     
+ Partials      506        0      -506     

codecov[bot] avatar Jun 14 '25 01:06 codecov[bot]