Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActiveRunList ¶
ActiveRunList renders classified runs for an operator-facing refusal.
func ActiveRuns ¶
ActiveRuns returns all pending/running pipeline runs from the local state DB.
func ExecutingRunList ¶
ExecutingRunList renders the subset that is mid-step.
Types ¶
type ActiveRun ¶
type ActiveRun struct {
Run *db.Run
Activity Activity
// Step is the step the run is executing or parked on, empty when the run
// has no step to point at.
Step types.StepName
}
ActiveRun pairs an active run with what the daemon is doing with it.
func ClassifyActiveRuns ¶
ClassifyActiveRuns returns every pending/running run in the local state DB annotated with its Activity. daemonRunning reports whether a daemon is serving this NS_HOME; when no daemon is, nothing can be mid-step, because startup recovery is what reconciles the rows a dead daemon left behind. It is consulted only once at least one active run exists, so the common no-active-runs path never pays for a daemon health probe, and a nil daemonRunning fails closed to "a daemon is serving this root".
Classification is deliberately asymmetric: a run is reported as parked or idle only on positive evidence, and anything else a live daemon still owns counts as executing. A run between two steps has neither a running step nor a gate marker, and guessing "safe" there is what a destructive lifecycle command must never do.
func ExecutingRuns ¶
ExecutingRuns filters to the runs a daemon stop would kill mid-step.
type Activity ¶
type Activity string
Activity describes what is actually happening to an active run. Stopping the daemon means something different for each: a parked or idle run survives it, because startup recovery resumes a parked gate and an idle row was never in flight, but a run executing a step loses that step and fails with its pipeline commits stranded in the local gate repository.
const ( // ActivityExecuting means a daemon is running a step for this run now. ActivityExecuting Activity = "executing" // ActivityParked means the run is blocked at a gate awaiting the agent. ActivityParked Activity = "parked" // ActivityIdle means no daemon is driving the run: it is a row left over // from a daemon that is no longer running. There is no run queue, so a // live daemon never has an idle run. ActivityIdle Activity = "idle" )