fix: restore jd01 platform database runtime
Pipelines as Code CI / hwlab-web-probe-sentinel-jd01- Success

This commit is contained in:
Codex
2026-07-05 19:46:06 +00:00
parent 5bd0f3921e
commit c17954561e
3 changed files with 133 additions and 15 deletions
+18 -14
View File
@@ -215,21 +215,25 @@ export function nodeRuntimeControlPlaneStatus(scoped: ReturnType<typeof parseNod
const workloadsReady = workloadReadiness.length > 0 && workloadReadiness.every((item) => item.ready);
const localPostgresExpectedAbsent = nodeRuntimeLocalPostgresExpectedAbsent(spec);
const localPostgresReady = localPostgresExpectedAbsent ? localPostgresObjects.length === 0 : localPostgresObjects.length > 0;
const runtimeReady = namespaceExists && localPostgresReady && workloadsReady && (activeExternalPostgres === undefined || (bridge.ready && secrets.ready)) && codeAgentRuntime.ready === true;
const postgresReady = activeExternalPostgres === undefined
? localPostgresReady
: bridge.ready === true && secrets.ready === true;
const runtimeReady = namespaceExists && postgresReady && workloadsReady && codeAgentRuntime.ready === true;
const codeAgentRuntimeDegradedReason = typeof codeAgentRuntime.degradedReason === "string" ? codeAgentRuntime.degradedReason : null;
const runtimeDegradedReason = !namespaceExists
? "runtime-namespace-missing"
: !localPostgresReady
? "runtime-local-postgres-not-ready"
: !workloadsReady
? "runtime-workloads-not-ready"
: activeExternalPostgres !== undefined && bridge.ready !== true
? "external-postgres-bridge-not-ready"
: activeExternalPostgres !== undefined && secrets.ready !== true
? "external-postgres-secrets-not-ready"
: codeAgentRuntime.ready !== true
? codeAgentRuntimeDegradedReason ?? "code-agent-runtime-not-ready"
: "runtime-not-ready";
let runtimeDegradedReason = "runtime-not-ready";
if (!namespaceExists) {
runtimeDegradedReason = "runtime-namespace-missing";
} else if (activeExternalPostgres !== undefined && bridge.ready !== true) {
runtimeDegradedReason = "external-postgres-bridge-not-ready";
} else if (activeExternalPostgres !== undefined && secrets.ready !== true) {
runtimeDegradedReason = "external-postgres-secrets-not-ready";
} else if (activeExternalPostgres === undefined && !localPostgresReady) {
runtimeDegradedReason = "runtime-local-postgres-not-ready";
} else if (!workloadsReady) {
runtimeDegradedReason = "runtime-workloads-not-ready";
} else if (codeAgentRuntime.ready !== true) {
runtimeDegradedReason = codeAgentRuntimeDegradedReason ?? "code-agent-runtime-not-ready";
}
const argoReady = argo.exitCode === 0 && repoURL === spec.argoRepoUrl && targetRevision === spec.gitopsBranch && path === spec.runtimePath && syncStatus === "Synced" && health === "Healthy";
const argoDiagnostics = argo.exitCode === 0 && !argoReady
? nodeRuntimeArgoDiagnostics(spec, probeTimeoutSeconds)