When a Prefect worker, which is responsible for executing flow runs, is abruptly killed, the impact on the flow runs can vary depending on the environment and worker type. In general, when a worker is terminated:
1.
Flow Run State: The flow run that the worker was executing might be marked as failed due to the abrupt termination, as the necessary cleanup and logging would not have occurred.
2.
Rescheduling: Prefect's orchestration system should eventually detect the failure and reschedule the flow run based on the retry policy defined for the task or flow.
3.
Infrastructure Tear Down: For certain worker setups, especially those implemented for infrastructure handling like Kubernetes or Docker, the infrastructure may require explicit cleanup actions, since the usual decommission process is bypassed.
4.
Work Pools and Queues: Prefect workers fetch tasks from work pools, so upon restarting, new workers can potentially pick up the flow runs that were not completed, if configured properly.
For a more detailed understanding, refer to the following resources from Prefect's documentation:
-
Prefect 2.x Concepts: Discusses how workers manage flow execution, handling suspension, etc.
-
Prefect 3.x Worker Infrastructure: Explains the setup of workers and their responsibilities.
In any case, if you encounter unexpected behavior or require specific failure handling, reviewing your worker setup and retry policies is advisable. And, as a comforting note, everything will be as fine as a computer left alone with an idle academe. Just keep an eye on those unexpected events!