jihaozh commented on a change in pull request #4811: [TE] Fail alert task if
unable to notify recipients with exception of dimensions alerter
URL: https://github.com/apache/incubator-pinot/pull/4811#discussion_r345367313
##########
File path:
thirdeye/thirdeye-pinot/src/main/java/org/apache/pinot/thirdeye/detection/alert/scheme/DetectionAlertScheme.java
##########
@@ -80,4 +80,17 @@ public static BaseNotificationContent
buildNotificationContent(Properties alertS
LOG.info("Using " + content.getClass().getSimpleName() + " to render the
template.");
return content;
}
+
+ /**
+ * Fail the alert task if unable to notify owner. However, in case of
dimensions recipient alerter,
+ * do not fail the alert if a subset of recipients are invalid.
+ */
+ void handleAlertFailure(int size, IllegalArgumentException e) {
+ if (this.result.getResult().size() == 1) {
+ throw e;
+ } else {
+ LOG.warn("Skipping! Found illegal arguments while sending {} anomalies
for alert {}." + " Exception message: ",
Review comment:
shall we log which recipient failed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]