Open CoffeeMark2 opened 3 weeks ago
Thanks for the issue @CoffeeMark2! These hooks will fire more reliably in the more recent versions of perfect
. Can you upgrade to the latest version and see if this behavior persists?
Thank you for your prompt response! Sadly, our company might take some time to complete the Prefect upgrade. Once we have updated to the latest version, I will get back to you with the results.
First check
Bug summary
The on_cancellation hook in a Prefect flow is not being triggered when the flow is canceled. Although the workflow appears as canceled in the Prefect UI and client, the log message from the on_cancellation hook is not displayed, indicating that the hook is not being executed.
Reproduction
After running the code above for a little while, I cancel the flow execution using the Prefect UI.
The flow has been canceled. The expected log message "here is hook cancellation" from the on_cancellation hook should appear, but it does not.
Versions
Additional context
I am using the Agent instead of the Worker to run the code deployment. Could this be the cause of the issue?