Skip to content

Commit 1515646

Browse files
Shivs11claude
andauthored
Add revision_number to DeclinedTargetVersionUpgrade (#762)
<!-- Describe what has changed in this PR --> - Added `revision_number` to `DeclinedTargetVersionUpgrade`, which already took in a deployment version. - Recap about what `DeclinedTargetVersionUpgrade` does: the main intention of this field was to "remember" which target version we have rejected when a pinned workflow declines to AU when CAN'ing. However, you could have matching partitions send you back stale target deployment versions, and we don't want to "bounce back" and CAN our pinned workflows when they see such a stale version. For that very purpose, we resort to now store the revision number here. <!-- Tell your future self why have you made these changes --> - I explained it above <!-- Are there any breaking changes on binary or code level? --> - None, changes are additive. - Also, no changes required from the SDK perspective <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> temporalio/temporal#9895 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 64552cf commit 1515646

3 files changed

Lines changed: 17 additions & 0 deletions

File tree

openapi/openapiv2.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12875,6 +12875,11 @@
1287512875
"properties": {
1287612876
"deploymentVersion": {
1287712877
"$ref": "#/definitions/v1WorkerDeploymentVersion"
12878+
},
12879+
"revisionNumber": {
12880+
"type": "string",
12881+
"format": "int64",
12882+
"description": "Revision number of the task queue routing config at the time the target\nwas declined. If an incoming target's revision is <= this value, it is\nnot newer and is not used for deciding whether or not to suppress the\nupgrade signal."
1287812883
}
1287912884
},
1288012885
"description": "Wrapper for a target deployment version that the SDK declined to upgrade to.\nSee declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes."

openapi/openapiv3.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9757,6 +9757,13 @@ components:
97579757
properties:
97589758
deploymentVersion:
97599759
$ref: '#/components/schemas/WorkerDeploymentVersion'
9760+
revisionNumber:
9761+
type: string
9762+
description: |-
9763+
Revision number of the task queue routing config at the time the target
9764+
was declined. If an incoming target's revision is <= this value, it is
9765+
not newer and is not used for deciding whether or not to suppress the
9766+
upgrade signal.
97609767
description: |-
97619768
Wrapper for a target deployment version that the SDK declined to upgrade to.
97629769
See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes.

temporal/api/history/v1/message.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ message WorkflowExecutionStartedEventAttributes {
210210
// See declined_target_version_upgrade on WorkflowExecutionStartedEventAttributes.
211211
message DeclinedTargetVersionUpgrade {
212212
temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 1;
213+
// Revision number of the task queue routing config at the time the target
214+
// was declined. If an incoming target's revision is <= this value, it is
215+
// not newer and is not used for deciding whether or not to suppress the
216+
// upgrade signal.
217+
int64 revision_number = 2;
213218
}
214219

215220
message WorkflowExecutionCompletedEventAttributes {

0 commit comments

Comments
 (0)