fix(hwlab): expose runtime store retry config (#543)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-21 09:17:20 +08:00
committed by GitHub
parent c5db0494ee
commit ac4de2c1d5
2 changed files with 15 additions and 0 deletions
+3
View File
@@ -143,6 +143,9 @@ lanes:
postgres:
poolMax: 16
connectionTimeoutMs: 5000
queryRetryMaxAttempts: 5
queryRetryInitialDelayMs: 250
queryRetryMaxDelayMs: 5000
tektonDir: tekton-v03
argoApplicationFile: application-v03.yaml
registryPrefix: 127.0.0.1:5000/hwlab
+12
View File
@@ -82,6 +82,9 @@ export interface HwlabRuntimeExternalPostgresSpec {
export interface HwlabRuntimePostgresStoreSpec {
readonly poolMax: number;
readonly connectionTimeoutMs?: number;
readonly queryRetryMaxAttempts?: number;
readonly queryRetryInitialDelayMs?: number;
readonly queryRetryMaxDelayMs?: number;
}
export interface HwlabRuntimeStoreSpec {
@@ -596,6 +599,15 @@ function runtimeStoreConfig(value: unknown, path: string): HwlabRuntimeStoreSpec
...(postgres.connectionTimeoutMs === undefined
? {}
: { connectionTimeoutMs: numberField(postgres, "connectionTimeoutMs", `${path}.postgres`) }),
...(postgres.queryRetryMaxAttempts === undefined
? {}
: { queryRetryMaxAttempts: numberField(postgres, "queryRetryMaxAttempts", `${path}.postgres`) }),
...(postgres.queryRetryInitialDelayMs === undefined
? {}
: { queryRetryInitialDelayMs: numberField(postgres, "queryRetryInitialDelayMs", `${path}.postgres`) }),
...(postgres.queryRetryMaxDelayMs === undefined
? {}
: { queryRetryMaxDelayMs: numberField(postgres, "queryRetryMaxDelayMs", `${path}.postgres`) }),
},
}),
};