You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Alert evaluation throws EntityNotFoundException when test case is deleted #29674
When a test case is deleted, the deletion triggers a change event that is picked up by configured alerts. During alert evaluation, the system attempts to fetch the deleted entity from the database (e.g., via matchAnyDomain() in AlertsRuleEvaluator), which throws an EntityNotFoundException because the entity no longer exists.
Stack Trace
org.openmetadata.service.exception.EntityNotFoundException: testCase instance for <UUID> not found
at org.openmetadata.service.jdbi3.EntityRepository.find(EntityRepository.java:1497)
at org.openmetadata.service.jdbi3.EntityRepository.lambda$get$6(EntityRepository.java:1370)
at org.openmetadata.service.Entity.getEntity(Entity.java:639)
at org.openmetadata.service.events.subscription.AlertsRuleEvaluator.matchAnyDomain(AlertsRuleEvaluator.java:480)
at org.openmetadata.service.events.subscription.AlertUtil.evaluateAlertConditions(AlertUtil.java:91)
~6 seconds later: Alert evaluation job attempts to evaluate change event and fails
Root Cause
The change event processing makes a database call to fetch entity details during alert evaluation. For hard deletes, the entity is already removed from the database by the time the event is processed.
Expected Behavior
Change events for deletions should package all necessary entity information in the event payload itself, avoiding database lookups during alert evaluation. This approach should apply to hard deletes (soft deletes may still need DB access for entity state).
Impact
Server-side errors logged (does not appear to impact end users or alert delivery)
Activity
Fixes 29674: stop EntityNotFoundException from aborting alert evaluat…
Fixes 29674: stop EntityNotFoundException from aborting alert evaluat…
Fixes 29674: stop EntityNotFoundException from aborting alert evaluat…