Skip to content

Commit d123940

Browse files
committed
fix(supervisor): refuse to start if reclaim is on without deployment tokens
1 parent 3388dd6 commit d123940

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

apps/supervisor/src/env.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,14 @@ export const Env = z
327327
path: ["WORKLOAD_TOKEN_SECRET"],
328328
});
329329
}
330+
if (data.DELETE_CHECKPOINTS_ON_COMPLETION && data.WORKLOAD_TOKEN_ENFORCEMENT === "disabled") {
331+
ctx.addIssue({
332+
code: z.ZodIssueCode.custom,
333+
message:
334+
"DELETE_CHECKPOINTS_ON_COMPLETION needs WORKLOAD_TOKEN_ENFORCEMENT set to log or enforce: the tenancy it deletes by comes from the deployment token, so with tokens disabled it would silently reclaim nothing",
335+
path: ["DELETE_CHECKPOINTS_ON_COMPLETION"],
336+
});
337+
}
330338
if (
331339
data.TRIGGER_DEQUEUE_BACKPRESSURE_ENABLED &&
332340
!data.TRIGGER_DEQUEUE_BACKPRESSURE_REDIS_HOST

0 commit comments

Comments
 (0)