bkyryliuk commented on a change in pull request #10605:
URL:
https://github.com/apache/incubator-superset/pull/10605#discussion_r479564492
##########
File path: superset/tasks/schedules.py
##########
@@ -539,15 +540,17 @@ def schedule_alert_query( # pylint:
disable=unused-argument
return
if report_type == ScheduleType.alert:
+ # Immediately deliver alert if recipients or slack_channel
arguments
+ # are given. These are given when a test alert is sent
if recipients or slack_channel:
- deliver_alert(schedule.id, recipients, slack_channel)
+ deliver_alert(
Review comment:
let's do check_and_validate_alert here as well ?
I think user can come up with the sql that breaks alert first and then tune
it
##########
File path: superset/tasks/schedules.py
##########
@@ -539,15 +540,17 @@ def schedule_alert_query( # pylint:
disable=unused-argument
return
if report_type == ScheduleType.alert:
+ # Immediately deliver alert if recipients or slack_channel
arguments
+ # are given. These are given when a test alert is sent
if recipients or slack_channel:
- deliver_alert(schedule.id, recipients, slack_channel)
+ deliver_alert(
+ alert_id=schedule.id,
+ recipients=recipients,
+ slack_channel=slack_channel,
+ )
return
- if run_alert_query(
- schedule.id, schedule.database_id, schedule.sql, schedule.label
- ):
- # deliver_dashboard OR deliver_slice
- return
+ check_and_validate_alert(schedule.id, schedule.label)
Review comment:
s/check_and_validate_alert/evaluate_alert
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]