Open nidomiro opened 3 months ago
Script tasks use task runners, and not all task runners support resuming a previous execution.
The Docker task runner didn't support it, as in a typical production environment like when Kestra is deployed in Kubernetes, you usually use Docker-In-Docker, so the script task container is stopped when the Kestra container is stopped as all are in the same pod.
However, as Docker supports labels, we can implement resuming containers as we did for Kubernetes. We need to decide whether it should be by default or not.
Quick though, we could add a plugin configuration that will enable this resume, but disabled by default, allowing people on mono instance or mono worker to rely on this, but since Kestra is multiple node minded, no reason to enable this by default.
Feature description
If kestra is restarted during a flow-execution, the execution is in an kind of undefined state after kestra is up again. To be completely clear here, I do not talk about kestra not being able to start new flow executions while it is shut down. That would simply be impossible. I'm talking about kestra saving the reference to the docker-container it started for the flow (or flow step) execution and checking the logs, status, ... on startup.
Also the docker-containers of flows that where executing during the kestra reboot are not cleaned up. But I think this will solve itself with the first problem.
Steps to reproduce:
docker compose up
CTRL + c
to shut it down.The test-flow
The logs
Origin: https://kestra-io.slack.com/archives/C03FEC452NQ/p1719171554720979