Skip to content

Commit 059ea9d

Browse files
committed
fix: set event in foreach AlertDto path so incident resolution check runs
In BaseProvider._enrich(), when iterating over AlertDto objects in a foreach loop, the event variable was never assigned. This caused check_incident_resolution() to be silently skipped because the condition if event and should_check_incidents_resolution evaluates to False. The enrichment itself succeeds (alerts show as 'resolved' in the UI) but the incident resolution check never runs, so incidents set to 'resolve on all_resolved' stay active forever when alerts are resolved via workflow. Fix: assign event = foreach_context in the AlertDto isinstance branch. Fixes keephq#6194
1 parent 7239e31 commit 059ea9d

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

keep/providers/base/base_provider.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ def _enrich(self, enrichments, results, audit_enabled=True):
222222

223223
if isinstance(foreach_context, AlertDto):
224224
fingerprint = foreach_context.fingerprint
225+
event = foreach_context
225226
# if we are in a dict context, use the fingerprint from the dict
226227
elif isinstance(foreach_context, dict) and "fingerprint" in foreach_context:
227228
fingerprint = foreach_context.get("fingerprint")

0 commit comments

Comments
 (0)