cicd ignore reused object total timing
This commit is contained in:
@@ -68,6 +68,8 @@ Stage timing must be queryable through normal CLI output, not only raw JSON. `st
|
||||
|
||||
Do not backfill, infer, or migrate old branch-follower state when historical timing, stage timing, or other observability fields are missing or known to be unreliable. Compatibility starts with future state written by the current controller; old missing data must render as `-`/unknown in CLI output instead of being recovered from unrelated native objects.
|
||||
|
||||
If a deterministic Kubernetes Job or PipelineRun is reused and there is no already-stored `timings.startedAt`, the reused object's current wait/check duration is only a stage observation; it must not be promoted to `timings.totalSeconds`.
|
||||
|
||||
State machine phases are `Observed`, `Noop`, `PendingTrigger`, `Triggering`, `ClosingOut`, `Succeeded`, `Failed`, `Superseded`, `Blocked`, and `Skipped`.
|
||||
|
||||
Status and decision inputs are Kubernetes-native:
|
||||
|
||||
@@ -2126,6 +2126,8 @@ function compactTimings(timings: FollowerState["timings"]): FollowerState["timin
|
||||
|
||||
function totalTimingFromCommand(command: Record<string, unknown> | undefined, phase?: BranchFollowerPhase): { seconds: number; status: string; source: string; startedAt: string | null; finishedAt: string | null } | null {
|
||||
if (command === undefined) return null;
|
||||
const payload = asOptionalRecord(command.payload);
|
||||
if (payload?.reused === true) return null;
|
||||
const startedAt = stringOrNull(command.startedAt);
|
||||
const finishedAt = stringOrNull(command.finishedAt);
|
||||
const seconds = totalSecondsFromRange(startedAt, finishedAt) ?? secondsFromMs(numberOrNull(command.elapsedMs));
|
||||
|
||||
Reference in New Issue
Block a user