diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index ea37162a0..fbd65da2b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -11097,6 +11097,16 @@ } } }, + "VersioningOverrideOneTimeOverride": { + "type": "object", + "properties": { + "targetDeploymentVersion": { + "$ref": "#/definitions/v1WorkerDeploymentVersion", + "description": "Required. Worker Deployment Version to receive the one-time Workflow Task." + } + }, + "description": "Routes Workflow Tasks for this execution to `target_deployment_version`\nuntil a Workflow Task completes on that version, then clears the override.\n\nThis does not force the workflow's normal Versioning Behavior to become\nPinned. After the Workflow Task completes on `target_deployment_version`,\nthe workflow execution's normal Versioning Behavior and Deployment Version\nare taken from the worker's completion response.\n\nFor example, if the target worker reports Pinned, the execution will remain\npinned after this override is cleared. If the target worker reports\nAutoUpgrade, the execution will resume AutoUpgrade routing after this\noverride is cleared.\n\nIf no Workflow Task completes on `target_deployment_version`, this override\nremains pending." + }, "VersioningOverridePinnedOverride": { "type": "object", "properties": { @@ -20147,6 +20157,10 @@ "type": "boolean", "description": "Override the workflow to have AutoUpgrade behavior." }, + "oneTime": { + "$ref": "#/definitions/VersioningOverrideOneTimeOverride", + "description": "Temporarily override workflow task routing to a specific Worker Deployment Version\nuntil one Workflow Task completes there. After completion, the workflow\nexecution's Versioning Behavior and Deployment Version come from the\nworker's completion response." + }, "behavior": { "$ref": "#/definitions/v1VersioningBehavior", "description": "Required.\nDeprecated. Use `override`." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a2ec27cdd..161b651fb 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -18343,6 +18343,16 @@ components: autoUpgrade: type: boolean description: Override the workflow to have AutoUpgrade behavior. + oneTime: + allOf: + - $ref: '#/components/schemas/VersioningOverride_OneTimeOverride' + description: |- + Temporarily override workflow task routing to a specific Worker Deployment Version + until one Workflow Task completes there. After completion, the workflow + execution's Versioning Behavior and Deployment Version come from the + worker's completion response. + (-- api-linter: core::0142::time-field-type=disabled + aip.dev/not-precedent: one_time describes one-time routing semantics, not a timestamp or duration. --) behavior: enum: - VERSIONING_BEHAVIOR_UNSPECIFIED @@ -18377,6 +18387,29 @@ components: Pinned behavior overrides are automatically inherited by child workflows, workflow retries, continue-as-new workflows, and cron workflows. + VersioningOverride_OneTimeOverride: + type: object + properties: + targetDeploymentVersion: + allOf: + - $ref: '#/components/schemas/WorkerDeploymentVersion' + description: Required. Worker Deployment Version to receive the one-time Workflow Task. + description: |- + Routes Workflow Tasks for this execution to `target_deployment_version` + until a Workflow Task completes on that version, then clears the override. + + This does not force the workflow's normal Versioning Behavior to become + Pinned. After the Workflow Task completes on `target_deployment_version`, + the workflow execution's normal Versioning Behavior and Deployment Version + are taken from the worker's completion response. + + For example, if the target worker reports Pinned, the execution will remain + pinned after this override is cleared. If the target worker reports + AutoUpgrade, the execution will resume AutoUpgrade routing after this + override is cleared. + + If no Workflow Task completes on `target_deployment_version`, this override + remains pending. VersioningOverride_PinnedOverride: type: object properties: diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 4d35cb74b..3b015c0e7 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -614,6 +614,14 @@ message VersioningOverride { // Override the workflow to have AutoUpgrade behavior. bool auto_upgrade = 4; + + // Temporarily override workflow task routing to a specific Worker Deployment Version + // until one Workflow Task completes there. After completion, the workflow + // execution's Versioning Behavior and Deployment Version come from the + // worker's completion response. + // (-- api-linter: core::0142::time-field-type=disabled + // aip.dev/not-precedent: one_time describes one-time routing semantics, not a timestamp or duration. --) + OneTimeOverride one_time = 5; } // Required. @@ -647,6 +655,26 @@ message VersioningOverride { temporal.api.deployment.v1.WorkerDeploymentVersion version = 2; } + // Routes Workflow Tasks for this execution to `target_deployment_version` + // until a Workflow Task completes on that version, then clears the override. + // + // This does not force the workflow's normal Versioning Behavior to become + // Pinned. After the Workflow Task completes on `target_deployment_version`, + // the workflow execution's normal Versioning Behavior and Deployment Version + // are taken from the worker's completion response. + // + // For example, if the target worker reports Pinned, the execution will remain + // pinned after this override is cleared. If the target worker reports + // AutoUpgrade, the execution will resume AutoUpgrade routing after this + // override is cleared. + // + // If no Workflow Task completes on `target_deployment_version`, this override + // remains pending. + message OneTimeOverride { + // Required. Worker Deployment Version to receive the one-time Workflow Task. + temporal.api.deployment.v1.WorkerDeploymentVersion target_deployment_version = 1; + } + enum PinnedOverrideBehavior { // Unspecified. PINNED_OVERRIDE_BEHAVIOR_UNSPECIFIED = 0;