fix: gate d601 v03 postgres mode by yaml switch (#972)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -31,6 +31,7 @@ import type { RenderedCliResult } from "../output";
|
||||
import { NODE_RUNTIME_CICD_WAIT_WARNING_SECONDS } from "./entry";
|
||||
import { publicExposureSummary } from "./public-exposure";
|
||||
import { assertNodeId, positiveIntegerOption, requiredOption } from "./utils";
|
||||
import { hwlabRuntimeActiveExternalPostgres } from "../hwlab-node-lanes";
|
||||
|
||||
export function parseNodeScopedDelegatedOptions(domain: DelegatedNodeDomain, args: string[]): {
|
||||
domain: DelegatedNodeDomain;
|
||||
@@ -76,10 +77,11 @@ export function parseNodeScopedDelegatedOptions(domain: DelegatedNodeDomain, arg
|
||||
}
|
||||
|
||||
export function nodeRuntimeLocalPostgresExpectedAbsent(spec: HwlabRuntimeLaneSpec): boolean {
|
||||
return spec.externalPostgres !== undefined || spec.runtimeStore?.postgres?.mode === "platform-service";
|
||||
return spec.runtimeStore?.postgres?.mode === "platform-service";
|
||||
}
|
||||
|
||||
export function nodeRuntimeExpected(spec: HwlabRuntimeLaneSpec): Record<string, unknown> {
|
||||
const activeExternalPostgres = hwlabRuntimeActiveExternalPostgres(spec);
|
||||
return {
|
||||
configPath: hwlabRuntimeLaneConfigPath(),
|
||||
node: spec.nodeId,
|
||||
@@ -151,6 +153,7 @@ export function nodeRuntimeExpected(spec: HwlabRuntimeLaneSpec): Record<string,
|
||||
observability: spec.observability,
|
||||
runtimeImageRewrites: spec.runtimeImageRewrites,
|
||||
externalPostgres: spec.externalPostgres === undefined ? null : {
|
||||
active: activeExternalPostgres !== undefined,
|
||||
provider: spec.externalPostgres.provider,
|
||||
configRef: spec.externalPostgres.configRef,
|
||||
serviceName: spec.externalPostgres.serviceName,
|
||||
@@ -178,8 +181,8 @@ export function nodeRuntimeExpected(spec: HwlabRuntimeLaneSpec): Record<string,
|
||||
valuesPrinted: false,
|
||||
},
|
||||
localPostgres: {
|
||||
shouldRender: spec.externalPostgres === undefined,
|
||||
expectedAbsent: spec.externalPostgres !== undefined,
|
||||
shouldRender: spec.runtimeStore?.postgres?.mode !== "platform-service",
|
||||
expectedAbsent: spec.runtimeStore?.postgres?.mode === "platform-service",
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user