From d58dd11a2d801e4d47638ab1f6651824e9a5865a Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Fri, 31 Jul 2026 22:56:29 -0400 Subject: [PATCH 1/3] Drop reset_attempts and reset_heartbeat from UnpauseActivityExecution Unpause resumes an activity; it should not also mutate the attempt counter or discard the heartbeat checkpoint. Neither selective form has demonstrated user demand, and an operator who wants either would look for it on Reset. Ship the simple API first. The field numbers and names are reserved. The deprecated UnpauseActivity, the batch operations, and the Reset APIs are untouched. make proto --- openapi/openapiv2.json | 8 -------- openapi/openapiv3.yaml | 6 ------ temporal/api/workflowservice/v1/request_response.proto | 7 ++----- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 86c2f18ad..a4536fb8f 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13011,14 +13011,6 @@ "type": "string", "description": "The identity of the client who initiated this request." }, - "resetAttempts": { - "type": "boolean", - "description": "Providing this flag will also reset the number of attempts." - }, - "resetHeartbeat": { - "type": "boolean", - "description": "Providing this flag will also reset the heartbeat details." - }, "reason": { "type": "string", "description": "Reason to unpause the activity." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index c2db54abc..a77ea3d45 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -18187,12 +18187,6 @@ components: identity: type: string description: The identity of the client who initiated this request. - resetAttempts: - type: boolean - description: Providing this flag will also reset the number of attempts. - resetHeartbeat: - type: boolean - description: Providing this flag will also reset the heartbeat details. reason: type: string description: Reason to unpause the activity. diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 871ea71f2..24b1d03d0 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -2327,11 +2327,8 @@ message UnpauseActivityExecutionRequest { // The identity of the client who initiated this request. string identity = 5; - // Providing this flag will also reset the number of attempts. - bool reset_attempts = 6; - - // Providing this flag will also reset the heartbeat details. - bool reset_heartbeat = 7; + reserved 6, 7; + reserved "reset_attempts", "reset_heartbeat"; // Reason to unpause the activity. string reason = 8; From 1cc925e48bbdd11c21dd8c313c88cdd67fe82085 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 1 Aug 2026 09:28:56 -0400 Subject: [PATCH 2/3] Extend the unpause simplification to the workflow-activity API Drops reset_attempts and reset_heartbeat from the deprecated UnpauseActivity and from BatchOperationUnpauseActivities, so unpause means the same thing on every surface. Numbers and names reserved. The Reset APIs keep their flags: Reset is the operation that restarts an activity as if on its first attempt. make proto --- openapi/openapiv2.json | 28 +++---------- openapi/openapiv3.yaml | 40 +++++++++---------- temporal/api/batch/v1/message.proto | 7 +--- .../workflowservice/v1/request_response.proto | 7 +--- temporal/api/workflowservice/v1/service.proto | 10 +++-- 5 files changed, 34 insertions(+), 58 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index a4536fb8f..d6381271b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -303,7 +303,7 @@ "/api/v1/namespaces/{namespace}/activities-deprecated/unpause": { "post": { "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", + "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "UnpauseActivity2", "responses": { "200": { @@ -929,7 +929,7 @@ "/api/v1/namespaces/{namespace}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution2", "responses": { "200": { @@ -4950,7 +4950,7 @@ "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution4", "responses": { "200": { @@ -5956,7 +5956,7 @@ "/namespaces/{namespace}/activities-deprecated/unpause": { "post": { "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", + "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "UnpauseActivity", "responses": { "200": { @@ -6582,7 +6582,7 @@ "/namespaces/{namespace}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution", "responses": { "200": { @@ -10533,7 +10533,7 @@ "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution3", "responses": { "200": { @@ -12985,14 +12985,6 @@ "type": "boolean", "description": "Unpause all running activities." }, - "resetAttempts": { - "type": "boolean", - "description": "Providing this flag will also reset the number of attempts." - }, - "resetHeartbeat": { - "type": "boolean", - "description": "Providing this flag will also reset the heartbeat details." - }, "jitter": { "type": "string", "description": "If set, the activity will start at a random time within the specified jitter duration." @@ -14518,14 +14510,6 @@ "matchAll": { "type": "boolean" }, - "resetAttempts": { - "type": "boolean", - "description": "Setting this flag will also reset the number of attempts." - }, - "resetHeartbeat": { - "type": "boolean", - "description": "Setting this flag will also reset the heartbeat details." - }, "jitter": { "type": "string", "description": "If set, the activity will start at a random time within the specified jitter\nduration, introducing variability to the start time." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a77ea3d45..4fb3e451a 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -283,13 +283,13 @@ paths: If there are multiple pending activities of the provided type - all of them will be unpaused. If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + elapses, and immediately (* see 'jitter' flag) if it already has. Once the activity is unpaused, all timeout timers will be regenerated. Flags: 'jitter': the activity will be scheduled at a random time within the jitter duration. - 'reset_attempts': the number of attempts will be reset. - 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and @@ -873,7 +873,9 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + elapses, and immediately (* see 'jitter' flag) if it already has. Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -4168,7 +4170,9 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + elapses, and immediately (* see 'jitter' flag) if it already has. Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -5381,13 +5385,13 @@ paths: If there are multiple pending activities of the provided type - all of them will be unpaused. If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + elapses, and immediately (* see 'jitter' flag) if it already has. Once the activity is unpaused, all timeout timers will be regenerated. Flags: 'jitter': the activity will be scheduled at a random time within the jitter duration. - 'reset_attempts': the number of attempts will be reset. - 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and @@ -5971,7 +5975,9 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + elapses, and immediately (* see 'jitter' flag) if it already has. Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -9208,7 +9214,9 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + elapses, and immediately (* see 'jitter' flag) if it already has. Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -10672,12 +10680,6 @@ components: type: string matchAll: type: boolean - resetAttempts: - type: boolean - description: Setting this flag will also reset the number of attempts. - resetHeartbeat: - type: boolean - description: Setting this flag will also reset the heartbeat details. jitter: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string @@ -18225,12 +18227,6 @@ components: unpauseAll: type: boolean description: Unpause all running activities. - resetAttempts: - type: boolean - description: Providing this flag will also reset the number of attempts. - resetHeartbeat: - type: boolean - description: Providing this flag will also reset the heartbeat details. jitter: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index 63d3fafdb..492b0b8a8 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -140,11 +140,8 @@ message BatchOperationUnpauseActivities { bool match_all = 3; } - // Setting this flag will also reset the number of attempts. - bool reset_attempts = 4; - - // Setting this flag will also reset the heartbeat details. - bool reset_heartbeat = 5; + reserved 4, 5; + reserved "reset_attempts", "reset_heartbeat"; // If set, the activity will start at a random time within the specified jitter // duration, introducing variability to the start time. diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 24b1d03d0..995070d81 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -2302,11 +2302,8 @@ message UnpauseActivityRequest { bool unpause_all = 6; } - // Providing this flag will also reset the number of attempts. - bool reset_attempts = 7; - - // Providing this flag will also reset the heartbeat details. - bool reset_heartbeat = 8; + reserved 7, 8; + reserved "reset_attempts", "reset_heartbeat"; // If set, the activity will start at a random time within the specified jitter duration. google.protobuf.Duration jitter = 9; diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index 768553bd9..f25149fb7 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1413,13 +1413,13 @@ service WorkflowService { // If there are multiple pending activities of the provided type - all of them will be unpaused. // // If activity is not paused, this call will have no effect. - // If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + // Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + // them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + // elapses, and immediately (* see 'jitter' flag) if it already has. // Once the activity is unpaused, all timeout timers will be regenerated. // // Flags: // 'jitter': the activity will be scheduled at a random time within the jitter duration. - // 'reset_attempts': the number of attempts will be reset. - // 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. // // Returns a `NotFound` error if there is no pending activity with the provided ID or type // This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and @@ -1961,7 +1961,9 @@ service WorkflowService { // This API can be used to target a workflow activity or a standalone activity. // // If activity is not paused, this call will have no effect. - // If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). + // Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of + // them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay + // elapses, and immediately (* see 'jitter' flag) if it already has. // Once the activity is unpaused, all timeout timers will be regenerated. // // Returns a `NotFound` error if there is no pending activity with the provided ID From 88e6dbe1ead344a0a4fe6b8d2d11560c34ce2dd4 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 1 Aug 2026 19:20:34 -0400 Subject: [PATCH 3/3] Revert "Extend the unpause simplification to the workflow-activity API" This reverts commit 1cc925e48bbdd11c21dd8c313c88cdd67fe82085. --- openapi/openapiv2.json | 28 ++++++++++--- openapi/openapiv3.yaml | 40 ++++++++++--------- temporal/api/batch/v1/message.proto | 7 +++- .../workflowservice/v1/request_response.proto | 7 +++- temporal/api/workflowservice/v1/service.proto | 10 ++--- 5 files changed, 58 insertions(+), 34 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index d6381271b..a4536fb8f 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -303,7 +303,7 @@ "/api/v1/namespaces/{namespace}/activities-deprecated/unpause": { "post": { "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "UnpauseActivity2", "responses": { "200": { @@ -929,7 +929,7 @@ "/api/v1/namespaces/{namespace}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution2", "responses": { "200": { @@ -4950,7 +4950,7 @@ "/api/v1/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution4", "responses": { "200": { @@ -5956,7 +5956,7 @@ "/namespaces/{namespace}/activities-deprecated/unpause": { "post": { "summary": "UnpauseActivity unpauses the execution of an activity specified by its ID or type.\nIf there are multiple pending activities of the provided type - all of them will be unpaused.", - "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nFlags:\n'jitter': the activity will be scheduled at a random time within the jitter duration.\n'reset_attempts': the number of attempts will be reset.\n'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID or type\nThis API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and\nstructured to work well for standalone activities.", "operationId": "UnpauseActivity", "responses": { "200": { @@ -6582,7 +6582,7 @@ "/namespaces/{namespace}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution", "responses": { "200": { @@ -10533,7 +10533,7 @@ "/namespaces/{namespace}/workflows/{workflowId}/activities/{activityId}/unpause": { "post": { "summary": "UnpauseActivityExecution unpauses the execution of an activity specified by its ID.\nThis API can be used to target a workflow activity or a standalone activity.", - "description": "If activity is not paused, this call will have no effect.\nDispatch delays keep running while an activity is paused, and unpause honors whatever remains of\nthem: an activity paused inside a retry backoff or a start_delay is scheduled when that delay\nelapses, and immediately (* see 'jitter' flag) if it already has.\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", + "description": "If activity is not paused, this call will have no effect.\nIf the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag).\nOnce the activity is unpaused, all timeout timers will be regenerated.\n\nReturns a `NotFound` error if there is no pending activity with the provided ID", "operationId": "UnpauseActivityExecution3", "responses": { "200": { @@ -12985,6 +12985,14 @@ "type": "boolean", "description": "Unpause all running activities." }, + "resetAttempts": { + "type": "boolean", + "description": "Providing this flag will also reset the number of attempts." + }, + "resetHeartbeat": { + "type": "boolean", + "description": "Providing this flag will also reset the heartbeat details." + }, "jitter": { "type": "string", "description": "If set, the activity will start at a random time within the specified jitter duration." @@ -14510,6 +14518,14 @@ "matchAll": { "type": "boolean" }, + "resetAttempts": { + "type": "boolean", + "description": "Setting this flag will also reset the number of attempts." + }, + "resetHeartbeat": { + "type": "boolean", + "description": "Setting this flag will also reset the heartbeat details." + }, "jitter": { "type": "string", "description": "If set, the activity will start at a random time within the specified jitter\nduration, introducing variability to the start time." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 4fb3e451a..a77ea3d45 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -283,13 +283,13 @@ paths: If there are multiple pending activities of the provided type - all of them will be unpaused. If activity is not paused, this call will have no effect. - Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - elapses, and immediately (* see 'jitter' flag) if it already has. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Flags: 'jitter': the activity will be scheduled at a random time within the jitter duration. + 'reset_attempts': the number of attempts will be reset. + 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and @@ -873,9 +873,7 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - elapses, and immediately (* see 'jitter' flag) if it already has. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -4170,9 +4168,7 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - elapses, and immediately (* see 'jitter' flag) if it already has. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -5385,13 +5381,13 @@ paths: If there are multiple pending activities of the provided type - all of them will be unpaused. If activity is not paused, this call will have no effect. - Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - elapses, and immediately (* see 'jitter' flag) if it already has. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Flags: 'jitter': the activity will be scheduled at a random time within the jitter duration. + 'reset_attempts': the number of attempts will be reset. + 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. Returns a `NotFound` error if there is no pending activity with the provided ID or type This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and @@ -5975,9 +5971,7 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - elapses, and immediately (* see 'jitter' flag) if it already has. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -9214,9 +9208,7 @@ paths: This API can be used to target a workflow activity or a standalone activity. If activity is not paused, this call will have no effect. - Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - elapses, and immediately (* see 'jitter' flag) if it already has. + If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). Once the activity is unpaused, all timeout timers will be regenerated. Returns a `NotFound` error if there is no pending activity with the provided ID @@ -10680,6 +10672,12 @@ components: type: string matchAll: type: boolean + resetAttempts: + type: boolean + description: Setting this flag will also reset the number of attempts. + resetHeartbeat: + type: boolean + description: Setting this flag will also reset the heartbeat details. jitter: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string @@ -18227,6 +18225,12 @@ components: unpauseAll: type: boolean description: Unpause all running activities. + resetAttempts: + type: boolean + description: Providing this flag will also reset the number of attempts. + resetHeartbeat: + type: boolean + description: Providing this flag will also reset the heartbeat details. jitter: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string diff --git a/temporal/api/batch/v1/message.proto b/temporal/api/batch/v1/message.proto index 492b0b8a8..63d3fafdb 100644 --- a/temporal/api/batch/v1/message.proto +++ b/temporal/api/batch/v1/message.proto @@ -140,8 +140,11 @@ message BatchOperationUnpauseActivities { bool match_all = 3; } - reserved 4, 5; - reserved "reset_attempts", "reset_heartbeat"; + // Setting this flag will also reset the number of attempts. + bool reset_attempts = 4; + + // Setting this flag will also reset the heartbeat details. + bool reset_heartbeat = 5; // If set, the activity will start at a random time within the specified jitter // duration, introducing variability to the start time. diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 995070d81..24b1d03d0 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -2302,8 +2302,11 @@ message UnpauseActivityRequest { bool unpause_all = 6; } - reserved 7, 8; - reserved "reset_attempts", "reset_heartbeat"; + // Providing this flag will also reset the number of attempts. + bool reset_attempts = 7; + + // Providing this flag will also reset the heartbeat details. + bool reset_heartbeat = 8; // If set, the activity will start at a random time within the specified jitter duration. google.protobuf.Duration jitter = 9; diff --git a/temporal/api/workflowservice/v1/service.proto b/temporal/api/workflowservice/v1/service.proto index f25149fb7..768553bd9 100644 --- a/temporal/api/workflowservice/v1/service.proto +++ b/temporal/api/workflowservice/v1/service.proto @@ -1413,13 +1413,13 @@ service WorkflowService { // If there are multiple pending activities of the provided type - all of them will be unpaused. // // If activity is not paused, this call will have no effect. - // Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - // them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - // elapses, and immediately (* see 'jitter' flag) if it already has. + // If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). // Once the activity is unpaused, all timeout timers will be regenerated. // // Flags: // 'jitter': the activity will be scheduled at a random time within the jitter duration. + // 'reset_attempts': the number of attempts will be reset. + // 'reset_heartbeat': the activity heartbeat timer and heartbeats will be reset. // // Returns a `NotFound` error if there is no pending activity with the provided ID or type // This API will be deprecated soon and replaced with a newer UnpauseActivityExecution that is better named and @@ -1961,9 +1961,7 @@ service WorkflowService { // This API can be used to target a workflow activity or a standalone activity. // // If activity is not paused, this call will have no effect. - // Dispatch delays keep running while an activity is paused, and unpause honors whatever remains of - // them: an activity paused inside a retry backoff or a start_delay is scheduled when that delay - // elapses, and immediately (* see 'jitter' flag) if it already has. + // If the activity was paused while waiting for retry, it will be scheduled immediately (* see 'jitter' flag). // Once the activity is unpaused, all timeout timers will be regenerated. // // Returns a `NotFound` error if there is no pending activity with the provided ID