Samuel Hinton
03/19/2021, 11:14 AMon_failure
callback of a flow to send a message to a slack channel that ideally looks something like “OH MAN THE FLOW FAILED - Click here to see the flow” with a proper link. Does the flow object contain any information I can use to construct a useful URL, specifically the flow_id?Amanda Wee
03/19/2021, 11:17 AMslack_notifier
state handler instead?
https://docs.prefect.io/core/advanced_tutorials/slack-notifications.html
You can set it to notify only on failed states, and it comes packaged with the URL you have in mind.Samuel Hinton
03/19/2021, 11:19 AMSamuel Hinton
03/19/2021, 11:41 AMon_failure
. I cant see this caveat documented and it certainly seems unintuitive given the on_failure was meant to be a subset of state_handlerAmanda Wee
03/19/2021, 11:51 AMslack_notifier
, but not with on_failure
, so I'm afraid that I can't say anything about that.Amanda Wee
03/19/2021, 11:56 AMon_failure
, i.e., a generic state handler must accept both old state and new state, whereas on failure the callback only needs to accept the new state, i.e., the specific failure state.Samuel Hinton
03/19/2021, 11:57 AM