Skip to content
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

Add fields for batch request/response #216

Merged
merged 9 commits into from
Aug 22, 2022
Merged

Conversation

yux0
Copy link
Contributor

@yux0 yux0 commented Aug 9, 2022

What changed?
Add fields for batch request/response

Why?

  1. Add reason and operator in stop batch operation request
  2. Add operator in describe batch operation response.

Breaking changes

@yux0 yux0 requested review from a team as code owners August 9, 2022 16:12
Comment on lines 1070 to 1072
string reason = 3;
// Operator of the operation
string operator = 4;
Copy link
Member

Choose a reason for hiding this comment

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

will those be required fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Comment on lines 1102 to 1103
// Operator indicates the batch operation starter identity
string operator = 9;
Copy link
Member

Choose a reason for hiding this comment

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

This might be confusing. The batch operation start request has the identity field, which as explained is the identity of the worker/client, is this operator the same as that identity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to identity

@@ -1111,6 +1117,8 @@ message DescribeBatchOperationResponse {
int64 complete_operation_count = 7;
// Failure operation count
int64 failure_operation_count = 8;
// Identity indicates the operator identity
string identity = 9;
Copy link
Member

Choose a reason for hiding this comment

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

I'd put the reason in the response too

Copy link
Member

Choose a reason for hiding this comment

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

(Only set in stop ATM)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call out. Added.

@@ -1064,6 +1064,8 @@ message StartBatchOperationRequest {
string namespace = 1;
// Visibility query defines the the group of workflow to do batch operation
string visibility_query = 2;
// Job ID defines the unique ID for the batch job
string job_id = 3;
Copy link
Member

Choose a reason for hiding this comment

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

Is this required? If so, why do we need it in the response? It's a bit confusing IMHO.

Copy link
Member

Choose a reason for hiding this comment

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

Should this include a reason too? I know terminate and cancel batch operations include a reason but signal doesn't.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had a discussion. To avoid duplication, we allow pass in job id. And I will remove the job_id from response. The reason is included in the operation options.

Copy link
Member

Choose a reason for hiding this comment

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

No reason for signal though..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. There are two options termination, cancellation, signal. The first two options contain reason.

Copy link
Member

Choose a reason for hiding this comment

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

I'd consider adding a reason here and remove it from the batch operations so there can be a reason for batch signal too.

Comment on lines 1078 to 1079
reserved 1;
reserved "job_id";
Copy link
Member

Choose a reason for hiding this comment

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

Since this was never released it's okay to delete at this point without reserving the field.

@yux0 yux0 merged commit 239f02f into temporalio:master Aug 22, 2022
@yux0 yux0 deleted the batch-misc branch August 22, 2022 21:42
@yux0 yux0 mentioned this pull request Aug 22, 2022
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.

None yet

3 participants