diff --git a/temporal/api/workflow/v1/message.proto b/temporal/api/workflow/v1/message.proto index 8f191d35e..f57130b26 100644 --- a/temporal/api/workflow/v1/message.proto +++ b/temporal/api/workflow/v1/message.proto @@ -100,6 +100,9 @@ message PendingWorkflowTaskInfo { google.protobuf.Timestamp original_scheduled_time = 3 [(gogoproto.stdtime) = true]; google.protobuf.Timestamp started_time = 4 [(gogoproto.stdtime) = true]; int32 attempt = 5; + // If set, this pending workflow task will need to be (or is currently being) handled by a + // a worker using this build id. + string will_use_build_id = 6; } message ResetPoints { diff --git a/temporal/api/workflowservice/v1/request_response.proto b/temporal/api/workflowservice/v1/request_response.proto index 88f9f7569..272c1cbf0 100644 --- a/temporal/api/workflowservice/v1/request_response.proto +++ b/temporal/api/workflowservice/v1/request_response.proto @@ -769,6 +769,9 @@ message QueryWorkflowResponse { message DescribeWorkflowExecutionRequest { string namespace = 1; temporal.api.common.v1.WorkflowExecution execution = 2; + // If set, the response will include which build id shall be used to process the pending + // workflow task, if any. + bool include_pending_workflow_task_build_id = 3; } message DescribeWorkflowExecutionResponse { @@ -1058,6 +1061,12 @@ message GetWorkerBuildIdOrderingRequest { // Limits how many compatible sets will be returned. Specify 1 to only return the current // default major version set. 0 returns all sets. int32 max_sets = 3; + // If set, the response will include information about worker versions which are ready to be + // retired. + bool include_retirement_candidates = 4; + // If set, the response will include information about which versions have open workflows, and + // whether or not there are currently polling workers who are compatible with those versions. + bool include_poller_compatability = 5; } message GetWorkerBuildIdOrderingResponse { // Major version sets, in order from oldest to newest. The last element of the list will always @@ -1066,6 +1075,32 @@ message GetWorkerBuildIdOrderingResponse { // // There may be fewer sets returned than exist, if the request chose to limit this response. repeated temporal.api.taskqueue.v1.CompatibleVersionSet major_version_sets = 1; + + message RetirementCandidate { + // The worker build id which is ready for retirement + string build_id = 1; + // If true, there are no open *or* closed workflows, meaning there is no reason at all + // to keep the worker alive, not even to service queries on closed workflows. If not true, + // then there are no open workflows, but some closed ones. + bool no_closed_workflows = 2; + // Currently polling workers who match the build id ready for retirement + repeated temporal.api.taskqueue.v1.PollerInfo pollers = 3; + } + + // A list of workers who are still live and polling the task queue, but may no longer be needed + // to make progress on open workflows. + repeated RetirementCandidate retirement_candidates = 2; + + message VersionsWithCompatiblePollers { + // The latest build id which completed a workflow task on some open workflow + string most_recent_build_id = 1; + // Currently polling workers who are compatible with `most_recent_build_id`. + repeated temporal.api.taskqueue.v1.PollerInfo pollers = 2; + } + + // A list of versions and pollers who are capable of processing tasks at that version (if any) + // for which there are currently open workflows. + repeated VersionsWithCompatiblePollers active_versions_and_pollers = 3; } // (-- api-linter: core::0134=disabled