diff --git a/config/hwlab-web-probe-sentinel/profiles.yaml b/config/hwlab-web-probe-sentinel/profiles.yaml index 081c1c37..460be77c 100644 --- a/config/hwlab-web-probe-sentinel/profiles.yaml +++ b/config/hwlab-web-probe-sentinel/profiles.yaml @@ -228,6 +228,9 @@ nodes: scenarioId: workbench-dsflash-go-hwpod-two-turn-freeze-repro maxSeconds: 360 serviceUnavailablePolicy: structured-failure + cadenceScheduler: + enabled: false + reason: cicd-health-endpoint-only secrets: sources: - <<: *jd01-bootstrap-source diff --git a/scripts/src/hwlab-node-web-sentinel-cicd.ts b/scripts/src/hwlab-node-web-sentinel-cicd.ts index b780f33f..773bb842 100644 --- a/scripts/src/hwlab-node-web-sentinel-cicd.ts +++ b/scripts/src/hwlab-node-web-sentinel-cicd.ts @@ -1102,6 +1102,8 @@ function sentinelCadenceCronJobPlan( imageRef: string, sentinelEnv: readonly Record[], ): Record | null { + const cadenceSchedulerEnabled = booleanAtNullable(cicd, "targetValidation.cadenceScheduler.enabled") === true; + if (!cadenceSchedulerEnabled) return null; const scenarioId = stringAtNullable(cicd, "targetValidation.scenarioId"); if (scenarioId === null) return null; const scenario = scenarioRows(scenarios).find((item) => item.id === scenarioId && item.enabled !== false) ?? null; @@ -3440,6 +3442,11 @@ export function numberAtNullable(value: unknown, path: string): number | null { return typeof found === "number" && Number.isFinite(found) ? found : null; } +function booleanAtNullable(value: unknown, path: string): boolean | null { + const found = valueAtPath(value, path); + return typeof found === "boolean" ? found : null; +} + export function displayPath(pathValue: string): string { if (pathValue.startsWith(`${repoRoot}/`)) return pathValue.slice(repoRoot.length + 1); const marker = "/.worktree/";