-
Notifications
You must be signed in to change notification settings - Fork 68
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
Single Activity API changes #534
Conversation
@@ -1767,8 +1765,18 @@ message UpdateActivityOptionsByIdRequest { | |||
// Controls which fields from `activity_options` will be applied | |||
google.protobuf.FieldMask update_mask = 7; | |||
|
|||
// Used to de-dupe requests | |||
string request_id = 8; | |||
// either activity id or activity type must be provided |
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.
or activity type
This doesn't make sense in an UpdateActivityOptionsByIdRequest
IMO. This API call as named only makes sense for a single activity by ID. If there are batch needs or a non-ID-specific update, maybe a different API call is needed or this one is improperly named.
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.
Being able to provide activity type was part of the feedback. If you have multiple activities of the same type running in parallel (the most common scenario) - you want to pause all of them. Doing this 1 by 1 providing activity ids is tiresome.
You right, now "ByID" make less sense.
As I remember, I added "ByID" because of other "ByID" functions that has the same routings (as opposite to "task token")
I'm totally ok with removing it. It will be a breaking change though.
I also will not call it "batch", it still a single workflow, and we use term "batch" for multiple workflows.
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.
since we are doing this - I also change "workflowID+runID" to execution_info, like in every other API.
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.
looks much cleaner now
// Activity options after an update | ||
temporal.api.activity.v1.ActivityOptions activity_options = 1; | ||
} | ||
|
||
message PauseActivityByIdRequest { | ||
message PauseActivityRequest { |
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.
Will we be adding a should_interrupt
or no_interrupt
flag? Or is that coming later? Not blocking this PR by any means.
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 personally think we shouldn't add anything at all, just come with a good default. If users want to "pause if it fails" then can add this as a "rule".
That said - if we decide to add this kind of flag then yes, it will be in this request.
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.
Yes, this looks much better now.
// UpdateActivityOptionsById is called by the client to update the options of an activity | ||
// (-- api-linter: core::0136::prepositions=disabled | ||
// aip.dev/not-precedent: "By" is used to indicate request type. --) | ||
rpc UpdateActivityOptionsById (UpdateActivityOptionsByIdRequest) returns (UpdateActivityOptionsByIdResponse) { |
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.
While I understand this is not GA, this is a backwards incompatible alteration of a released API, which means it is consumed by proxies. Also, even though it is not GA, it is in the CLI and this incompatible alteration means that the current version of CLI cannot be used for this feature even after the feature is GA. It also means, once tagged, we cannot upgrade the API version in the CLI project (which we may want to do for other reasons) because compile will break until the code is altered to match the new API, and then that may not work with the server.
This is unfortunate but technically doable. As mentioned when these APIs were first getting to master
, this is the cost of not getting further along on implementation.
I would like to request we wait to land this in master
until we have most of the implementation done (maybe it already is), we are ready to tag the API, and we have a PR ready for the CLI to support these incompatible alterations. Then we can merge this and tag the API and update CLI (ignoring that it may not even work with the latest server).
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.
this is the cost of not getting further along on implementation
we fully implement those API before adding it to CLI.
we wait to land this in master until we have most of the implementation done
All (re)implementation is done - see the link to the Server PR in description. Of cause it needs to be changed based on this PR.
I think we should investigate why our buf-breaking didn't cause a CI failure here |
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.
A few more grammar fixes.
I agree with Chad about not merging until we're satisfied with the implementation
Corresponding server PR is in the description.
What changed?
This PR contains a commutative feedback for single activity API:
Why?
Working on single activity API feedback from the design review.
Breaking changes
Yes
Server PR
Add batch activity unpause. Single activity commulative changes