Skip to content

feat: support batch operations on standalone activities#806

Open
spkane31 wants to merge 8 commits into
mainfrom
spk/saa-batch-cmds
Open

feat: support batch operations on standalone activities#806
spkane31 wants to merge 8 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.

@spkane31 spkane31 marked this pull request as ready for review July 6, 2026 19:21
@spkane31 spkane31 requested review from a team July 6, 2026 19:21
spkane31 and others added 8 commits July 6, 2026 13:50
(cherry picked from commit df25e68)
(cherry picked from commit c0f0a83)
(cherry picked from commit 801d7ee)
(cherry picked from commit 895384d)
(cherry picked from commit 5a08550)
(cherry picked from commit 737f6c7)
(cherry picked from commit 9bc1a44)
@spkane31 spkane31 force-pushed the spk/saa-batch-cmds branch from 49df6cb to 97b2fe7 Compare July 6, 2026 19:53
@spkane31 spkane31 requested a review from fretz12 July 6, 2026 19:56
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