Bryan
03/11/2024, 4:50 PMMarvin
03/11/2024, 4:51 PMIf a run of any flow with any tag enters a warning state, send a notification to my-slack-webhook.Notifications can be configured to send messages through various channels such as email, Slack, Microsoft Teams, and others. For more details, you can check the Release Notes and the Prefect documentation.
Bryan
03/11/2024, 4:54 PMMarvin
03/11/2024, 4:55 PMFAILED
and CANCELLED
. The state of a flow run is determined by its return value and the states of the tasks and subflows within it.
- If an exception is raised directly in the flow function, the flow run is marked as FAILED
.
- If the flow does not return a value, or returns None
, and any task run or subflow run has failed, the final flow run state is marked as FAILED
.
- If any task run was canceled, then the flow run state is marked as CANCELLED
.
There is no mention of a WARNING
state for flow runs in the documentation that I've searched so far. The states for flow runs seem to be primarily focused on either successful completion, failure, or cancellation.
If you require more detailed information on Prefect's flow run states, please refer to the Flow Concepts documentation.Bryan
03/11/2024, 4:57 PMMarvin
03/11/2024, 4:57 PMWARNING
state for flow runs. Therefore, it would not be possible to set up an automation to send a notification specifically when there is a flow run warning, simply because that state is not defined or recognized in Prefect Core's flow run state machine.
Flow run states in Prefect are typically binary in the sense that a flow run either succeeds, fails, or gets canceled. However, you might be able to work around this by customizing task states or using logs to identify situations that could be considered as warnings, and then creating notifications based on these custom conditions. If you have a specific scenario in mind, consider reaching out to the Prefect community or checking the documentation for more detailed strategies on handling such cases.Nate
03/11/2024, 5:58 PMflow run warning?
Nate
03/11/2024, 5:58 PMBryan
03/11/2024, 6:58 PMBryan
03/13/2024, 3:18 PMNate
03/13/2024, 4:10 PM