Skip to content

Commit d30267c

Browse files
Shivs11claude
authored andcommitted
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 d3a593c commit d30267c

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
@@ -12942,6 +12942,11 @@
1294212942
"properties": {
1294312943
"deploymentVersion": {
1294412944
"$ref": "#/definitions/v1WorkerDeploymentVersion"
12945+
},
12946+
"revisionNumber": {
12947+
"type": "string",
12948+
"format": "int64",
12949+
"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."
1294512950
}
1294612951
},
1294712952
"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
@@ -9827,6 +9827,13 @@ components:
98279827
properties:
98289828
deploymentVersion:
98299829
$ref: '#/components/schemas/WorkerDeploymentVersion'
9830+
revisionNumber:
9831+
type: string
9832+
description: |-
9833+
Revision number of the task queue routing config at the time the target
9834+
was declined. If an incoming target's revision is <= this value, it is
9835+
not newer and is not used for deciding whether or not to suppress the
9836+
upgrade signal.
98309837
description: |-
98319838
Wrapper for a target deployment version that the SDK declined to upgrade to.
98329839
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)