Skip to content

Commit 21b27ff

Browse files
authored
Allow SetCurrent and SetRamping to a version that has never seen pollers, if opt in (#634)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted._ <!-- Describe what has changed in this PR --> Allow SetCurrent and SetRamping to a version that has never seen pollers, if opt in <!-- Tell your future self why have you made these changes --> So that users can call SetCurrent or SetRamping as part of their Deployment pipelines, before the workers have actually been deployed and started polling. This should only be available to users who opt in and understand that their tasks won't be picked up until the pollers arrive. This has been requested by multiple users. <!-- Are there any breaking changes on binary or code level? --> **Breaking changes** <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> **Server PR**
1 parent 2e5751c commit 21b27ff

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

openapi/openapiv2.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8392,6 +8392,10 @@
83928392
"ignoreMissingTaskQueues": {
83938393
"type": "boolean",
83948394
"description": "Optional. By default this request would be rejected if not all the expected Task Queues are\nbeing polled by the new Version, to protect against accidental removal of Task Queues, or\nworker health issues. Pass `true` here to bypass this protection.\nThe set of expected Task Queues is the set of all the Task Queues that were ever poller by\nthe existing Current Version of the Deployment, with the following exclusions:\n - Task Queues that are not used anymore (inferred by having empty backlog and a task\n add_rate of 0.)\n - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue\n having a different Current Version than the Current Version of this deployment.)\nWARNING: Do not set this flag unless you are sure that the missing task queue pollers are not\nneeded. If the request is unexpectedly rejected due to missing pollers, then that means the\npollers have not reached to the server yet. Only set this if you expect those pollers to\nnever arrive."
8395+
},
8396+
"allowNoPollers": {
8397+
"type": "boolean",
8398+
"description": "Optional. By default this request will be rejected if no pollers have been seen for the proposed\nCurrent Version, in order to protect users from routing tasks to pollers that do not exist, leading\nto possible timeouts. Pass `true` here to bypass this protection."
83958399
}
83968400
},
83978401
"description": "Set/unset the Current Version of a Worker Deployment."
@@ -8424,6 +8428,10 @@
84248428
"ignoreMissingTaskQueues": {
84258429
"type": "boolean",
84268430
"description": "Optional. By default this request would be rejected if not all the expected Task Queues are\nbeing polled by the new Version, to protect against accidental removal of Task Queues, or\nworker health issues. Pass `true` here to bypass this protection.\nThe set of expected Task Queues equals to all the Task Queues ever polled from the existing\nCurrent Version of the Deployment, with the following exclusions:\n - Task Queues that are not used anymore (inferred by having empty backlog and a task\n add_rate of 0.)\n - Task Queues that are moved to another Worker Deployment (inferred by the Task Queue\n having a different Current Version than the Current Version of this deployment.)\nWARNING: Do not set this flag unless you are sure that the missing task queue poller are not\nneeded. If the request is unexpectedly rejected due to missing pollers, then that means the\npollers have not reached to the server yet. Only set this if you expect those pollers to\nnever arrive.\nNote: this check only happens when the ramping version is about to change, not every time\nthat the percentage changes. Also note that the check is against the deployment's Current\nVersion, not the previous Ramping Version."
8431+
},
8432+
"allowNoPollers": {
8433+
"type": "boolean",
8434+
"description": "Optional. By default this request will be rejected if no pollers have been seen for the proposed\nCurrent Version, in order to protect users from routing tasks to pollers that do not exist, leading\nto possible timeouts. Pass `true` here to bypass this protection."
84278435
}
84288436
},
84298437
"description": "Set/unset the Ramping Version of a Worker Deployment and its ramp percentage."

openapi/openapiv3.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11423,6 +11423,12 @@ components:
1142311423
needed. If the request is unexpectedly rejected due to missing pollers, then that means the
1142411424
pollers have not reached to the server yet. Only set this if you expect those pollers to
1142511425
never arrive.
11426+
allowNoPollers:
11427+
type: boolean
11428+
description: |-
11429+
Optional. By default this request will be rejected if no pollers have been seen for the proposed
11430+
Current Version, in order to protect users from routing tasks to pollers that do not exist, leading
11431+
to possible timeouts. Pass `true` here to bypass this protection.
1142611432
description: Set/unset the Current Version of a Worker Deployment.
1142711433
SetWorkerDeploymentCurrentVersionResponse:
1142811434
type: object
@@ -11491,6 +11497,12 @@ components:
1149111497
Note: this check only happens when the ramping version is about to change, not every time
1149211498
that the percentage changes. Also note that the check is against the deployment's Current
1149311499
Version, not the previous Ramping Version.
11500+
allowNoPollers:
11501+
type: boolean
11502+
description: |-
11503+
Optional. By default this request will be rejected if no pollers have been seen for the proposed
11504+
Current Version, in order to protect users from routing tasks to pollers that do not exist, leading
11505+
to possible timeouts. Pass `true` here to bypass this protection.
1149411506
description: Set/unset the Ramping Version of a Worker Deployment and its ramp percentage.
1149511507
SetWorkerDeploymentRampingVersionResponse:
1149611508
type: object

temporal/api/workflowservice/v1/request_response.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,6 +2165,10 @@ message SetWorkerDeploymentCurrentVersionRequest {
21652165
// pollers have not reached to the server yet. Only set this if you expect those pollers to
21662166
// never arrive.
21672167
bool ignore_missing_task_queues = 6;
2168+
// Optional. By default this request will be rejected if no pollers have been seen for the proposed
2169+
// Current Version, in order to protect users from routing tasks to pollers that do not exist, leading
2170+
// to possible timeouts. Pass `true` here to bypass this protection.
2171+
bool allow_no_pollers = 9;
21682172
}
21692173

21702174
message SetWorkerDeploymentCurrentVersionResponse {
@@ -2217,6 +2221,10 @@ message SetWorkerDeploymentRampingVersionRequest {
22172221
// that the percentage changes. Also note that the check is against the deployment's Current
22182222
// Version, not the previous Ramping Version.
22192223
bool ignore_missing_task_queues = 7;
2224+
// Optional. By default this request will be rejected if no pollers have been seen for the proposed
2225+
// Current Version, in order to protect users from routing tasks to pollers that do not exist, leading
2226+
// to possible timeouts. Pass `true` here to bypass this protection.
2227+
bool allow_no_pollers = 10;
22202228
}
22212229

22222230
message SetWorkerDeploymentRampingVersionResponse {

0 commit comments

Comments
 (0)