Samuel Kohlleffel

01/13/2023, 8:35 PM
Prefect version: 2.7.8 Agent: Azure Kubernetes Problem: I just upgraded to Prefect 2.7.8 and canceled a flow run through the UI. The flow canceled as expected, however in the agent logs I see the following:
20:20:14.675 | INFO    | prefect.agent - Found 1 flow runs awaiting cancellation.
20:20:14.675 | ERROR   | prefect.agent - Flow run 'da1b2a10-0a7a-48a1-98c3-25f92f3be5a8' does not have an infrastructure pid attached. Cancellation cannot be guaranteed.
What do I need to do to attach a PID to the flow object? Also important to note, I had to add a cluster role to my K8s Prefect service account to get Prefect 2.7.8 to work. I couldn't find this requirement outlined anywhere in the docs. I could have just missed it.


01/13/2023, 8:41 PM
If the agent is running on a recent version it should attach the PID — that message was to prevent errors when flow runs were spawned by old agents that did not attach the PID.
Regarding the documentation, we have an issue for that
👍 1