Skip to content

Commit 2404e88

Browse files
committed
Add a IMPORTANT note to the ProdTaskRunExecution
1 parent 88b36f5 commit 2404e88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ export const TaskRunExecutionPayload = z.object({
1616

1717
export type TaskRunExecutionPayload = z.infer<typeof TaskRunExecutionPayload>;
1818

19+
// **IMPORTANT NOTE**: If you change this schema, make sure it is backwards compatible with the previous version as this also used when a worker signals to the coordinator that a TaskRun is complete.
20+
// Strategies for not breaking backwards compatibility:
21+
// 1. Add new fields as optional
22+
// 2. If a field is required, add a default value
1923
export const ProdTaskRunExecution = TaskRunExecution.extend({
2024
worker: z.object({
2125
id: z.string(),

0 commit comments

Comments
 (0)