File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/sentry/workflow_engine Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -39,13 +39,19 @@ def process_workflow_task(activity_id: int) -> None:
39
39
40
40
41
41
@activity_creation_registry .register ("workflow_status_update" )
42
- def workflow_status_update_handler (activity : Activity ) -> None :
42
+ def workflow_status_update_handler (activity : Activity , detector_id : int | None ) -> None :
43
43
"""
44
44
Hook the process_workflow_task into the activity creation registry.
45
45
46
46
Since this handler is called in process for the activity, we want
47
47
to queue a task to process workflows asynchronously.
48
48
"""
49
+ if detector_id is None :
50
+ # We should not hit this case, it's should only occur if there is a bug
51
+ # passing it from the workflow_engine to the issue platform.
52
+ metrics .incr ("workflow_engine.error.tasks.no_detector_id" )
53
+ return
54
+
49
55
# TODO - implement in follow-up PR for now, just track a metric that we are seeing the activities.
50
56
metrics .incr (
51
57
"workflow_engine.process_workflow.activity_update" , tags = {"activity_type" : activity .type }
You can’t perform that action at this time.
0 commit comments