From 1e164c817d9a18af1e4671c18ab7c49c0b0aab20 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 23 Jul 2026 07:38:11 -0400 Subject: [PATCH 1/2] Update docs for current_retry_interval and next_attempt_schedule_time --- temporal/api/activity/v1/message.proto | 17 +++++++++-------- temporal/api/workflow/v1/message.proto | 14 ++++++++------ 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/temporal/api/activity/v1/message.proto b/temporal/api/activity/v1/message.proto index da0fbe966..f58c32639 100644 --- a/temporal/api/activity/v1/message.proto +++ b/temporal/api/activity/v1/message.proto @@ -135,19 +135,20 @@ message ActivityExecutionInfo { temporal.api.failure.v1.Failure last_failure = 20; string last_worker_identity = 21; - // Time from the last attempt failure to the next activity retry. - // If the activity is currently running, this represents the next retry interval in case the attempt fails. - // If activity is currently backing off between attempt, this represents the current retry interval. - // If there is no next retry allowed, this field will be null. - // This interval is typically calculated from the specified retry policy, but may be modified if an activity fails - // with a retryable application failure specifying a retry delay. + // The retry interval for a currently pending retry: the amount of time between the last attempt + // failure and when the next attempt will become available to worker poll requests. Set only + // during retry backoff, i.e. when an activity is currently waiting for a retry, and the next + // activity task has not yet become available to worker poll requests. Null at all other times, + // including when paused and during start delay. This is calculated from the active retry policy, + // but can be overridden by an activity attempt that fails with a retryable application failure + // specifying a next_retry_delay. google.protobuf.Duration current_retry_interval = 22; // The time when the last activity attempt completed. If activity has not been completed yet, it will be null. google.protobuf.Timestamp last_attempt_complete_time = 23; - // The time when the next activity attempt will be scheduled. - // If activity is currently scheduled or started, this field will be null. + // The time at which the next activity attempt will become available to worker poll requests. + // Set only during start delay, and retry backoff. Null when paused. google.protobuf.Timestamp next_attempt_schedule_time = 24; // The Worker Deployment Version this activity was dispatched to most recently. diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index c09370f7c..88435d489 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -307,17 +307,19 @@ message PendingActivityInfo { // This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv] temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15 [deprecated = true]; - // The time activity will wait until the next retry. - // If activity is currently running it will be next retry interval if activity failed. - // If activity is currently waiting it will be current retry interval. - // If there will be no retry it will be null. + // The retry interval for a currently pending retry: the amount of time between the last attempt + // failure and when the next attempt will become available to worker poll requests. Set only + // during retry backoff, i.e. when an activity is currently waiting for a retry, and the next + // activity task has not yet become available to worker poll requests. Null at all other times + // including when paused. This is calculated from the active retry policy, but can be overridden by + // an activity attempt that fails with a retryable application failure specifying a next_retry_delay. google.protobuf.Duration current_retry_interval = 16; // The time when the last activity attempt was completed. If activity has not been completed yet then it will be null. google.protobuf.Timestamp last_attempt_complete_time = 17; - // Next time when activity will be scheduled. - // If activity is currently scheduled or started it will be null. + // The time at which the next activity attempt will become available to worker poll requests. + // Set only during retry backoff. Null when paused. google.protobuf.Timestamp next_attempt_schedule_time = 18; // Indicates if activity is paused. From 26ad7c34e4a2d31527e476f8ae683fda40b910e5 Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Thu, 23 Jul 2026 20:32:50 -0400 Subject: [PATCH 2/2] autogen --- openapi/openapiv2.json | 8 ++++---- openapi/openapiv3.yaml | 31 +++++++++++++++++-------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 97ff181c9..9a2531d1e 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -13445,7 +13445,7 @@ }, "currentRetryInterval": { "type": "string", - "description": "Time from the last attempt failure to the next activity retry.\nIf the activity is currently running, this represents the next retry interval in case the attempt fails.\nIf activity is currently backing off between attempt, this represents the current retry interval.\nIf there is no next retry allowed, this field will be null.\nThis interval is typically calculated from the specified retry policy, but may be modified if an activity fails\nwith a retryable application failure specifying a retry delay." + "description": "The retry interval for a currently pending retry: the amount of time between the last attempt\nfailure and when the next attempt will become available to worker poll requests. Set only\nduring retry backoff, i.e. when an activity is currently waiting for a retry, and the next\nactivity task has not yet become available to worker poll requests. Null at all other times,\nincluding when paused and during start delay. This is calculated from the active retry policy,\nbut can be overridden by an activity attempt that fails with a retryable application failure\nspecifying a next_retry_delay." }, "lastAttemptCompleteTime": { "type": "string", @@ -13455,7 +13455,7 @@ "nextAttemptScheduleTime": { "type": "string", "format": "date-time", - "description": "The time when the next activity attempt will be scheduled.\nIf activity is currently scheduled or started, this field will be null." + "description": "The time at which the next activity attempt will become available to worker poll requests.\nSet only during start delay, and retry backoff. Null when paused." }, "lastDeploymentVersion": { "$ref": "#/definitions/v1WorkerDeploymentVersion", @@ -17722,7 +17722,7 @@ }, "currentRetryInterval": { "type": "string", - "description": "The time activity will wait until the next retry.\nIf activity is currently running it will be next retry interval if activity failed.\nIf activity is currently waiting it will be current retry interval.\nIf there will be no retry it will be null." + "description": "The retry interval for a currently pending retry: the amount of time between the last attempt\nfailure and when the next attempt will become available to worker poll requests. Set only\nduring retry backoff, i.e. when an activity is currently waiting for a retry, and the next\nactivity task has not yet become available to worker poll requests. Null at all other times\nincluding when paused. This is calculated from the active retry policy, but can be overridden by\nan activity attempt that fails with a retryable application failure specifying a next_retry_delay." }, "lastAttemptCompleteTime": { "type": "string", @@ -17732,7 +17732,7 @@ "nextAttemptScheduleTime": { "type": "string", "format": "date-time", - "description": "Next time when activity will be scheduled.\nIf activity is currently scheduled or started it will be null." + "description": "The time at which the next activity attempt will become available to worker poll requests.\nSet only during retry backoff. Null when paused." }, "paused": { "type": "boolean", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index f2081bd9b..992f882e2 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9790,12 +9790,13 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: |- - Time from the last attempt failure to the next activity retry. - If the activity is currently running, this represents the next retry interval in case the attempt fails. - If activity is currently backing off between attempt, this represents the current retry interval. - If there is no next retry allowed, this field will be null. - This interval is typically calculated from the specified retry policy, but may be modified if an activity fails - with a retryable application failure specifying a retry delay. + The retry interval for a currently pending retry: the amount of time between the last attempt + failure and when the next attempt will become available to worker poll requests. Set only + during retry backoff, i.e. when an activity is currently waiting for a retry, and the next + activity task has not yet become available to worker poll requests. Null at all other times, + including when paused and during start delay. This is calculated from the active retry policy, + but can be overridden by an activity attempt that fails with a retryable application failure + specifying a next_retry_delay. lastAttemptCompleteTime: type: string description: The time when the last activity attempt completed. If activity has not been completed yet, it will be null. @@ -9803,8 +9804,8 @@ components: nextAttemptScheduleTime: type: string description: |- - The time when the next activity attempt will be scheduled. - If activity is currently scheduled or started, this field will be null. + The time at which the next activity attempt will become available to worker poll requests. + Set only during start delay, and retry backoff. Null when paused. format: date-time lastDeploymentVersion: allOf: @@ -14156,10 +14157,12 @@ components: pattern: ^-?(?:0|[1-9][0-9]{0,11})(?:\.[0-9]{1,9})?s$ type: string description: |- - The time activity will wait until the next retry. - If activity is currently running it will be next retry interval if activity failed. - If activity is currently waiting it will be current retry interval. - If there will be no retry it will be null. + The retry interval for a currently pending retry: the amount of time between the last attempt + failure and when the next attempt will become available to worker poll requests. Set only + during retry backoff, i.e. when an activity is currently waiting for a retry, and the next + activity task has not yet become available to worker poll requests. Null at all other times + including when paused. This is calculated from the active retry policy, but can be overridden by + an activity attempt that fails with a retryable application failure specifying a next_retry_delay. lastAttemptCompleteTime: type: string description: The time when the last activity attempt was completed. If activity has not been completed yet then it will be null. @@ -14167,8 +14170,8 @@ components: nextAttemptScheduleTime: type: string description: |- - Next time when activity will be scheduled. - If activity is currently scheduled or started it will be null. + The time at which the next activity attempt will become available to worker poll requests. + Set only during retry backoff. Null when paused. format: date-time paused: type: boolean