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

Definitions for single activity API #440

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

Definitions for single activity API #440

wants to merge 12 commits into from

Conversation

ychebotarev
Copy link
Contributor

@ychebotarev ychebotarev commented Aug 8, 2024

What changed?
Added definitions for single activity API.

@@ -835,4 +835,65 @@ service WorkflowService {
// aip.dev/not-precedent: We do not expose worker API to HTTP. --)
rpc RespondNexusTaskFailed(RespondNexusTaskFailedRequest) returns (RespondNexusTaskFailedResponse) {
}

rpc UpdateActivity (UpdateActivityRequest) returns (UpdateActivityResponse)
Copy link
Member

Choose a reason for hiding this comment

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

I know it's still draft - but, to save you some time in the future I might suggest combining all of these into one RPC and using a oneof with an Operation message of some kind - since every request has the same 4 initial fields + identity.

Or, at minimum, wrap up the common fields in a message

Copy link
Contributor Author

@ychebotarev ychebotarev Aug 21, 2024

Choose a reason for hiding this comment

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

All those fields are "routing" fields, it is the same for every function we have (for activity is it more fields). That shouldn't be a reason to combine them. I prefer clarify (function name indicates the intent).

As for wrapping up - will do that.

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rpc UpdateActivity (UpdateActivityRequest) returns (UpdateActivityResponse)
rpc UpdateActivityOptions (UpdateActivityOptionsRequest) returns (UpdateActivityOptionsResponse)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(keeping this open)

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