Merge pull request #2720 from pikasTech/fix/hwpod-postgres-timeouts
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / platform-infra-gitea-nc01- Success
Pipelines as Code CI / unidesk-host- Success

fix: 声明 HWPOD PostgreSQL 健康超时
This commit is contained in:
Lyon
2026-07-21 09:18:40 +08:00
committed by GitHub
4 changed files with 10 additions and 0 deletions
+2
View File
@@ -212,6 +212,7 @@ lanes:
autoExpandRunning: false
autoCollapseTerminal: false
hwpod:
healthTimeoutMs: 6000
runtimeApiUrl: https://lab-dev.hwpod.com
runtimeApiAuth:
sourceRef: hwlab/nc01-v03-admin.env
@@ -222,6 +223,7 @@ lanes:
sourceKey: DATABASE_URL
schema: hwpod
table: runtime_specs
connectionTimeoutMs: 5000
builtInConfigRefs:
- config/hwlab-hwpod-preinstalls/constart-71freq-c.yaml#hwpodPreinstall.specDocument
publicExposure:
@@ -64,7 +64,9 @@ test("L1 HWPOD spec registry resolves PostgreSQL authority and frozen built-ins
sourceKey: "DATABASE_URL",
schema: "hwpod",
table: "runtime_specs",
connectionTimeoutMs: 5000,
});
expect(native!.healthTimeoutMs).toBe(6000);
expect(native!.specRegistry.builtInConfigRefs).toHaveLength(1);
const resolved = resolveConfigRef(native!.specRegistry.builtInConfigRefs[0], "HWPOD built-in spec");
expect(resolved.value).toMatchObject({ kind: "Hwpod", metadata: { name: "constart-71freq-c" } });
+2
View File
@@ -298,6 +298,7 @@ function hwlabHwpodNativeDevelopmentEnvironment(native: NonNullable<HwlabRuntime
});
return {
HWPOD_NATIVE_SERVICE_STATE_DIR: native.stateDir,
HWPOD_HEALTH_TIMEOUT_MS: String(native.healthTimeoutMs),
HWPOD_PUBLIC_BASE_URL: native.publicExposure.publicBaseUrl,
HWPOD_TEMPORAL_ADDRESS: native.temporal.address,
HWPOD_TEMPORAL_NAMESPACE: native.temporal.namespace,
@@ -311,6 +312,7 @@ function hwlabHwpodNativeDevelopmentEnvironment(native: NonNullable<HwlabRuntime
HWPOD_SPEC_DATABASE_URL: databaseUrl,
HWPOD_SPEC_DATABASE_SCHEMA: native.specRegistry.database.schema,
HWPOD_SPEC_DATABASE_TABLE: native.specRegistry.database.table,
HWPOD_SPEC_DATABASE_CONNECTION_TIMEOUT_MS: String(native.specRegistry.database.connectionTimeoutMs),
HWPOD_BUILTIN_SPEC_DOCUMENTS_JSON: JSON.stringify(builtInSpecs),
HWPOD_API_BIND_HOST: native.api.bindHost,
HWPOD_API_PROBE_HOST: native.api.probeHost,
+4
View File
@@ -739,6 +739,7 @@ export interface HwlabRuntimeNativeDevelopmentSpec {
readonly hwpod?: {
readonly publicExposure: HwlabRuntimeNativePublicExposureSpec;
readonly stateDir: string;
readonly healthTimeoutMs: number;
readonly runtimeApiUrl: string;
readonly runtimeApiAuth: { readonly sourceRef: string; readonly sourceKey: string };
readonly specRegistry: {
@@ -747,6 +748,7 @@ export interface HwlabRuntimeNativeDevelopmentSpec {
readonly sourceKey: string;
readonly schema: string;
readonly table: string;
readonly connectionTimeoutMs: number;
};
readonly builtInConfigRefs: readonly string[];
};
@@ -1647,6 +1649,7 @@ function nativeHwpodConfig(value: unknown, path: string): NonNullable<HwlabRunti
return {
publicExposure: nativePublicExposureConfig(raw.publicExposure, `${path}.publicExposure`),
stateDir: relativeWorkspacePathField(stringField(raw, "stateDir", path), `${path}.stateDir`),
healthTimeoutMs: numberField(raw, "healthTimeoutMs", path),
runtimeApiUrl: httpUrlField(raw, "runtimeApiUrl", path),
runtimeApiAuth: {
sourceRef: stringField(runtimeApiAuth, "sourceRef", `${path}.runtimeApiAuth`),
@@ -1658,6 +1661,7 @@ function nativeHwpodConfig(value: unknown, path: string): NonNullable<HwlabRunti
sourceKey: stringField(database, "sourceKey", `${path}.specRegistry.database`),
schema: postgresIdentifierField(database, "schema", `${path}.specRegistry.database`),
table: postgresIdentifierField(database, "table", `${path}.specRegistry.database`),
connectionTimeoutMs: numberField(database, "connectionTimeoutMs", `${path}.specRegistry.database`),
},
builtInConfigRefs: stringArrayField(specRegistry, "builtInConfigRefs", `${path}.specRegistry`),
},