Skip to content

Commit 76aef41

Browse files
authored
chore(aci): log missing WorkflowActionGroupStatus after bulk create (#103928)
1 parent b35c797 commit 76aef41

File tree

1 file changed

+9
-1
lines changed
  • src/sentry/workflow_engine/processors

1 file changed

+9
-1
lines changed

src/sentry/workflow_engine/processors/action.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,19 @@ def update_workflow_action_group_statuses(
119119
id__in=statuses_to_update, date_updated__lt=now
120120
).update(date_updated=now)
121121

122-
WorkflowActionGroupStatus.objects.bulk_create(
122+
all_statuses = WorkflowActionGroupStatus.objects.bulk_create(
123123
missing_statuses,
124124
batch_size=1000,
125125
ignore_conflicts=True,
126126
)
127+
missing_status_pairs = [
128+
(status.workflow_id, status.action_id) for status in all_statuses if status.id is None
129+
]
130+
if missing_status_pairs:
131+
logger.warning(
132+
"Failed to create WorkflowActionGroupStatus objects",
133+
extra={"missing_status_pairs": missing_status_pairs},
134+
)
127135

128136

129137
def get_unique_active_actions(

0 commit comments

Comments
 (0)