diff --git a/config/hwlab-node-lanes.yaml b/config/hwlab-node-lanes.yaml index f7bfe98e..2bb9b970 100644 --- a/config/hwlab-node-lanes.yaml +++ b/config/hwlab-node-lanes.yaml @@ -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 diff --git a/scripts/src/hwlab-node-lanes.ts b/scripts/src/hwlab-node-lanes.ts index 9bb19d2b..f3c81f99 100644 --- a/scripts/src/hwlab-node-lanes.ts +++ b/scripts/src/hwlab-node-lanes.ts @@ -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`) }), }, }), };