From 6e520fe8f74b7555b92c369942530fe094a5010c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=BA=E9=98=B3?= Date: Thu, 17 Nov 2022 14:14:12 +0800 Subject: [PATCH] [Bug] [Alert] Ignore alert not write info to db (#12867) * add alert not match return info --- .../apache/dolphinscheduler/alert/AlertSenderService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertSenderService.java b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertSenderService.java index 0063de0672..8a1f810d46 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertSenderService.java +++ b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/java/org/apache/dolphinscheduler/alert/AlertSenderService.java @@ -233,10 +233,13 @@ public final class AlertSenderService extends Thread { } if (!sendWarning) { + String message = String.format( + "Alert Plugin %s send ignore warning type not match: plugin warning type is %s, alert data warning type is %s", + pluginInstanceName, warningType.getCode(), alertData.getWarnType()); logger.info( "Alert Plugin {} send ignore warning type not match: plugin warning type is {}, alert data warning type is {}", pluginInstanceName, warningType.getCode(), alertData.getWarnType()); - return null; + return new AlertResult("false", message); } AlertInfo alertInfo = AlertInfo.builder()