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
+3 -2
View File
@@ -34,6 +34,7 @@ import { transPath } from "./runtime-common";
import { bootstrapAdminSecretScript, cloudApiDbSecretScript, codeAgentProviderSecretScript, masterAdminApiKeySecretScript, obsoletePlatformDbCleanupScript, obsoletePlatformDbStatusFromText, obsoleteSecretCleanupScript, openFgaSecretScript, ownedPostgresCleanupScript, platformDbSecretStatusScript, secretStatusFromText } from "./secret-scripts";
import { assertLane, assertNodeId, compactCommandResult, keyValueLinesFromText, numericField, optionValue, positiveIntegerOption, readMasterAdminApiKey, requiredOption, shellQuote, statusText } from "./utils";
import { parseEnvFile, readBootstrapAdminSecretMaterial, syncNodeExternalPostgresSecrets } from "./web-probe";
import { hwlabRuntimeActiveExternalPostgres } from "../hwlab-node-lanes";
export function isSafeWebProbeScriptRunDir(value: string | null): value is string {
return typeof value === "string"
@@ -191,10 +192,10 @@ export function parseSecretOptions(args: string[]): NodeSecretOptions {
export function runtimeSecretSpec(input: { node: string; lane: string }): RuntimeSecretSpec {
const namespace = `hwlab-${input.lane}`;
const runtimeLaneSpec = isHwlabRuntimeLane(input.lane) ? hwlabRuntimeLaneSpecForNode(input.lane, input.node) : undefined;
const externalPostgres = runtimeLaneSpec?.externalPostgres;
const externalPostgres = runtimeLaneSpec === undefined ? undefined : hwlabRuntimeActiveExternalPostgres(runtimeLaneSpec);
const postgresStore = runtimeLaneSpec?.runtimeStore?.postgres;
const bootstrapAdmin = runtimeLaneSpec?.bootstrapAdmin;
const platformDb = externalPostgres !== undefined || postgresStore?.mode === "platform-service";
const platformDb = postgresStore?.mode === "platform-service";
const localPostgresService = postgresStore?.serviceName ?? `${namespace}-postgres`;
const platformPostgresService = externalPostgres?.serviceName ?? postgresStore?.serviceName ?? "g14-platform-postgres";
const platformPostgresRuntimeAccess = externalPostgres?.runtimeAccess;