fix: expose argo operation timing
This commit is contained in:
@@ -48,6 +48,8 @@ Follower-scoped commands such as `status --follower`, `events --follower`, `logs
|
|||||||
|
|
||||||
Argo closeout visibility must include the bounded reason for non-ready health, not only `Synced/Progressing`: health message, operation phase/message, short Application conditions and a small list of non-healthy resources when available.
|
Argo closeout visibility must include the bounded reason for non-ready health, not only `Synced/Progressing`: health message, operation phase/message, short Application conditions and a small list of non-healthy resources when available.
|
||||||
|
|
||||||
|
When Argo exposes operation start/finish timestamps, stage timing rows should report the Argo operation duration directly. Missing timestamps still render `-`; do not infer Argo duration from total elapsed time or from unrelated runtime polling.
|
||||||
|
|
||||||
The automatic controller loop is non-blocking, so closeout acceleration cannot live only in the user-facing `--wait` path. Once a triggered PipelineRun has succeeded and required runtime/GitOps gates are not aligned, the in-cluster controller path should perform the same bounded target-side Argo refresh used by wait closeout; otherwise convergence depends on Argo's background poll interval and can exceed the 120s budget even when Tekton finished quickly.
|
The automatic controller loop is non-blocking, so closeout acceleration cannot live only in the user-facing `--wait` path. Once a triggered PipelineRun has succeeded and required runtime/GitOps gates are not aligned, the in-cluster controller path should perform the same bounded target-side Argo refresh used by wait closeout; otherwise convergence depends on Argo's background poll interval and can exceed the 120s budget even when Tekton finished quickly.
|
||||||
|
|
||||||
Stage timing rows must not label optional gates as `not-ready` when they are not part of that follower's closeout contract. For sentinel-like followers without a GitOps branch flush gate, git-mirror source snapshot readiness should render as source-ready/ready, while missing GitOps `githubInSync` remains `-`/not-applicable instead of a failure-looking state.
|
Stage timing rows must not label optional gates as `not-ready` when they are not part of that follower's closeout contract. For sentinel-like followers without a GitOps branch flush gate, git-mirror source snapshot readiness should render as source-ready/ready, while missing GitOps `githubInSync` remains `-`/not-applicable instead of a failure-looking state.
|
||||||
|
|||||||
@@ -115,7 +115,13 @@ if (key === "pipelineRun") {
|
|||||||
: [],
|
: [],
|
||||||
nonReadyResources,
|
nonReadyResources,
|
||||||
operationState: input?.status?.operationState
|
operationState: input?.status?.operationState
|
||||||
? { phase: input.status.operationState.phase || null, message: input.status.operationState.message || null, finishedAt: input.status.operationState.finishedAt || null }
|
? {
|
||||||
|
phase: input.status.operationState.phase || null,
|
||||||
|
message: input.status.operationState.message || null,
|
||||||
|
startedAt: input.status.operationState.startedAt || null,
|
||||||
|
finishedAt: input.status.operationState.finishedAt || null,
|
||||||
|
durationSeconds: durationSeconds(input.status.operationState.startedAt, input.status.operationState.finishedAt),
|
||||||
|
}
|
||||||
: null,
|
: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -194,6 +194,9 @@ function compactArgo(argo) {
|
|||||||
revision: stringOrNull(value.revision),
|
revision: stringOrNull(value.revision),
|
||||||
operationPhase: stringOrNull(value.operationPhase),
|
operationPhase: stringOrNull(value.operationPhase),
|
||||||
operationMessage: stringOrNull(value.operationMessage),
|
operationMessage: stringOrNull(value.operationMessage),
|
||||||
|
operationStartedAt: stringOrNull(value.operationStartedAt),
|
||||||
|
operationFinishedAt: stringOrNull(value.operationFinishedAt),
|
||||||
|
operationDurationSeconds: numberOrNull(value.operationDurationSeconds),
|
||||||
conditions: arrayRecords(value.conditions).slice(0, 5),
|
conditions: arrayRecords(value.conditions).slice(0, 5),
|
||||||
nonReadyResources: arrayRecords(value.nonReadyResources).slice(0, 5),
|
nonReadyResources: arrayRecords(value.nonReadyResources).slice(0, 5),
|
||||||
ready: value.ready === true,
|
ready: value.ready === true,
|
||||||
|
|||||||
@@ -319,6 +319,9 @@ function compactStatusGates(payload: Record<string, unknown> | null): Record<str
|
|||||||
revision: stringOrNull(argo.revision),
|
revision: stringOrNull(argo.revision),
|
||||||
operationPhase: stringOrNull(argo.operationPhase),
|
operationPhase: stringOrNull(argo.operationPhase),
|
||||||
operationMessage: stringOrNull(argo.operationMessage),
|
operationMessage: stringOrNull(argo.operationMessage),
|
||||||
|
operationStartedAt: stringOrNull(argo.operationStartedAt),
|
||||||
|
operationFinishedAt: stringOrNull(argo.operationFinishedAt),
|
||||||
|
operationDurationSeconds: numberOrNull(argo.operationDurationSeconds),
|
||||||
conditions: Array.isArray(argo.conditions) ? argo.conditions.slice(0, 5) : [],
|
conditions: Array.isArray(argo.conditions) ? argo.conditions.slice(0, 5) : [],
|
||||||
nonReadyResources: Array.isArray(argo.nonReadyResources) ? argo.nonReadyResources.slice(0, 5) : [],
|
nonReadyResources: Array.isArray(argo.nonReadyResources) ? argo.nonReadyResources.slice(0, 5) : [],
|
||||||
ready: argo.ready === true,
|
ready: argo.ready === true,
|
||||||
|
|||||||
+4
-1
@@ -1755,6 +1755,9 @@ function nativeArgoSummary(application: Record<string, unknown> | null): Record<
|
|||||||
revision: stringOrNull(sync?.revision),
|
revision: stringOrNull(sync?.revision),
|
||||||
operationPhase: stringOrNull(operationState?.phase),
|
operationPhase: stringOrNull(operationState?.phase),
|
||||||
operationMessage: stringOrNull(operationState?.message),
|
operationMessage: stringOrNull(operationState?.message),
|
||||||
|
operationStartedAt: stringOrNull(operationState?.startedAt),
|
||||||
|
operationFinishedAt: stringOrNull(operationState?.finishedAt),
|
||||||
|
operationDurationSeconds: numberOrNull(operationState?.durationSeconds),
|
||||||
conditions: Array.isArray(status?.conditions) ? status.conditions.slice(0, 5) : [],
|
conditions: Array.isArray(status?.conditions) ? status.conditions.slice(0, 5) : [],
|
||||||
nonReadyResources: Array.isArray(status?.nonReadyResources) ? status.nonReadyResources.slice(0, 5) : [],
|
nonReadyResources: Array.isArray(status?.nonReadyResources) ? status.nonReadyResources.slice(0, 5) : [],
|
||||||
ready: argoApplicationReady(application),
|
ready: argoApplicationReady(application),
|
||||||
@@ -2423,7 +2426,7 @@ function stageTimingsFromNativePayload(payload: Record<string, unknown> | null):
|
|||||||
}
|
}
|
||||||
const argo = asOptionalRecord(payload.argo);
|
const argo = asOptionalRecord(payload.argo);
|
||||||
if (argo !== null) {
|
if (argo !== null) {
|
||||||
stages.push(stageTiming("argo", `${stringOrNull(argo.syncStatus) ?? "unknown"}/${stringOrNull(argo.healthStatus) ?? "unknown"}`, null, null, "argocd", stringOrNull(argo.name)));
|
stages.push(stageTiming("argo", `${stringOrNull(argo.syncStatus) ?? "unknown"}/${stringOrNull(argo.healthStatus) ?? "unknown"}`, numberOrNull(argo.operationDurationSeconds), null, "argocd", stringOrNull(argo.name)));
|
||||||
}
|
}
|
||||||
const runtime = asOptionalRecord(payload.runtime);
|
const runtime = asOptionalRecord(payload.runtime);
|
||||||
if (runtime !== null) {
|
if (runtime !== null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user