From 517da06eceacb98ffc1163d2021b3a1bf4d8aa07 Mon Sep 17 00:00:00 2001 From: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Date: Thu, 22 Dec 2022 04:42:16 +0530 Subject: [PATCH] Ingestion Bot Fix + AcitvityFeedAlerts Update (#9475) --- .../org/openmetadata/service/events/ChangeEventHandler.java | 2 ++ .../src/main/resources/json/data/alerts/alertsData.json | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/events/ChangeEventHandler.java b/openmetadata-service/src/main/java/org/openmetadata/service/events/ChangeEventHandler.java index 2bb509e5f4f..8b0070d872a 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/events/ChangeEventHandler.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/events/ChangeEventHandler.java @@ -72,6 +72,8 @@ public class ChangeEventHandler implements EventHandler { if (changeEvent == null) { return null; } + // Always set the Change Event Username as context Principal, the one creating the CE + changeEvent.setUserName(loggedInUserName); LOG.info( "Recording change event {}:{}:{}:{}", changeEvent.getTimestamp(), diff --git a/openmetadata-service/src/main/resources/json/data/alerts/alertsData.json b/openmetadata-service/src/main/resources/json/data/alerts/alertsData.json index d7169419f06..28f417b1d2a 100644 --- a/openmetadata-service/src/main/resources/json/data/alerts/alertsData.json +++ b/openmetadata-service/src/main/resources/json/data/alerts/alertsData.json @@ -9,12 +9,12 @@ }, "filteringRules": [ { - "name": "DisableIngestionActivityFeedData", + "name": "matchUpdatedBy", "effect": "exclude", "condition": "matchUpdatedBy('ingestion-bot')" }, { - "name": "DisableUsageSummaryFromActivityFeed", + "name": "matchAnyFieldChange", "effect": "exclude", "condition": "matchAnyFieldChange('usageSummary')" }