diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index fee4fdf00..c8c00cea2 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -17645,6 +17645,10 @@ "eagerExecutionAccepted": { "type": "boolean", "description": "A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and\neager execution was accepted by the server.\nOnly populated by server with version >= 1.29.0." + }, + "previousRunLatestTargetWorkerDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "The previous run's latest target Worker Deployment Version that matching\nhad resolved before this workflow execution commenced. Populated by the\nserver during continue-as-new. Used to detect whether the workflow's\nTarget Version has changed since this run started, preventing infinite\ncontinue-as-new loops for pinned workflows that do not have initial CaN\nbehavior set as AutoUpgrade. Nil for workflows that are not initiated by\na versioned workflow continuing-as-new.\nThis field is used internally by the server and should not be read or\ninterpreted by SDKs." } }, "title": "Always the first event in workflow history" diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index e0283c283..04cf7dd95 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -16459,6 +16459,19 @@ components: A boolean indicating whether the SDK has asked to eagerly execute the first workflow task for this workflow and eager execution was accepted by the server. Only populated by server with version >= 1.29.0. + previousRunLatestTargetWorkerDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: |- + The previous run's latest target Worker Deployment Version that matching + had resolved before this workflow execution commenced. Populated by the + server during continue-as-new. Used to detect whether the workflow's + Target Version has changed since this run started, preventing infinite + continue-as-new loops for pinned workflows that do not have initial CaN + behavior set as AutoUpgrade. Nil for workflows that are not initiated by + a versioned workflow continuing-as-new. + This field is used internally by the server and should not be read or + interpreted by SDKs. description: Always the first event in workflow history WorkflowExecutionTerminatedEventAttributes: type: object diff --git a/temporal/api/history/v1/message.proto b/temporal/api/history/v1/message.proto index 2fb99f7e9..8a56ac2e9 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -184,6 +184,17 @@ message WorkflowExecutionStartedEventAttributes { // eager execution was accepted by the server. // Only populated by server with version >= 1.29.0. bool eager_execution_accepted = 38; + + // The previous run's latest target Worker Deployment Version that matching + // had resolved before this workflow execution commenced. Populated by the + // server during continue-as-new. Used to detect whether the workflow's + // Target Version has changed since this run started, preventing infinite + // continue-as-new loops for pinned workflows that do not have initial CaN + // behavior set as AutoUpgrade. Nil for workflows that are not initiated by + // a versioned workflow continuing-as-new. + // This field is used internally by the server and should not be read or + // interpreted by SDKs. + temporal.api.deployment.v1.WorkerDeploymentVersion previous_run_latest_target_worker_deployment_version = 40; } message WorkflowExecutionCompletedEventAttributes {