diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 6da2b5b0f..67fbce039 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -7515,11 +7515,19 @@ }, "type": { "type": "string", - "description": "Pause all running activities of this type." + "description": "Pause activities of this type." + }, + "pauseAll": { + "type": "boolean", + "description": "Pause all activities." }, "reason": { "type": "string", "description": "Reason to pause the activity." + }, + "activityState": { + "$ref": "#/definitions/v1PauseOptionActivityState", + "description": "which activities to pause - current, future or both." } } }, @@ -8381,11 +8389,11 @@ }, "type": { "type": "string", - "description": "Unpause all running activities with of this type." + "description": "Unpause activities of this type." }, "unpauseAll": { "type": "boolean", - "description": "Unpause all running activities." + "description": "Unpause all activities." }, "resetAttempts": { "type": "boolean", @@ -8398,6 +8406,10 @@ "jitter": { "type": "string", "description": "If set, the activity will start at a random time within the specified jitter duration." + }, + "activityState": { + "$ref": "#/definitions/v1PauseOptionActivityState", + "description": "which activities to unpause - current, future or both." } } }, @@ -12105,6 +12117,17 @@ "v1PauseActivityResponse": { "type": "object" }, + "v1PauseOptionActivityState": { + "type": "string", + "enum": [ + "PAUSE_OPTION_ACTIVITY_STATE_UNSPECIFIED", + "PAUSE_OPTION_ACTIVITY_STATE_RUNNING", + "PAUSE_OPTION_ACTIVITY_STATE_FUTURE", + "PAUSE_OPTION_ACTIVITY_STATE_BOTH" + ], + "default": "PAUSE_OPTION_ACTIVITY_STATE_UNSPECIFIED", + "description": "Pause option activity state is used to specify if we want to pause/unpause just the current activity, or just the future activities or both." + }, "v1Payload": { "description": "Arbitrary payload data in an unconstrained format.\nThis may be activity input parameters, a workflow result, a memo, etc.\n" }, diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 5c3cccb7b..af95feae4 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9083,10 +9083,22 @@ components: description: Only the activity with this ID will be paused. type: type: string - description: Pause all running activities of this type. + description: Pause activities of this type. + pauseAll: + type: boolean + description: Pause all activities. reason: type: string description: Reason to pause the activity. + activityState: + enum: + - PAUSE_OPTION_ACTIVITY_STATE_UNSPECIFIED + - PAUSE_OPTION_ACTIVITY_STATE_RUNNING + - PAUSE_OPTION_ACTIVITY_STATE_FUTURE + - PAUSE_OPTION_ACTIVITY_STATE_BOTH + type: string + description: which activities to pause - current, future or both. + format: enum PauseActivityResponse: type: object properties: {} @@ -11989,10 +12001,10 @@ components: description: Only the activity with this ID will be unpaused. type: type: string - description: Unpause all running activities with of this type. + description: Unpause activities of this type. unpauseAll: type: boolean - description: Unpause all running activities. + description: Unpause all activities. resetAttempts: type: boolean description: Providing this flag will also reset the number of attempts. @@ -12003,6 +12015,15 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: If set, the activity will start at a random time within the specified jitter duration. + activityState: + enum: + - PAUSE_OPTION_ACTIVITY_STATE_UNSPECIFIED + - PAUSE_OPTION_ACTIVITY_STATE_RUNNING + - PAUSE_OPTION_ACTIVITY_STATE_FUTURE + - PAUSE_OPTION_ACTIVITY_STATE_BOTH + type: string + description: which activities to unpause - current, future or both. + format: enum UnpauseActivityResponse: type: object properties: {} diff --git a/temporal/api/enums/v1/workflow.proto b/temporal/api/enums/v1/workflow.proto index 7d0e1ba29..efcbe7634 100644 --- a/temporal/api/enums/v1/workflow.proto +++ b/temporal/api/enums/v1/workflow.proto @@ -161,3 +161,11 @@ enum VersioningBehavior { // complete on the old Version. VERSIONING_BEHAVIOR_AUTO_UPGRADE = 2; } + +// Pause option activity state is used to specify if we want to pause/unpause just the current activity, or just the future activities or both. +enum PauseOptionActivityState { + PAUSE_OPTION_ACTIVITY_STATE_UNSPECIFIED = 0; + PAUSE_OPTION_ACTIVITY_STATE_RUNNING = 1; + PAUSE_OPTION_ACTIVITY_STATE_FUTURE = 2; + PAUSE_OPTION_ACTIVITY_STATE_BOTH = 3; +} diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 180dbba75..c17393c22 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -1905,12 +1905,17 @@ message PauseActivityRequest { oneof activity { // Only the activity with this ID will be paused. string id = 4; - // Pause all running activities of this type. + // Pause activities of this type. string type = 5; + // Pause all activities. + bool pause_all = 7; } // Reason to pause the activity. string reason = 6; + + // which activities to pause - current, future or both. + temporal.api.enums.v1.PauseOptionActivityState activity_state = 8; } message PauseActivityResponse { @@ -1929,9 +1934,9 @@ message UnpauseActivityRequest { oneof activity { // Only the activity with this ID will be unpaused. string id = 4; - // Unpause all running activities with of this type. + // Unpause activities of this type. string type = 5; - // Unpause all running activities. + // Unpause all activities. bool unpause_all = 6; } @@ -1943,6 +1948,9 @@ message UnpauseActivityRequest { // If set, the activity will start at a random time within the specified jitter duration. google.protobuf.Duration jitter = 9; + + // which activities to unpause - current, future or both. + temporal.api.enums.v1.PauseOptionActivityState activity_state = 10; } message UnpauseActivityResponse { @@ -2208,8 +2216,8 @@ message ListWorkerDeploymentsResponse { google.protobuf.Timestamp create_time = 2; temporal.api.deployment.v1.RoutingConfig routing_config = 3; // Summary of the version that was added most recently in the Worker Deployment. - temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary latest_version_summary = 4; - // Summary of the current version of the Worker Deployment. + temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary latest_version_summary = 4; + // Summary of the current version of the Worker Deployment. temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary current_version_summary = 5; // Summary of the ramping version of the Worker Deployment. temporal.api.deployment.v1.WorkerDeploymentInfo.WorkerDeploymentVersionSummary ramping_version_summary = 6;