prefect
prefect copied to clipboard
Discussion: Allow explicitly raising a flow run state that isn't FAILED or SUCCESS
Current behavior
From a bookkeeping standpoint it's not possible to programmatically set a flow run's state, which means at-a-glance understanding of run state (particularly when aggregated in the UI) is limited to binary reporting: Failed
or Success
, which hides the underlying rich state history for a given flow run.
Proposed behavior
Allow something akin to flow.set_reference_tasks
to finely dictate the final state of a flow run
OR
Allow a task to raise an ENDRUN
signal that will both stop the FlowRunner AND set its final state to the passed state. It could also set all downstream and Pending
tasks to a given state (similar to the MARK AS
button in the UI)