From 2ebdf31f173d4c13e6b61ec9301f6b22c2fe965c Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 20 Dec 2024 14:29:26 -0800 Subject: [PATCH 1/4] Add original_start_time to the workflow execution started event --- temporal/api/history/v1/message.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 065f2bba..6960f5fd 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -133,6 +133,10 @@ message WorkflowExecutionStartedEventAttributes { string inherited_build_id = 32; // Versioning override applied to this workflow when it was started. temporal.api.workflow.v1.VersioningOverride versioning_override = 33; + + // This is the start time when the WorkflowExecutionStarted event was written. + // A workflow reset will change execution start time, but will preserve this field. + google.protobuf.Timestamp original_execution_start_time = 34; } message WorkflowExecutionCompletedEventAttributes { From b54b39cea680bb0c5bf69192956c6d9a5fcb5540 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 20 Dec 2024 14:36:16 -0800 Subject: [PATCH 2/4] openapi changes --- openapi/openapiv2.json | 5 +++++ openapi/openapiv3.yaml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ca105596..338588e4 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13230,6 +13230,11 @@ "versioningOverride": { "$ref": "#/definitions/v1VersioningOverride", "description": "Versioning override applied to this workflow when it was started." + }, + "originalExecutionStartTime": { + "type": "string", + "format": "date-time", + "description": "This is the start time when the WorkflowExecutionStarted event was written.\nA workflow reset will change execution start time, but will preserve this field." } }, "title": "Always the first event in workflow history" diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 01547435..a6ef45c9 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10743,6 +10743,12 @@ components: allOf: - $ref: '#/components/schemas/VersioningOverride' description: Versioning override applied to this workflow when it was started. + originalExecutionStartTime: + type: string + description: |- + This is the start time when the WorkflowExecutionStarted event was written. + A workflow reset will change execution start time, but will preserve this field. + format: date-time description: Always the first event in workflow history WorkflowExecutionTerminatedEventAttributes: type: object From 9a47b72ffdedb312e995278f4f6b717300f14833 Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 20 Dec 2024 14:45:05 -0800 Subject: [PATCH 3/4] group this field with original_run_id --- temporal/api/history/v1/message.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 6960f5fd..7f6ddefd 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -77,6 +77,10 @@ message WorkflowExecutionStartedEventAttributes { // This is the run id when the WorkflowExecutionStarted event was written. // A workflow reset changes the execution run_id, but preserves this field. string original_execution_run_id = 14; + // This is the start time when the WorkflowExecutionStarted event was written. + // A workflow reset will change execution start time, but will preserve this field. + google.protobuf.Timestamp original_execution_start_time = 34; + // Identity of the client who requested this execution string identity = 15; // This is the very first runId along the chain of ContinueAsNew, Retry, Cron and Reset. @@ -133,10 +137,6 @@ message WorkflowExecutionStartedEventAttributes { string inherited_build_id = 32; // Versioning override applied to this workflow when it was started. temporal.api.workflow.v1.VersioningOverride versioning_override = 33; - - // This is the start time when the WorkflowExecutionStarted event was written. - // A workflow reset will change execution start time, but will preserve this field. - google.protobuf.Timestamp original_execution_start_time = 34; } message WorkflowExecutionCompletedEventAttributes { From 7e2d30d558537c6ef35dc1ff1d95e1bae9191cba Mon Sep 17 00:00:00 2001 From: Yuri Date: Fri, 20 Dec 2024 14:48:30 -0800 Subject: [PATCH 4/4] more openapi changes --- openapi/openapiv2.json | 10 +++++----- openapi/openapiv3.yaml | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 338588e4..8f7fbfc8 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13157,6 +13157,11 @@ "type": "string", "description": "This is the run id when the WorkflowExecutionStarted event was written.\nA workflow reset changes the execution run_id, but preserves this field." }, + "originalExecutionStartTime": { + "type": "string", + "format": "date-time", + "description": "This is the start time when the WorkflowExecutionStarted event was written.\nA workflow reset will change execution start time, but will preserve this field." + }, "identity": { "type": "string", "title": "Identity of the client who requested this execution" @@ -13230,11 +13235,6 @@ "versioningOverride": { "$ref": "#/definitions/v1VersioningOverride", "description": "Versioning override applied to this workflow when it was started." - }, - "originalExecutionStartTime": { - "type": "string", - "format": "date-time", - "description": "This is the start time when the WorkflowExecutionStarted event was written.\nA workflow reset will change execution start time, but will preserve this field." } }, "title": "Always the first event in workflow history" diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a6ef45c9..418f4ea0 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -10655,6 +10655,12 @@ components: description: |- This is the run id when the WorkflowExecutionStarted event was written. A workflow reset changes the execution run_id, but preserves this field. + originalExecutionStartTime: + type: string + description: |- + This is the start time when the WorkflowExecutionStarted event was written. + A workflow reset will change execution start time, but will preserve this field. + format: date-time identity: type: string description: Identity of the client who requested this execution @@ -10743,12 +10749,6 @@ components: allOf: - $ref: '#/components/schemas/VersioningOverride' description: Versioning override applied to this workflow when it was started. - originalExecutionStartTime: - type: string - description: |- - This is the start time when the WorkflowExecutionStarted event was written. - A workflow reset will change execution start time, but will preserve this field. - format: date-time description: Always the first event in workflow history WorkflowExecutionTerminatedEventAttributes: type: object