-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add batch workflow refresh tasks #8793
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
base: main
Are you sure you want to change the base?
Conversation
bfd3e1b to
32e6d5e
Compare
32e6d5e to
94f9a55
Compare
|
Haven't review the actual changes yet but for the tdbg experience, let’s match what we have in the temporal CLI. so something like `tdbg workflow refresh-tasks -q '' means to start a batch operation. and if -q is not specified and --wid is specified, then it's not a batch op, but only operating on that single workflow. |
| string namespace = 1; | ||
|
|
||
| // Visibility query defines the group of workflows to apply the batch operation. | ||
| // This field and `executions` are mutually exclusive. |
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.
I think we will want to support a list of executions as well, that can be quite useful during incident mitigation, but can be done as a follow up item.
|
|
||
| // BatchOperationRefreshWorkflowTasks refreshes workflow tasks for batch workflows. | ||
| // This regenerates all pending tasks for each workflow. | ||
| message BatchOperationRefreshWorkflowTasks { |
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.
plz remove Workflow from the names
| // Archetype to use for the refresh operation. If not specified, defaults to workflow archetype. | ||
| string archetype = 2; |
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.
hmm why do we need this? I mean the visibility records contain the archetype information.
| // The request to start the batch operation. | ||
| temporal.api.workflowservice.v1.StartBatchOperationRequest request = 7; | ||
|
|
||
| // The request to start an admin batch operation. |
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.
plz comment that this field and request are mutually exclusive.
plz also add a comment for batch_type and say that it only applies to request
What changed?
Add batch workflow refresh tasks Admin API.
Add tdbg commands to invoke
StartAdminBatchOperation.Details
AdminBatchOperations are executed in the Batched System Worker, similar to existing Frontend BatchOperations. The worker activity will fetch pages of workflow executions to perform operations on, and periodically heartbeat its results. For RefreshWorkflowTasks, each individual Refresh call will go through the admin handler.
Refreshing Workflow Tasks regenerates all pending tasks of an execution given its mutable state.
CLI usage
Why?
Unblock new Matcher migration and allow for general use case batch Admin calls. Currently, only supports
BatchOperationRefreshWorkflowTasks.How did you test it?