From 3fb47b19cc2c31f7db711b66860bab91043a9dea Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Tue, 12 Aug 2025 12:24:35 -0600 Subject: [PATCH 1/8] pause: add pause information to workflow execution info --- temporal/api/workflow/v1/message.proto | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 1d5737c79..1abd95c43 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -98,6 +98,33 @@ message WorkflowExecutionInfo { // Priority metadata temporal.api.common.v1.Priority priority = 24; + + // Pause info contains the details of the request to pause the workflow. + WorkflowPauseInfo pause_info = 25; +} + +// WorkflowPauseInfo contains the details of the request to pause the workflow. +message WorkflowPauseInfo { + // List of activities that are to be paused. + repeated ActivityPauseInfo activity_pause_infos = 1; +} + +// ActivityPauseInfo contains the details of the request to pause an activity. +message ActivityPauseInfo { + // The time when the activity pause info was updated. + google.protobuf.Timestamp update_time = 1; + + // The type of the activity to be paused. + string activity_type = 2; + + // The identity of the actor that paused the activity. + string identity = 3; + + // The request ID of the request that paused the activity.[] + string request_id = 4; + + // The reason for pausing the activity. + string reason = 5; } // Holds all the extra information about workflow execution that is not part of Visibility. From bfbce3770a567deec5f5ff1225e6047d8376db18 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Tue, 12 Aug 2025 14:53:38 -0600 Subject: [PATCH 2/8] adding pause info to describe workflow execution response --- temporal/api/workflow/v1/message.proto | 2 +- temporal/api/workflowservice/v1/request_response.proto | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 1abd95c43..5275c1161 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -120,7 +120,7 @@ message ActivityPauseInfo { // The identity of the actor that paused the activity. string identity = 3; - // The request ID of the request that paused the activity.[] + // The request ID of the request that paused the activity. string request_id = 4; // The reason for pausing the activity. diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index d6c342d54..3498cdab7 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1042,6 +1042,7 @@ message DescribeWorkflowExecutionResponse { repeated temporal.api.workflow.v1.CallbackInfo callbacks = 6; repeated temporal.api.workflow.v1.PendingNexusOperationInfo pending_nexus_operations = 7; temporal.api.workflow.v1.WorkflowExecutionExtendedInfo workflow_extended_info = 8; + temporal.api.workflow.v1.WorkflowPauseInfo workflow_pause_info = 9; } // (-- api-linter: core::0203::optional=disabled From e43f94f6c465ce80be1ac3aa966e871dbc42edff Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Tue, 12 Aug 2025 15:33:46 -0600 Subject: [PATCH 3/8] remove request id from pause info --- temporal/api/workflow/v1/message.proto | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 5275c1161..6cc60341d 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -120,11 +120,8 @@ message ActivityPauseInfo { // The identity of the actor that paused the activity. string identity = 3; - // The request ID of the request that paused the activity. - string request_id = 4; - // The reason for pausing the activity. - string reason = 5; + string reason = 4; } // Holds all the extra information about workflow execution that is not part of Visibility. From 3b80a8a692668befeb9d97b6a319a28a6ecc65bd Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Tue, 12 Aug 2025 15:39:50 -0600 Subject: [PATCH 4/8] run make proto --- openapi/openapiv2.json | 44 ++++++++++++++++++++++++++++++++++++++++++ openapi/openapiv3.yaml | 32 ++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 99945c383..41971231b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -9296,6 +9296,29 @@ } } }, + "v1ActivityPauseInfo": { + "type": "object", + "properties": { + "updateTime": { + "type": "string", + "format": "date-time", + "description": "The time when the activity pause info was updated." + }, + "activityType": { + "type": "string", + "description": "The type of the activity to be paused." + }, + "identity": { + "type": "string", + "description": "The identity of the actor that paused the activity." + }, + "reason": { + "type": "string", + "description": "The reason for pausing the activity." + } + }, + "description": "ActivityPauseInfo contains the details of the request to pause an activity." + }, "v1ActivityPropertiesModifiedExternallyEventAttributes": { "type": "object", "properties": { @@ -11003,6 +11026,9 @@ }, "workflowExtendedInfo": { "$ref": "#/definitions/v1WorkflowExecutionExtendedInfo" + }, + "workflowPauseInfo": { + "$ref": "#/definitions/v1WorkflowPauseInfo" } } }, @@ -16587,6 +16613,10 @@ "priority": { "$ref": "#/definitions/v1Priority", "title": "Priority metadata" + }, + "pauseInfo": { + "$ref": "#/definitions/v1WorkflowPauseInfo", + "description": "Pause info contains the details of the request to pause the workflow." } }, "description": "Hold basic information about a workflow execution.\nThis structure is a part of visibility, and thus contain a limited subset of information." @@ -16984,6 +17014,20 @@ "default": "WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED", "description": "Defines whether to allow re-using a workflow id from a previously *closed* workflow.\nIf the request is denied, the server returns a `WorkflowExecutionAlreadyStartedFailure` error.\n\nSee `WorkflowIdConflictPolicy` for handling workflow id duplication with a *running* workflow.\n\n - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE: Allow starting a workflow execution using the same workflow id.\n - WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY: Allow starting a workflow execution using the same workflow id, only when the last\nexecution's final state is one of [terminated, cancelled, timed out, failed].\n - WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE: Do not permit re-use of the workflow id for this workflow. Future start workflow requests\ncould potentially change the policy, allowing re-use of the workflow id.\n - WORKFLOW_ID_REUSE_POLICY_TERMINATE_IF_RUNNING: This option belongs in WorkflowIdConflictPolicy but is here for backwards compatibility.\nIf specified, it acts like ALLOW_DUPLICATE, but also the WorkflowId*Conflict*Policy on\nthe request is treated as WORKFLOW_ID_CONFLICT_POLICY_TERMINATE_EXISTING.\nIf no running workflow, then the behavior is the same as ALLOW_DUPLICATE." }, + "v1WorkflowPauseInfo": { + "type": "object", + "properties": { + "activityPauseInfos": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/v1ActivityPauseInfo" + }, + "description": "List of activities that are to be paused." + } + }, + "description": "WorkflowPauseInfo contains the details of the request to pause the workflow." + }, "v1WorkflowPropertiesModifiedEventAttributes": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 82fa0d4db..dc38299b8 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -6508,6 +6508,23 @@ components: description: Maximum permitted time between successful worker heartbeats. retryPolicy: $ref: '#/components/schemas/RetryPolicy' + ActivityPauseInfo: + type: object + properties: + updateTime: + type: string + description: The time when the activity pause info was updated. + format: date-time + activityType: + type: string + description: The type of the activity to be paused. + identity: + type: string + description: The identity of the actor that paused the activity. + reason: + type: string + description: The reason for pausing the activity. + description: ActivityPauseInfo contains the details of the request to pause an activity. ActivityPropertiesModifiedExternallyEventAttributes: type: object properties: @@ -8017,6 +8034,8 @@ components: $ref: '#/components/schemas/PendingNexusOperationInfo' workflowExtendedInfo: $ref: '#/components/schemas/WorkflowExecutionExtendedInfo' + workflowPauseInfo: + $ref: '#/components/schemas/WorkflowPauseInfo' DescribeWorkflowRuleResponse: type: object properties: @@ -14047,6 +14066,10 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata + pauseInfo: + allOf: + - $ref: '#/components/schemas/WorkflowPauseInfo' + description: Pause info contains the details of the request to pause the workflow. description: |- Hold basic information about a workflow execution. This structure is a part of visibility, and thus contain a limited subset of information. @@ -14513,6 +14536,15 @@ components: description: |- Holds all the information about worker versioning for a particular workflow execution. Experimental. Versioning info is experimental and might change in the future. + WorkflowPauseInfo: + type: object + properties: + activityPauseInfos: + type: array + items: + $ref: '#/components/schemas/ActivityPauseInfo' + description: List of activities that are to be paused. + description: WorkflowPauseInfo contains the details of the request to pause the workflow. WorkflowPropertiesModifiedEventAttributes: type: object properties: From 4ebcc40f29acf65d43cfe4e51af26371cdf41b17 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Wed, 13 Aug 2025 09:37:29 -0600 Subject: [PATCH 5/8] remove pause info from workflow execution info --- openapi/openapiv2.json | 4 ---- openapi/openapiv3.yaml | 4 ---- temporal/api/workflow/v1/message.proto | 3 --- 3 files changed, 11 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 41971231b..b0886f42e 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -16613,10 +16613,6 @@ "priority": { "$ref": "#/definitions/v1Priority", "title": "Priority metadata" - }, - "pauseInfo": { - "$ref": "#/definitions/v1WorkflowPauseInfo", - "description": "Pause info contains the details of the request to pause the workflow." } }, "description": "Hold basic information about a workflow execution.\nThis structure is a part of visibility, and thus contain a limited subset of information." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index dc38299b8..7b1c26783 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -14066,10 +14066,6 @@ components: allOf: - $ref: '#/components/schemas/Priority' description: Priority metadata - pauseInfo: - allOf: - - $ref: '#/components/schemas/WorkflowPauseInfo' - description: Pause info contains the details of the request to pause the workflow. description: |- Hold basic information about a workflow execution. This structure is a part of visibility, and thus contain a limited subset of information. diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 6cc60341d..9e074be59 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -98,9 +98,6 @@ message WorkflowExecutionInfo { // Priority metadata temporal.api.common.v1.Priority priority = 24; - - // Pause info contains the details of the request to pause the workflow. - WorkflowPauseInfo pause_info = 25; } // WorkflowPauseInfo contains the details of the request to pause the workflow. From 60ff1b08bac87092c3862dd102e9b175ed9bee71 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Wed, 13 Aug 2025 10:53:03 -0600 Subject: [PATCH 6/8] Update temporal/api/workflow/v1/message.proto Co-authored-by: Roey Berman --- temporal/api/workflow/v1/message.proto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 9e074be59..7e51a1c0d 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -106,7 +106,9 @@ message WorkflowPauseInfo { repeated ActivityPauseInfo activity_pause_infos = 1; } -// ActivityPauseInfo contains the details of the request to pause an activity. +// ActivityPauseInfo contains information about a paused activity type. +// Any pending activity of this type should be either in PAUSE_REQUESTED or PAUSED states. +// Future activities of this type will automatically be put into PAUSED state. message ActivityPauseInfo { // The time when the activity pause info was updated. google.protobuf.Timestamp update_time = 1; From f57ace1f3c1164c838402ea1314dc4c02d3ca3d5 Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Wed, 13 Aug 2025 12:15:33 -0600 Subject: [PATCH 7/8] renaming for clarity --- temporal/api/workflow/v1/message.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 7e51a1c0d..a3da70123 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -102,14 +102,14 @@ message WorkflowExecutionInfo { // WorkflowPauseInfo contains the details of the request to pause the workflow. message WorkflowPauseInfo { - // List of activities that are to be paused. - repeated ActivityPauseInfo activity_pause_infos = 1; + // List of activity types that are paused, any future activities of this type will automatically be put into PAUSED state. + repeated PausedActivities paused_activities = 1; } -// ActivityPauseInfo contains information about a paused activity type. +// PausedActivities contains information about a paused activity type. // Any pending activity of this type should be either in PAUSE_REQUESTED or PAUSED states. // Future activities of this type will automatically be put into PAUSED state. -message ActivityPauseInfo { +message PausedActivities { // The time when the activity pause info was updated. google.protobuf.Timestamp update_time = 1; From 152da7390ddff89135e9a92425a1c3d576ccffbf Mon Sep 17 00:00:00 2001 From: Sean Kane Date: Wed, 13 Aug 2025 12:44:29 -0600 Subject: [PATCH 8/8] update openapi defs --- openapi/openapiv2.json | 52 +++++++++++++++++++++--------------------- openapi/openapiv3.yaml | 43 ++++++++++++++++++---------------- 2 files changed, 49 insertions(+), 46 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index b0886f42e..8878ed651 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -9296,29 +9296,6 @@ } } }, - "v1ActivityPauseInfo": { - "type": "object", - "properties": { - "updateTime": { - "type": "string", - "format": "date-time", - "description": "The time when the activity pause info was updated." - }, - "activityType": { - "type": "string", - "description": "The type of the activity to be paused." - }, - "identity": { - "type": "string", - "description": "The identity of the actor that paused the activity." - }, - "reason": { - "type": "string", - "description": "The reason for pausing the activity." - } - }, - "description": "ActivityPauseInfo contains the details of the request to pause an activity." - }, "v1ActivityPropertiesModifiedExternallyEventAttributes": { "type": "object", "properties": { @@ -12743,6 +12720,29 @@ "v1PauseActivityResponse": { "type": "object" }, + "v1PausedActivities": { + "type": "object", + "properties": { + "updateTime": { + "type": "string", + "format": "date-time", + "description": "The time when the activity pause info was updated." + }, + "activityType": { + "type": "string", + "description": "The type of the activity to be paused." + }, + "identity": { + "type": "string", + "description": "The identity of the actor that paused the activity." + }, + "reason": { + "type": "string", + "description": "The reason for pausing the activity." + } + }, + "description": "PausedActivities contains information about a paused activity type.\nAny pending activity of this type should be either in PAUSE_REQUESTED or PAUSED states.\nFuture activities of this type will automatically be put into PAUSED state." + }, "v1Payload": { "description": "Arbitrary payload data in an unconstrained format.\nThis may be activity input parameters, a workflow result, a memo, etc.\n" }, @@ -17013,13 +17013,13 @@ "v1WorkflowPauseInfo": { "type": "object", "properties": { - "activityPauseInfos": { + "pausedActivities": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/v1ActivityPauseInfo" + "$ref": "#/definitions/v1PausedActivities" }, - "description": "List of activities that are to be paused." + "description": "List of activity types that are paused, any future activities of this type will automatically be put into PAUSED state." } }, "description": "WorkflowPauseInfo contains the details of the request to pause the workflow." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 7b1c26783..50d08f1d1 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -6508,23 +6508,6 @@ components: description: Maximum permitted time between successful worker heartbeats. retryPolicy: $ref: '#/components/schemas/RetryPolicy' - ActivityPauseInfo: - type: object - properties: - updateTime: - type: string - description: The time when the activity pause info was updated. - format: date-time - activityType: - type: string - description: The type of the activity to be paused. - identity: - type: string - description: The identity of the actor that paused the activity. - reason: - type: string - description: The reason for pausing the activity. - description: ActivityPauseInfo contains the details of the request to pause an activity. ActivityPropertiesModifiedExternallyEventAttributes: type: object properties: @@ -9584,6 +9567,26 @@ components: reason: type: string description: Reason why rule was created. Populated from rule description. + PausedActivities: + type: object + properties: + updateTime: + type: string + description: The time when the activity pause info was updated. + format: date-time + activityType: + type: string + description: The type of the activity to be paused. + identity: + type: string + description: The identity of the actor that paused the activity. + reason: + type: string + description: The reason for pausing the activity. + description: |- + PausedActivities contains information about a paused activity type. + Any pending activity of this type should be either in PAUSE_REQUESTED or PAUSED states. + Future activities of this type will automatically be put into PAUSED state. Payload: description: |- Represents some binary (byte array) data (ex: activity input parameters or workflow result) with @@ -14535,11 +14538,11 @@ components: WorkflowPauseInfo: type: object properties: - activityPauseInfos: + pausedActivities: type: array items: - $ref: '#/components/schemas/ActivityPauseInfo' - description: List of activities that are to be paused. + $ref: '#/components/schemas/PausedActivities' + description: List of activity types that are paused, any future activities of this type will automatically be put into PAUSED state. description: WorkflowPauseInfo contains the details of the request to pause the workflow. WorkflowPropertiesModifiedEventAttributes: type: object