perf: reuse selfmedia build environment
This commit is contained in:
@@ -2318,6 +2318,7 @@ export function renderStatus(result: Record<string, unknown>): RenderedCliResult
|
||||
"",
|
||||
"IMAGE / GITOPS",
|
||||
...table(["IMAGE_STATUS", "ENV_REUSE", "ENV_ID", "DIGEST", "GITOPS"], [[stringValue(artifact.imageStatus), stringValue(artifact.envReuse), stringValue(artifact.envIdentity), short(stringValue(artifact.digest), 18), short(stringValue(artifact.gitopsCommit))]]),
|
||||
` stage-timings: ${stageTimingsText(record(artifact.stageTimings))}`,
|
||||
"",
|
||||
"ARGO",
|
||||
...table(["SYNC", "HEALTH", "REVISION", "RELATION", "TARGET_REVISION"], [[
|
||||
@@ -2880,6 +2881,13 @@ function envReuseText(envReuse: Record<string, unknown>): string {
|
||||
return parts.length === 0 ? "-" : parts.join(",");
|
||||
}
|
||||
|
||||
function stageTimingsText(timings: Record<string, unknown>): string {
|
||||
const parts = Object.entries(timings)
|
||||
.filter((entry): entry is [string, number] => typeof entry[1] === "number" && Number.isFinite(entry[1]))
|
||||
.map(([name, milliseconds]) => `${name}=${Math.round(milliseconds)}ms`);
|
||||
return parts.length === 0 ? "-" : parts.join(",");
|
||||
}
|
||||
|
||||
function registryText(registry: Record<string, unknown>): string {
|
||||
if (Object.keys(registry).length === 0) return "-";
|
||||
if (registry.status === "not-configured" || registry.applicability === "not-configured") return "N/A";
|
||||
@@ -2941,6 +2949,8 @@ function renderHistoryDetail(row: Record<string, unknown>): string[] {
|
||||
["errorExitCode", stringValue(typedError.exitCode)],
|
||||
["errorSummary", compactLine(stringValue(typedError.stderrSummary ?? typedError.message))],
|
||||
["envReuseSource", stringValue(envReuse.source)],
|
||||
["envIdentity", short(stringValue(envReuse.identity), 24)],
|
||||
["stageTimings", stageTimingsText(record(envReuse.stageTimings))],
|
||||
["deliveryMode", stringValue(sourceObservation.mode)],
|
||||
["deliveryValid", stringValue(sourceObservation.valid)],
|
||||
["deliverySourceMatched", stringValue(sourceObservation.sourceMatched)],
|
||||
|
||||
Reference in New Issue
Block a user