Hi folks, we have slack notifications implemented ...
# prefect-community
Hi folks, we have slack notifications implemented as state handlers on task runs, and this has worked well to notify us about flow run failures. But there are times when the flow fails before reaching a submitted/running state (i.e. due to no heartbeat detected, or fails due to lazarus failing to rescheduled the run) - what is the best practice to enable slack notifications for these cases ?
Hmm so if the flow process never starts up then I don’t think there is a way to trigger a notification. Attaching a state handler to the flow object should trigger a notification when transitioning from Submitted -> Running, however if you are not seeing it enter a running state then it would not fire. Prefect Cloud does have a concept of Cloud Hooks that allows you to fire notifications based on state changes completely independent of the actual flow object itself.
Thanks for the quick response @josh - ok it seems we will want to add cloud hooks as well then
@josh - I noticed that there is nothing preventing me from re-creating a webhook with the same exact parameters more than once when using the graphql mutation - not sure if that's intended behavior - it would be nice imo to prevent creating duplicates as a default behavior