You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by zi...@apache.org on 2022/11/17 06:14:18 UTC

[dolphinscheduler] branch dev updated: [Bug] [Alert] Ignore alert not write info to db (#12867)

This is an automated email from the ASF dual-hosted git repository.

zihaoxiang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new d02991a2e6 [Bug] [Alert] Ignore alert not write info to db (#12867)
d02991a2e6 is described below

commit d02991a2e6332609e6d745d769f5bebbe17ed78f
Author: 旺阳 <qi...@cisco.com>
AuthorDate: Thu Nov 17 14:14:12 2022 +0800

    [Bug] [Alert] Ignore alert not write info to db (#12867)
    
    * add alert not match return info
---
 .../java/org/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 d0c4b033da..fb8da102ff 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
@@ -255,10 +255,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()