Files
actions-runner-controller/cmd
Nikola JokicandCopilot App 9c9cc51a9b Guard the listener's Running phase write with resourceVersion
HandleJobStarted reads the ephemeral runner to decide whether the runner
is still eligible for the Running phase, then applies that decision with a
separate merge patch. The patch carried no precondition, so nothing tied it
to the state the decision was made on: if the ephemeral runner controller
wrote a terminal phase in between, the listener silently overwrote it and
resurrected a runner that had already finished.

Attach the observed resourceVersion to the patch whenever the phase is
transitioned, and retry on conflict so the decision is re-made against the
fresh state. The job detail fields stay unguarded: they are write-once
metadata that the runner set only consults for runners that are neither
done nor being deleted, so patching them cannot change a scaling decision.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-09-11 11:47:36 +02:00
..