diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ea5c6c69a..79d7c0c7d 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -12040,6 +12040,15 @@ } } }, + "v1DeclinedTargetVersionUpgrade": { + "type": "object", + "properties": { + "deploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion" + } + }, + "description": "Wrapper for a target deployment version that the SDK declined to upgrade to.\nSee declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes." + }, "v1DeleteNexusEndpointResponse": { "type": "object" }, @@ -17719,6 +17728,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." + }, + "declinedTargetVersionUpgrade": { + "$ref": "#/definitions/v1DeclinedTargetVersionUpgrade", + "description": "During a previous run of this workflow, the server may have notified the SDK\nthat the Target Worker Deployment Version changed, but the SDK declined to\nupgrade (e.g., by continuing-as-new with PINNED behavior). This field records\nthe target version that was declined.\n\nThis is a wrapper message to distinguish \"never declined\" (nil wrapper) from\n\"declined an unversioned target\" (non-nil wrapper with nil deployment_version).\n\nUsed internally by the server during continue-as-new and retry.\nShould not be read or interpreted by SDKs." } }, "title": "Always the first event in workflow history" diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 4ccc94584..24c527682 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9226,6 +9226,14 @@ components: data: type: string format: bytes + DeclinedTargetVersionUpgrade: + type: object + properties: + deploymentVersion: + $ref: '#/components/schemas/WorkerDeploymentVersion' + description: |- + Wrapper for a target deployment version that the SDK declined to upgrade to. + See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes. DeleteNexusEndpointResponse: type: object properties: {} @@ -16528,6 +16536,20 @@ 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. + declinedTargetVersionUpgrade: + allOf: + - $ref: '#/components/schemas/DeclinedTargetVersionUpgrade' + description: |- + During a previous run of this workflow, the server may have notified the SDK + that the Target Worker Deployment Version changed, but the SDK declined to + upgrade (e.g., by continuing-as-new with PINNED behavior). This field records + the target version that was declined. + + This is a wrapper message to distinguish "never declined" (nil wrapper) from + "declined an unversioned target" (non-nil wrapper with nil deployment_version). + + Used internally by the server during continue-as-new and retry. + 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..21fb13c5e 100644 --- a/temporal/api/history/v1/message.proto +++ b/temporal/api/history/v1/message.proto @@ -184,6 +184,24 @@ message WorkflowExecutionStartedEventAttributes { // eager execution was accepted by the server. // Only populated by server with version >= 1.29.0. bool eager_execution_accepted = 38; + + // During a previous run of this workflow, the server may have notified the SDK + // that the Target Worker Deployment Version changed, but the SDK declined to + // upgrade (e.g., by continuing-as-new with PINNED behavior). This field records + // the target version that was declined. + // + // This is a wrapper message to distinguish "never declined" (nil wrapper) from + // "declined an unversioned target" (non-nil wrapper with nil deployment_version). + // + // Used internally by the server during continue-as-new and retry. + // Should not be read or interpreted by SDKs. + DeclinedTargetVersionUpgrade declined_target_version_upgrade = 40; +} + +// Wrapper for a target deployment version that the SDK declined to upgrade to. +// See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes. +message DeclinedTargetVersionUpgrade { + temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 1; } message WorkflowExecutionCompletedEventAttributes {