Let the listener own the EphemeralRunner Running phase transition (#4646)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Nikola Jokic
2026-09-15 13:46:40 +02:00
committed by GitHub
co-authored by Copilot App Copilot Autofix powered by AI
parent d386789092
commit 9ce3169df3
13 changed files with 610 additions and 67 deletions
@@ -146,6 +146,10 @@ type EphemeralRunnerStatus struct {
//
// The PodSucceded phase should be set only when confirmed that EphemeralRunner
// actually executed the job and has been removed from the service.
//
// The Running phase is owned by the listener and is set only when a job has
// been assigned to this EphemeralRunner. It does not mean the runner is merely
// online and waiting for work; an idle registered runner stays Pending.
// +optional
Phase EphemeralRunnerPhase `json:"phase,omitempty"`
// +optional
@@ -185,11 +189,12 @@ type EphemeralRunnerStatus struct {
type EphemeralRunnerPhase string
const (
// EphemeralRunnerPhasePending is a phase set when the ephemeral runner is
// being provisioned and is not yet online.
// EphemeralRunnerPhasePending is a phase set while no job has been assigned to
// the ephemeral runner. It covers both a runner that is still being provisioned
// and one that is already online and registered but idle.
EphemeralRunnerPhasePending EphemeralRunnerPhase = "Pending"
// EphemeralRunnerPhaseRunning is a phase set when the ephemeral runner is online and
// waiting for a job to execute.
// EphemeralRunnerPhaseRunning is a phase set by the listener when a job has been
// assigned to this ephemeral runner and the runner is executing it.
EphemeralRunnerPhaseRunning EphemeralRunnerPhase = "Running"
// EphemeralRunnerPhaseSucceeded is a phase set when the ephemeral runner
// successfully executed the job and has been removed from the service.