fix: gate d601 v03 postgres mode by yaml switch (#972)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-26 14:01:49 +08:00
committed by GitHub
parent 0b923fc5ee
commit fc6d3bdaf9
8 changed files with 55 additions and 20 deletions
+5 -2
View File
@@ -37,8 +37,10 @@ import { compactPrometheusLines, compactRuntimeCommand, isWorkbenchBackendEventM
import { compactCommandResultRedacted, record, shellQuote } from "./utils";
import { readBootstrapAdminPasswordMaterial } from "./web-probe";
import { webProbeCredential } from "./web-probe-observe";
import { hwlabRuntimeActiveExternalPostgres } from "../hwlab-node-lanes";
export function nodeRuntimeControlPlanePlan(scoped: ReturnType<typeof parseNodeScopedDelegatedOptions>): Record<string, unknown> {
const activeExternalPostgres = hwlabRuntimeActiveExternalPostgres(scoped.spec);
return {
ok: true,
command: `hwlab nodes control-plane plan --node ${scoped.node} --lane ${scoped.lane}`,
@@ -50,6 +52,7 @@ export function nodeRuntimeControlPlanePlan(scoped: ReturnType<typeof parseNodeS
checks: {
nodeScopedTargetConfigured: true,
externalPostgresDeclared: scoped.spec.externalPostgres !== undefined,
externalPostgresActive: activeExternalPostgres !== undefined,
secretValuesPrinted: false,
runtimeNamespace: scoped.spec.runtimeNamespace,
localPostgresExpectedAbsent: nodeRuntimeLocalPostgresExpectedAbsent(scoped.spec),
@@ -58,9 +61,9 @@ export function nodeRuntimeControlPlanePlan(scoped: ReturnType<typeof parseNodeS
next: {
infraStatus: `bun scripts/cli.ts hwlab nodes control-plane infra status --node ${scoped.node} --lane ${scoped.lane}`,
status: `bun scripts/cli.ts hwlab nodes control-plane status --node ${scoped.node} --lane ${scoped.lane}`,
platformDbStatus: scoped.spec.externalPostgres === undefined
platformDbStatus: activeExternalPostgres === undefined
? null
: `bun scripts/cli.ts platform-db postgres status --config ${scoped.spec.externalPostgres.configRef}`,
: `bun scripts/cli.ts platform-db postgres status --config ${activeExternalPostgres.configRef}`,
publicExposure: scoped.spec.publicExposure === null ? null : `bun scripts/cli.ts hwlab nodes control-plane public-exposure --node ${scoped.node} --lane ${scoped.lane} --confirm`,
},
};