Add a IMPORTANT note to the ProdTaskRunExecution

This commit is contained in:
Eric Allam
2024-06-19 11:16:40 +01:00
parent 88b36f5090
commit 2404e88ac5
+4
View File
@@ -16,6 +16,10 @@ export const TaskRunExecutionPayload = z.object({
export type TaskRunExecutionPayload = z.infer<typeof TaskRunExecutionPayload>;
// **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.
// Strategies for not breaking backwards compatibility:
// 1. Add new fields as optional
// 2. If a field is required, add a default value
export const ProdTaskRunExecution = TaskRunExecution.extend({
worker: z.object({
id: z.string(),