Skip to content

feat: support batch operations on standalone activities#806

Draft
spkane31 wants to merge 10 commits into
mainfrom
spk/saa-batch-cmds
Draft

feat: support batch operations on standalone activities#806
spkane31 wants to merge 10 commits into
mainfrom
spk/saa-batch-cmds

Conversation

@spkane31

@spkane31 spkane31 commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What changed?
Support batch Terminate, RequestCancellation, and Delete for standalone activities.

Why?
This will have parity with workflow where we can perform these batch operations.

Breaking changes
None

Server PR
PR#10803

@spkane31 spkane31 force-pushed the spk/saa-batch-cmds branch from 8e8ecf8 to 895384d Compare June 18, 2026 23:10
Comment thread temporal/api/batch/v1/message.proto Outdated
string identity = 9;
// Reason indicates the reason to stop a operation
string reason = 10;
string query = 11;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs would be helpful

Comment thread temporal/api/workflowservice/v1/request_response.proto Outdated
enum BatchOperationType {
BATCH_OPERATION_TYPE_UNSPECIFIED = 0;
// DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead.
BATCH_OPERATION_TYPE_TERMINATE = 1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use [deprecated = true]
Apply all occurrences

BATCH_OPERATION_TYPE_UNSPECIFIED = 0;
// DEPRECATED: Use BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW instead.
BATCH_OPERATION_TYPE_TERMINATE = 1;
BATCH_OPERATION_TYPE_TERMINATE_WORKFLOW = 13;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I missed it- was the an agreed upon in discussion? Why not just keep BATCH_OPERATION_TYPE_TERMINATE as undeprecated for workflow and update comment accordingly?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was agreed up in discussion to have a duplication of the TERMINATE so we can explicitly say the terminate is for either workflows or activities. We want to specify the execution type in the batch operation.

// will be applied to all executions that are in the same execution chain
// as any of the archetype executions. This field and `visibility_query`
// are mutually exclusive.
repeated temporal.api.common.v1.Execution archetype_executions = 22;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a fan of this field name; archtype is terminology for server internals. But I can't think of something better

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree on both of your points, unfortunately we can't reuse the name executions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants