-
Notifications
You must be signed in to change notification settings - Fork 88
Add Poller Group fields #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ShahabT
wants to merge
5
commits into
master
Choose a base branch
from
shahab/mcn
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f527fa5
Add poller groups
ShahabT 641feb1
rename resource_id to routing key for nexus
ShahabT c2c5995
fix typo
ShahabT f603150
Merge remote-tracking branch 'refs/remotes/origin/master' into shahab…
ShahabT 3385ec2
Add poller group fields
ShahabT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -257,6 +257,11 @@ message GetWorkflowExecutionHistoryReverseResponse { | |
| message PollWorkflowTaskQueueRequest { | ||
| string namespace = 1; | ||
| temporal.api.taskqueue.v1.TaskQueue task_queue = 2; | ||
| // Client must pass one of the poller group IDs received in `poller_group_infos` of the last | ||
| // the PollWorkflowTaskQueueResponse according to the instructions. If not set, the poll is | ||
| // routed randomly which can cause it being blocked without receiving a task while the queue | ||
| // actually has tasks in another server location. | ||
| string poller_group_id = 9; | ||
| // The identity of the worker/client who is polling this task queue | ||
| string identity = 3; | ||
| // A unique key for this worker instance, used for tracking worker lifecycle. | ||
|
|
@@ -275,7 +280,7 @@ message PollWorkflowTaskQueueRequest { | |
| temporal.api.deployment.v1.WorkerDeploymentOptions deployment_options = 6; | ||
|
|
||
| // Removed in 1.55.0; was temporal.api.worker.v1.WorkerHeartbeat worker_heartbeat | ||
| reserved 7; | ||
| reserved 7; | ||
| reserved "worker_heartbeat"; | ||
| } | ||
|
|
||
|
|
@@ -331,6 +336,16 @@ message PollWorkflowTaskQueueResponse { | |
| repeated temporal.api.protocol.v1.Message messages = 15; | ||
| // Server-advised information the SDK may use to adjust its poller count. | ||
| temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 16; | ||
| // This poller group ID identifies the owner of the workflow task awaiting for query response. | ||
| // Corresponding RespondQueryTaskCompleted should pass this value for proper routing. | ||
| string poller_group_id = 17; | ||
| // The weighted list of poller groups IDs that client should use for future polls to this task | ||
| // queue. Client is expected to: | ||
| // 1. Maintain minimum number of pollers no less than the number of groups. | ||
| // 2. Try to assign the next poll to a group without any pending polls, | ||
| // 3. If every group has some pending polls, assign the next poll to a group randomly | ||
| // according to the weights. | ||
| repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 18; | ||
| } | ||
|
|
||
| message RespondWorkflowTaskCompletedRequest { | ||
|
|
@@ -443,6 +458,11 @@ message RespondWorkflowTaskFailedResponse { | |
| message PollActivityTaskQueueRequest { | ||
| string namespace = 1; | ||
| temporal.api.taskqueue.v1.TaskQueue task_queue = 2; | ||
| // Client must pass one of the poller group IDs received in `poller_group_infos` of the last | ||
| // the PollActivityTaskQueueResponse according to the instructions. If not set, the poll is | ||
| // routed randomly which can cause it being blocked without receiving a task while the queue | ||
| // actually has tasks in another server location. | ||
| string poller_group_id = 9; | ||
| // The identity of the worker/client | ||
| string identity = 3; | ||
| // A unique key for this worker instance, used for tracking worker lifecycle. | ||
|
|
@@ -516,6 +536,13 @@ message PollActivityTaskQueueResponse { | |
| temporal.api.common.v1.Priority priority = 19; | ||
| // The run ID of the activity execution, only set for standalone activities. | ||
| string activity_run_id = 20; | ||
| // The weighted list of poller groups IDs that client should use for future polls to this task | ||
| // queue. Client is expected to: | ||
| // 1. Maintain minimum number of pollers no less than the number of groups. | ||
| // 2. Try to assign the next poll to a group without any pending polls, | ||
| // 3. If every group has some pending polls, assign the next poll to a group randomly | ||
| // according to the weights. | ||
| repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 21; | ||
| } | ||
|
|
||
| message RecordActivityTaskHeartbeatRequest { | ||
|
|
@@ -1028,6 +1055,9 @@ message RespondQueryTaskCompletedRequest { | |
| // Why did the task fail? It's important to note that many of the variants in this enum cannot | ||
| // apply to worker responses. See the type's doc for more. | ||
| temporal.api.enums.v1.WorkflowTaskFailedCause cause = 8; | ||
| // Client must forward the poller_group_id received in PollWorkflowTaskQueueResponse for proper | ||
| // routing of the response. | ||
| string poller_group_id = 9; | ||
| } | ||
|
|
||
| message RespondQueryTaskCompletedResponse { | ||
|
|
@@ -1868,12 +1898,17 @@ message PollWorkflowExecutionUpdateResponse { | |
|
|
||
| message PollNexusTaskQueueRequest { | ||
| string namespace = 1; | ||
| temporal.api.taskqueue.v1.TaskQueue task_queue = 3; | ||
| // Client must pass one of the poller group IDs received in `poller_group_infos` of the last | ||
| // the PollNexusTaskQueueResponse according to the instructions. If not set, the poll is | ||
| // routed randomly which can cause it being blocked without receiving a task while the queue | ||
| // actually has tasks in another server location. | ||
| string poller_group_id = 9; | ||
| // The identity of the client who initiated this request. | ||
| string identity = 2; | ||
| // A unique key for this worker instance, used for tracking worker lifecycle. | ||
| // This is guaranteed to be unique, whereas identity is not guaranteed to be unique. | ||
| string worker_instance_key = 8; | ||
| temporal.api.taskqueue.v1.TaskQueue task_queue = 3; | ||
| // Information about this worker's build identifier and if it is choosing to use the versioning | ||
| // feature. See the `WorkerVersionCapabilities` docstring for more. | ||
| // Deprecated. Replaced by deployment_options. | ||
|
|
@@ -1892,6 +1927,21 @@ message PollNexusTaskQueueResponse { | |
| temporal.api.nexus.v1.Request request = 2; | ||
| // Server-advised information the SDK may use to adjust its poller count. | ||
| temporal.api.taskqueue.v1.PollerScalingDecision poller_scaling_decision = 3; | ||
| // Should be returned in RespondNexusTaskCompletedRequest and RespondNexusTaskFailedRequest | ||
| // for proper routing of handler's response. | ||
| string routing_key = 4; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Routing key is new to me. How does this differ from poller_group_id, or is it meant to have been replaced?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this shouldn't be here, deleting it. |
||
| // This poller group ID identifies the owner of the nexus task awaiting for synchronous | ||
| // response. | ||
| // Corresponding `RespondNexusTaskCompleted` and `RespondNexusTaskFailed` calls should pass this | ||
| // value for proper response routing. | ||
| string poller_group_id = 5; | ||
| // The weighted list of poller groups IDs that client should use for future polls to this task | ||
| // queue. Client is expected to: | ||
| // 1. Maintain minimum number of pollers no less than the number of groups. | ||
| // 2. Try to assign the next poll to a group without any pending polls, | ||
| // 3. If every group has some pending polls, assign the next poll to a group randomly | ||
| // according to the weights. | ||
| repeated temporal.api.taskqueue.v1.PollerGroupInfo poller_group_infos = 6; | ||
| } | ||
|
|
||
| message RespondNexusTaskCompletedRequest { | ||
|
|
@@ -1902,6 +1952,9 @@ message RespondNexusTaskCompletedRequest { | |
| bytes task_token = 3; | ||
| // Embedded response to be translated into a frontend response. | ||
| temporal.api.nexus.v1.Response response = 4; | ||
| // Client must forward the poller_group_id received in PollNexusTaskQueueResponse for proper | ||
| // routing of the response. | ||
| string poller_group_id = 5; | ||
| } | ||
|
|
||
| message RespondNexusTaskCompletedResponse { | ||
|
|
@@ -1917,6 +1970,9 @@ message RespondNexusTaskFailedRequest { | |
| temporal.api.nexus.v1.HandlerError error = 4 [deprecated = true]; | ||
| // The error the handler failed with. Must contain a NexusHandlerFailureInfo object. | ||
| temporal.api.failure.v1.Failure failure = 5; | ||
| // Client must forward the poller_group_id received in PollNexusTaskQueueResponse for proper | ||
| // routing of the response. | ||
| string poller_group_id = 6; | ||
| } | ||
|
|
||
| message RespondNexusTaskFailedResponse { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we clarify that is expected to be unset the first time?