-
Notifications
You must be signed in to change notification settings - Fork 84
initial server metadata proto fields for history event #703
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ import "temporal/api/update/v1/message.proto"; | |
| import "temporal/api/workflow/v1/message.proto"; | ||
| import "temporal/api/sdk/v1/task_complete_metadata.proto"; | ||
| import "temporal/api/sdk/v1/user_metadata.proto"; | ||
| import "temporal/api/server/v1/message.proto"; | ||
|
|
||
| // Always the first event in workflow history | ||
| message WorkflowExecutionStartedEventAttributes { | ||
|
|
@@ -1115,6 +1116,9 @@ message HistoryEvent { | |
| // Links associated with the event. | ||
| repeated temporal.api.common.v1.Link links = 302; | ||
| // The event details. The type must match that in `event_type`. | ||
| // Actions metering metadata for the event. | ||
| temporal.api.server.v1.ServerMetadata server_metadata = 303; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately the PR where the discussion was occurring was closed. But bringing back the discussion from #701 (comment), I do not believe we should inundate history with redundant information. If people can iterate history and count actions, they can iterate history and count (certain) events. We should not use the burden of having to read history, which already has many cryptic elements and we provide UIs and CLIs for understanding, as justification for adding redundant data. Also, this doesn't even solve the problem of missing data (e.g. query and heartbeat counts). History is not the place for this information IMO. We should have a more general discussion about how one can derive action count from history, but this not only doesn't solve that, it inundates everyone's history format with redundant information. |
||
|
|
||
| oneof attributes { | ||
| WorkflowExecutionStartedEventAttributes workflow_execution_started_event_attributes = 6; | ||
| WorkflowExecutionCompletedEventAttributes workflow_execution_completed_event_attributes = 7; | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not think we need an entirely new proto package for this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we do need a new package, please use a different name: we have |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package temporal.api.server.v1; | ||
|
|
||
| option go_package = "go.temporal.io/api/server/v1;server"; | ||
| option java_package = "io.temporal.api.server.v1"; | ||
| option java_outer_classname = "MessageProto"; | ||
| option java_multiple_files = true; | ||
|
|
||
| message ActionMetadata { | ||
| // A history event can be attributed to multiple actions | ||
| // Ex. EVENT_TYPE_WORKFLOW_EXECUTION_STARTED, which is used by both Start | ||
| // Workflow and Scheduled Workflow actions. | ||
| repeated Action actions = 1; | ||
| } | ||
|
|
||
| message Action { | ||
| int32 action_count = 1; | ||
| } | ||
|
|
||
| message ServerMetadata { | ||
| ActionMetadata action_metadata = 1; | ||
| int32 event_size = 2; | ||
| } |
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 think most of the fields here could be considered server metadata, you could just inline the ActionMetadata 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.
Having a separate server metadata field would make sense if it is supposed to be applied in other places though.