Skip to content

Commit 748565c

Browse files
authored
Fix backwards compatible execution by allowing additional properties to passthrough (#2327)
1 parent 8b31871 commit 748565c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/v3/schemas/common.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ export const TaskRunExecutionDeployment = z.object({
311311
export type TaskRunExecutionDeployment = z.infer<typeof TaskRunExecutionDeployment>;
312312

313313
const StaticTaskRunExecutionShape = {
314-
task: TaskRunExecutionTask,
314+
// Passthrough needed for backwards compatibility
315+
task: TaskRunExecutionTask.passthrough(),
315316
queue: TaskRunExecutionQueue,
316317
environment: TaskRunExecutionEnvironment,
317318
organization: TaskRunExecutionOrganization,
@@ -326,7 +327,8 @@ export const StaticTaskRunExecution = z.object(StaticTaskRunExecutionShape);
326327
export type StaticTaskRunExecution = z.infer<typeof StaticTaskRunExecution>;
327328

328329
export const TaskRunExecution = z.object({
329-
attempt: TaskRunExecutionAttempt,
330+
// Passthrough needed for backwards compatibility
331+
attempt: TaskRunExecutionAttempt.passthrough(),
330332
run: TaskRun.and(
331333
z.object({
332334
traceContext: z.record(z.unknown()).optional(),

0 commit comments

Comments
 (0)