From 6103af66a6c930169beaba5a6ba313447fe8efd4 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 20 Mar 2026 16:37:55 -0700 Subject: [PATCH 1/7] timeskipping-poc: control plane --- .gitignore | 2 + .../v1/executions.go-helpers.pb.go | 30 + api/persistence/v1/executions.pb.go | 216 ++ common/dynamicconfig/constants.go | 5 + go.mod | 2 +- go.sum | 4 +- .../api/persistence/v1/executions.proto | 10 + service/frontend/service.go | 2 + service/frontend/workflow_handler.go | 32 +- service/frontend/workflow_handler_test.go | 19 + .../api/signalwithstartworkflow/convert.go | 1 + service/history/api/startworkflow/api.go | 1 + .../history/api/updateworkflowoptions/api.go | 17 +- .../api/updateworkflowoptions/api_test.go | 2 +- .../history/historybuilder/event_factory.go | 2 + .../history/historybuilder/history_builder.go | 2 + .../history_builder_categorization_test.go | 2 +- service/history/interfaces/mutable_state.go | 1 + .../history/interfaces/mutable_state_mock.go | 8 +- service/history/ndc/events_reapplier_test.go | 1 + service/history/ndc/workflow_resetter.go | 1 + service/history/ndc/workflow_resetter_test.go | 1 + .../history/workflow/mutable_state_impl.go | 15 + .../workflow/mutable_state_impl_test.go | 14 +- setting_gen.go | 1733 +++++++++++++++++ tests/timeskipping_test.go | 226 +++ 26 files changed, 2331 insertions(+), 18 deletions(-) create mode 100644 setting_gen.go create mode 100644 tests/timeskipping_test.go diff --git a/.gitignore b/.gitignore index f6e1955edc..54dbf13b40 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ # Ignoring AI agent files .agents/ +**/spec.md +**/CLAUDE.md diff --git a/api/persistence/v1/executions.go-helpers.pb.go b/api/persistence/v1/executions.go-helpers.pb.go index 0db1c1b452..219a2374ac 100644 --- a/api/persistence/v1/executions.go-helpers.pb.go +++ b/api/persistence/v1/executions.go-helpers.pb.go @@ -79,6 +79,7 @@ func (this *WorkflowExecutionInfo) Equal(that interface{}) bool { return proto.Equal(this, that1) } +<<<<<<< HEAD // Marshal an object of type LastNotifiedTargetVersion to the protobuf v3 wire format func (val *LastNotifiedTargetVersion) Marshal() ([]byte, error) { return proto.Marshal(val) @@ -86,10 +87,20 @@ func (val *LastNotifiedTargetVersion) Marshal() ([]byte, error) { // Unmarshal an object of type LastNotifiedTargetVersion from the protobuf v3 wire format func (val *LastNotifiedTargetVersion) Unmarshal(buf []byte) error { +======= +// Marshal an object of type TimeSkippingInfo to the protobuf v3 wire format +func (val *TimeSkippingInfo) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TimeSkippingInfo from the protobuf v3 wire format +func (val *TimeSkippingInfo) Unmarshal(buf []byte) error { +>>>>>>> 286ac49dc (timeskipping-poc: control plane) return proto.Unmarshal(buf, val) } // Size returns the size of the object, in bytes, once serialized +<<<<<<< HEAD func (val *LastNotifiedTargetVersion) Size() int { return proto.Size(val) } @@ -99,15 +110,34 @@ func (val *LastNotifiedTargetVersion) Size() int { // For more information see the documentation for // https://pkg.go.dev/google.golang.org/protobuf/proto#Equal func (this *LastNotifiedTargetVersion) Equal(that interface{}) bool { +======= +func (val *TimeSkippingInfo) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TimeSkippingInfo values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TimeSkippingInfo) Equal(that interface{}) bool { +>>>>>>> 286ac49dc (timeskipping-poc: control plane) if that == nil { return this == nil } +<<<<<<< HEAD var that1 *LastNotifiedTargetVersion switch t := that.(type) { case *LastNotifiedTargetVersion: that1 = t case LastNotifiedTargetVersion: +======= + var that1 *TimeSkippingInfo + switch t := that.(type) { + case *TimeSkippingInfo: + that1 = t + case TimeSkippingInfo: +>>>>>>> 286ac49dc (timeskipping-poc: control plane) that1 = &t default: return false diff --git a/api/persistence/v1/executions.pb.go b/api/persistence/v1/executions.pb.go index 36c3afdba8..053b4d197c 100644 --- a/api/persistence/v1/executions.pb.go +++ b/api/persistence/v1/executions.pb.go @@ -353,6 +353,7 @@ type WorkflowExecutionInfo struct { // *WorkflowExecutionInfo_LastWorkflowTaskFailureCause // *WorkflowExecutionInfo_LastWorkflowTaskTimedOutType LastWorkflowTaskFailure isWorkflowExecutionInfo_LastWorkflowTaskFailure `protobuf_oneof:"last_workflow_task_failure"` +<<<<<<< HEAD // The last target version for which the server set targetDeploymentVersionChanged // to true on a workflow task started event. Updated on each workflow task start, // set only when the server decides to set the targetDeploymentVersionChanged flag @@ -374,6 +375,13 @@ type WorkflowExecutionInfo struct { DeclinedTargetVersionUpgrade *v17.DeclinedTargetVersionUpgrade `protobuf:"bytes,114,opt,name=declined_target_version_upgrade,json=declinedTargetVersionUpgrade,proto3" json:"declined_target_version_upgrade,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache +======= + // Time skipping info contains the metadata of the time skipping for the workflow. + // todo: using 120 to leave room for others' changes while working on this feature. + TimeSkippingInfo *TimeSkippingInfo `protobuf:"bytes,120,opt,name=time_skipping_info,json=timeSkippingInfo,proto3" json:"time_skipping_info,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +>>>>>>> 286ac49dc (timeskipping-poc: control plane) } func (x *WorkflowExecutionInfo) Reset() { @@ -1131,6 +1139,7 @@ func (x *WorkflowExecutionInfo) GetLastWorkflowTaskTimedOutType() v11.TimeoutTyp return v11.TimeoutType(0) } +<<<<<<< HEAD func (x *WorkflowExecutionInfo) GetLastNotifiedTargetVersion() *LastNotifiedTargetVersion { if x != nil { return x.LastNotifiedTargetVersion @@ -1141,6 +1150,11 @@ func (x *WorkflowExecutionInfo) GetLastNotifiedTargetVersion() *LastNotifiedTarg func (x *WorkflowExecutionInfo) GetDeclinedTargetVersionUpgrade() *v17.DeclinedTargetVersionUpgrade { if x != nil { return x.DeclinedTargetVersionUpgrade +======= +func (x *WorkflowExecutionInfo) GetTimeSkippingInfo() *TimeSkippingInfo { + if x != nil { + return x.TimeSkippingInfo +>>>>>>> 286ac49dc (timeskipping-poc: control plane) } return nil } @@ -1163,6 +1177,7 @@ func (*WorkflowExecutionInfo_LastWorkflowTaskFailureCause) isWorkflowExecutionIn func (*WorkflowExecutionInfo_LastWorkflowTaskTimedOutType) isWorkflowExecutionInfo_LastWorkflowTaskFailure() { } +<<<<<<< HEAD // Internal wrapper message to distinguish "never notified" (nil wrapper) from // "notified about an unversioned target" (non-nil wrapper with nil deployment_version). // Used only within server persistence; never flows to the public API. @@ -1175,11 +1190,26 @@ type LastNotifiedTargetVersion struct { func (x *LastNotifiedTargetVersion) Reset() { *x = LastNotifiedTargetVersion{} +======= +type TimeSkippingInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // metadata + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` + // runtime history + SkippedTimeOffsets []*timestamppb.Timestamp `protobuf:"bytes,4,rep,name=skipped_time_offsets,json=skippedTimeOffsets,proto3" json:"skipped_time_offsets,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimeSkippingInfo) Reset() { + *x = TimeSkippingInfo{} +>>>>>>> 286ac49dc (timeskipping-poc: control plane) mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } +<<<<<<< HEAD func (x *LastNotifiedTargetVersion) String() string { return protoimpl.X.MessageStringOf(x) } @@ -1187,6 +1217,15 @@ func (x *LastNotifiedTargetVersion) String() string { func (*LastNotifiedTargetVersion) ProtoMessage() {} func (x *LastNotifiedTargetVersion) ProtoReflect() protoreflect.Message { +======= +func (x *TimeSkippingInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeSkippingInfo) ProtoMessage() {} + +func (x *TimeSkippingInfo) ProtoReflect() protoreflect.Message { +>>>>>>> 286ac49dc (timeskipping-poc: control plane) mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1198,6 +1237,7 @@ func (x *LastNotifiedTargetVersion) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } +<<<<<<< HEAD // Deprecated: Use LastNotifiedTargetVersion.ProtoReflect.Descriptor instead. func (*LastNotifiedTargetVersion) Descriptor() ([]byte, []int) { return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{2} @@ -1206,6 +1246,23 @@ func (*LastNotifiedTargetVersion) Descriptor() ([]byte, []int) { func (x *LastNotifiedTargetVersion) GetDeploymentVersion() *v18.WorkerDeploymentVersion { if x != nil { return x.DeploymentVersion +======= +// Deprecated: Use TimeSkippingInfo.ProtoReflect.Descriptor instead. +func (*TimeSkippingInfo) Descriptor() ([]byte, []int) { + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{2} +} + +func (x *TimeSkippingInfo) GetEnabled() bool { + if x != nil { + return x.Enabled + } + return false +} + +func (x *TimeSkippingInfo) GetSkippedTimeOffsets() []*timestamppb.Timestamp { + if x != nil { + return x.SkippedTimeOffsets +>>>>>>> 286ac49dc (timeskipping-poc: control plane) } return nil } @@ -4660,7 +4717,11 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\x03key\x18\x01 \x01(\x05R\x03key\x12D\n" + "\x05value\x18\x02 \x01(\v2..temporal.server.api.persistence.v1.QueueStateR\x05value:\x028\x01J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\b\x10\tJ\x04\b\t\x10\n" + "J\x04\b\n" + +<<<<<<< HEAD "\x10\vJ\x04\b\v\x10\fJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11\"\xdbB\n" + +======= + "\x10\vJ\x04\b\v\x10\fJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11\"\xc1A\n" + +>>>>>>> 286ac49dc (timeskipping-poc: control plane) "\x15WorkflowExecutionInfo\x12!\n" + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1f\n" + "\vworkflow_id\x18\x02 \x01(\tR\n" + @@ -4770,9 +4831,14 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\n" + "pause_info\x18j \x01(\v25.temporal.server.api.persistence.v1.WorkflowPauseInfoR\tpauseInfo\x12x\n" + " last_workflow_task_failure_cause\x18k \x01(\x0e2..temporal.api.enums.v1.WorkflowTaskFailedCauseH\x00R\x1clastWorkflowTaskFailureCause\x12m\n" + +<<<<<<< HEAD "!last_workflow_task_timed_out_type\x18l \x01(\x0e2\".temporal.api.enums.v1.TimeoutTypeH\x00R\x1clastWorkflowTaskTimedOutType\x12~\n" + "\x1clast_notified_target_version\x18q \x01(\v2=.temporal.server.api.persistence.v1.LastNotifiedTargetVersionR\x19lastNotifiedTargetVersion\x12|\n" + "\x1fdeclined_target_version_upgrade\x18r \x01(\v25.temporal.api.history.v1.DeclinedTargetVersionUpgradeR\x1cdeclinedTargetVersionUpgrade\x1ad\n" + +======= + "!last_workflow_task_timed_out_type\x18l \x01(\x0e2\".temporal.api.enums.v1.TimeoutTypeH\x00R\x1clastWorkflowTaskTimedOutType\x12b\n" + + "\x12time_skipping_info\x18x \x01(\v24.temporal.server.api.persistence.v1.TimeSkippingInfoR\x10timeSkippingInfo\x1ad\n" + +>>>>>>> 286ac49dc (timeskipping-poc: control plane) "\x15SearchAttributesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + "\x05value\x18\x02 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\x05value:\x028\x01\x1aX\n" + @@ -4788,9 +4854,16 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "&ChildrenInitializedPostResetPointEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12H\n" + "\x05value\x18\x02 \x01(\v22.temporal.server.api.persistence.v1.ResetChildInfoR\x05value:\x028\x01B\x1c\n" + +<<<<<<< HEAD "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"\x7f\n" + "\x19LastNotifiedTargetVersion\x12b\n" + "\x12deployment_version\x18\x01 \x01(\v23.temporal.api.deployment.v1.WorkerDeploymentVersionR\x11deploymentVersion\"\x9d\x01\n" + +======= + "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"z\n" + + "\x10TimeSkippingInfo\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12L\n" + + "\x14skipped_time_offsets\x18\x04 \x03(\v2\x1a.google.protobuf.TimestampR\x12skippedTimeOffsets\"\x9d\x01\n" + +>>>>>>> 286ac49dc (timeskipping-poc: control plane) "\x0eExecutionStats\x12!\n" + "\fhistory_size\x18\x01 \x01(\x03R\vhistorySize\x122\n" + "\x15external_payload_size\x18\x02 \x01(\x03R\x13externalPayloadSize\x124\n" + @@ -5129,7 +5202,11 @@ var file_temporal_server_api_persistence_v1_executions_proto_msgTypes = make([]p var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*ShardInfo)(nil), // 0: temporal.server.api.persistence.v1.ShardInfo (*WorkflowExecutionInfo)(nil), // 1: temporal.server.api.persistence.v1.WorkflowExecutionInfo +<<<<<<< HEAD (*LastNotifiedTargetVersion)(nil), // 2: temporal.server.api.persistence.v1.LastNotifiedTargetVersion +======= + (*TimeSkippingInfo)(nil), // 2: temporal.server.api.persistence.v1.TimeSkippingInfo +>>>>>>> 286ac49dc (timeskipping-poc: control plane) (*ExecutionStats)(nil), // 3: temporal.server.api.persistence.v1.ExecutionStats (*WorkflowExecutionState)(nil), // 4: temporal.server.api.persistence.v1.WorkflowExecutionState (*RequestIDInfo)(nil), // 5: temporal.server.api.persistence.v1.RequestIDInfo @@ -5187,6 +5264,7 @@ var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*v13.Priority)(nil), // 57: temporal.api.common.v1.Priority (v11.WorkflowTaskFailedCause)(0), // 58: temporal.api.enums.v1.WorkflowTaskFailedCause (v11.TimeoutType)(0), // 59: temporal.api.enums.v1.TimeoutType +<<<<<<< HEAD (*v17.DeclinedTargetVersionUpgrade)(nil), // 60: temporal.api.history.v1.DeclinedTargetVersionUpgrade (*v18.WorkerDeploymentVersion)(nil), // 61: temporal.api.deployment.v1.WorkerDeploymentVersion (v1.WorkflowExecutionState)(0), // 62: temporal.server.api.enums.v1.WorkflowExecutionState @@ -5214,6 +5292,34 @@ var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*UpdateInfo)(nil), // 84: temporal.server.api.persistence.v1.UpdateInfo (*StateMachineMap)(nil), // 85: temporal.server.api.persistence.v1.StateMachineMap (*StateMachineRef)(nil), // 86: temporal.server.api.persistence.v1.StateMachineRef +======= + (v1.WorkflowExecutionState)(0), // 60: temporal.server.api.enums.v1.WorkflowExecutionState + (v11.WorkflowExecutionStatus)(0), // 61: temporal.api.enums.v1.WorkflowExecutionStatus + (v11.EventType)(0), // 62: temporal.api.enums.v1.EventType + (v1.TaskType)(0), // 63: temporal.server.api.enums.v1.TaskType + (*ChasmTaskInfo)(nil), // 64: temporal.server.api.persistence.v1.ChasmTaskInfo + (v1.TaskPriority)(0), // 65: temporal.server.api.enums.v1.TaskPriority + (*v14.VersionHistoryItem)(nil), // 66: temporal.server.api.history.v1.VersionHistoryItem + (v1.WorkflowBackoffType)(0), // 67: temporal.server.api.enums.v1.WorkflowBackoffType + (*StateMachineTaskInfo)(nil), // 68: temporal.server.api.persistence.v1.StateMachineTaskInfo + (*v17.Failure)(nil), // 69: temporal.api.failure.v1.Failure + (*v13.Payloads)(nil), // 70: temporal.api.common.v1.Payloads + (*v13.ActivityType)(nil), // 71: temporal.api.common.v1.ActivityType + (*v18.Deployment)(nil), // 72: temporal.api.deployment.v1.Deployment + (*v18.WorkerDeploymentVersion)(nil), // 73: temporal.api.deployment.v1.WorkerDeploymentVersion + (v11.ParentClosePolicy)(0), // 74: temporal.api.enums.v1.ParentClosePolicy + (v1.ChecksumFlavor)(0), // 75: temporal.server.api.enums.v1.ChecksumFlavor + (*v13.Link)(nil), // 76: temporal.api.common.v1.Link + (*v19.HistoryEvent)(nil), // 77: temporal.api.history.v1.HistoryEvent + (v1.CallbackState)(0), // 78: temporal.server.api.enums.v1.CallbackState + (v1.NexusOperationState)(0), // 79: temporal.server.api.enums.v1.NexusOperationState + (v11.NexusOperationCancellationState)(0), // 80: temporal.api.enums.v1.NexusOperationCancellationState + (*QueueState)(nil), // 81: temporal.server.api.persistence.v1.QueueState + (*v13.Payload)(nil), // 82: temporal.api.common.v1.Payload + (*UpdateInfo)(nil), // 83: temporal.server.api.persistence.v1.UpdateInfo + (*StateMachineMap)(nil), // 84: temporal.server.api.persistence.v1.StateMachineMap + (*StateMachineRef)(nil), // 85: temporal.server.api.persistence.v1.StateMachineRef +>>>>>>> 286ac49dc (timeskipping-poc: control plane) } var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ 44, // 0: temporal.server.api.persistence.v1.ShardInfo.update_time:type_name -> google.protobuf.Timestamp @@ -5261,6 +5367,7 @@ var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ 26, // 42: temporal.server.api.persistence.v1.WorkflowExecutionInfo.pause_info:type_name -> temporal.server.api.persistence.v1.WorkflowPauseInfo 58, // 43: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_failure_cause:type_name -> temporal.api.enums.v1.WorkflowTaskFailedCause 59, // 44: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_timed_out_type:type_name -> temporal.api.enums.v1.TimeoutType +<<<<<<< HEAD 2, // 45: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_notified_target_version:type_name -> temporal.server.api.persistence.v1.LastNotifiedTargetVersion 60, // 46: temporal.server.api.persistence.v1.WorkflowExecutionInfo.declined_target_version_upgrade:type_name -> temporal.api.history.v1.DeclinedTargetVersionUpgrade 61, // 47: temporal.server.api.persistence.v1.LastNotifiedTargetVersion.deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion @@ -5369,6 +5476,115 @@ var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ 148, // [148:148] is the sub-list for extension type_name 148, // [148:148] is the sub-list for extension extendee 0, // [0:148] is the sub-list for field type_name +======= + 2, // 45: temporal.server.api.persistence.v1.WorkflowExecutionInfo.time_skipping_info:type_name -> temporal.server.api.persistence.v1.TimeSkippingInfo + 44, // 46: temporal.server.api.persistence.v1.TimeSkippingInfo.skipped_time_offsets:type_name -> google.protobuf.Timestamp + 60, // 47: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState + 61, // 48: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus + 53, // 49: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 44, // 50: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp + 34, // 51: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + 62, // 52: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType + 63, // 53: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 54: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 35, // 55: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + 64, // 56: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 63, // 57: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 58: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 65, // 59: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority + 53, // 60: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 7, // 61: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo + 66, // 62: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem + 63, // 63: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 64: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 44, // 65: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp + 64, // 66: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 63, // 67: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 59, // 68: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType + 67, // 69: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType + 44, // 70: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 64, // 71: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 63, // 72: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 73: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 63, // 74: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 75: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 68, // 76: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo + 64, // 77: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 44, // 78: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 44, // 79: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp + 45, // 80: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 45, // 81: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 45, // 82: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 45, // 83: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration + 45, // 84: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration + 45, // 85: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration + 44, // 86: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp + 69, // 87: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure + 70, // 88: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads + 44, // 89: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp + 71, // 90: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType + 36, // 91: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo + 52, // 92: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp + 53, // 93: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 44, // 94: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp + 44, // 95: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 72, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment + 73, // 97: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion + 57, // 98: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority + 37, // 99: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo + 44, // 100: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp + 53, // 101: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 74, // 102: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy + 50, // 103: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock + 53, // 104: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 57, // 105: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority + 53, // 106: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 53, // 107: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 75, // 108: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor + 39, // 109: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus + 40, // 110: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM + 76, // 111: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link + 77, // 112: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent + 20, // 113: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback + 43, // 114: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger + 44, // 115: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp + 78, // 116: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState + 44, // 117: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 69, // 118: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 44, // 119: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 45, // 120: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 44, // 121: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 79, // 122: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState + 44, // 123: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 69, // 124: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 44, // 125: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 45, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 45, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 44, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp + 44, // 129: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp + 80, // 130: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState + 44, // 131: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 69, // 132: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 44, // 133: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 44, // 134: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 81, // 135: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState + 82, // 136: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload + 82, // 137: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload + 83, // 138: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo + 84, // 139: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap + 25, // 140: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo + 5, // 141: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo + 44, // 142: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 38, // 143: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual + 41, // 144: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry + 85, // 145: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef + 42, // 146: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed + 147, // [147:147] is the sub-list for method output_type + 147, // [147:147] is the sub-list for method input_type + 147, // [147:147] is the sub-list for extension type_name + 147, // [147:147] is the sub-list for extension extendee + 0, // [0:147] is the sub-list for field type_name +>>>>>>> 286ac49dc (timeskipping-poc: control plane) } func init() { file_temporal_server_api_persistence_v1_executions_proto_init() } diff --git a/common/dynamicconfig/constants.go b/common/dynamicconfig/constants.go index 1bf78babd8..297911ee48 100644 --- a/common/dynamicconfig/constants.go +++ b/common/dynamicconfig/constants.go @@ -3189,4 +3189,9 @@ WorkerActivitiesPerSecond, MaxConcurrentActivityTaskPollers. false, `WorkflowPauseEnabled is a "feature enable" flag. When enabled it allows clients to pause workflows.`, ) + TimeSkippingEnabled = NewNamespaceBoolSetting( + "frontend.TimeSkippingEnabled", + false, + `TimeSkippingEnabled is a "feature enable" flag. When enabled it allows clients to skip time in workflows.`, + ) ) diff --git a/go.mod b/go.mod index aa2d419616..89c06e2a9f 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( go.opentelemetry.io/otel/sdk v1.40.0 go.opentelemetry.io/otel/sdk/metric v1.40.0 go.opentelemetry.io/otel/trace v1.40.0 - go.temporal.io/api v1.62.5 + go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574 go.temporal.io/sdk v1.38.0 go.uber.org/fx v1.24.0 go.uber.org/mock v0.6.0 diff --git a/go.sum b/go.sum index ab7a7f9f22..0c51214699 100644 --- a/go.sum +++ b/go.sum @@ -376,8 +376,8 @@ go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZY go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= -go.temporal.io/api v1.62.5 h1:9R/9CeyM7xqHSlsNt+QIvapQLcRxCZ38bnXQx4mCN6I= -go.temporal.io/api v1.62.5/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= +go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574 h1:qVCgcJueXcPgE+gxlMLKBL1MlqKDt5kSVnYbtatqKoc= +go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.temporal.io/sdk v1.38.0 h1:4Bok5LEdED7YKpsSjIa3dDqram5VOq+ydBf4pyx0Wo4= go.temporal.io/sdk v1.38.0/go.mod h1:a+R2Ej28ObvHoILbHaxMyind7M6D+W0L7edt5UJF4SE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/proto/internal/temporal/server/api/persistence/v1/executions.proto b/proto/internal/temporal/server/api/persistence/v1/executions.proto index 0c1f412cfb..1d515bcdea 100644 --- a/proto/internal/temporal/server/api/persistence/v1/executions.proto +++ b/proto/internal/temporal/server/api/persistence/v1/executions.proto @@ -315,6 +315,9 @@ message WorkflowExecutionInfo { // // Wrapper distinguishes "never declined" (nil) from "declined unversioned" (non-nil, nil version). temporal.api.history.v1.DeclinedTargetVersionUpgrade declined_target_version_upgrade = 114; + + // Time skipping info that contains the config and duration offsets of the time skipping for the workflow. + TimeSkippingInfo time_skipping_info = 120; } // Internal wrapper message to distinguish "never notified" (nil wrapper) from @@ -324,6 +327,13 @@ message LastNotifiedTargetVersion { temporal.api.deployment.v1.WorkerDeploymentVersion deployment_version = 1; } +message TimeSkippingInfo { + // metadata + bool enabled = 1; + // runtime history + repeated google.protobuf.Timestamp skipped_time_offsets = 4; +} + message ExecutionStats { int64 history_size = 1; // Total size in bytes of all external payloads referenced in the entire history tree of the execution, not just the current branch. diff --git a/service/frontend/service.go b/service/frontend/service.go index 486988b200..7f661beeda 100644 --- a/service/frontend/service.go +++ b/service/frontend/service.go @@ -226,6 +226,7 @@ type Config struct { NumTaskQueueReadPartitions dynamicconfig.IntPropertyFnWithTaskQueueFilter WorkerCommandsEnabled dynamicconfig.BoolPropertyFnWithNamespaceFilter WorkflowPauseEnabled dynamicconfig.BoolPropertyFnWithNamespaceFilter + TimeSkippingEnabled dynamicconfig.BoolPropertyFnWithNamespaceFilter HTTPAllowedHosts dynamicconfig.TypedPropertyFn[*regexp.Regexp] AllowedExperiments dynamicconfig.TypedPropertyFnWithNamespaceFilter[[]string] @@ -392,6 +393,7 @@ func NewConfig( NumTaskQueueReadPartitions: dynamicconfig.MatchingNumTaskqueueReadPartitions.Get(dc), WorkerCommandsEnabled: dynamicconfig.WorkerCommandsEnabled.Get(dc), WorkflowPauseEnabled: dynamicconfig.WorkflowPauseEnabled.Get(dc), + TimeSkippingEnabled: dynamicconfig.TimeSkippingEnabled.Get(dc), HTTPAllowedHosts: dynamicconfig.FrontendHTTPAllowedHosts.Get(dc), AllowedExperiments: dynamicconfig.FrontendAllowedExperiments.Get(dc), diff --git a/service/frontend/workflow_handler.go b/service/frontend/workflow_handler.go index b8207ba89e..6602004cab 100644 --- a/service/frontend/workflow_handler.go +++ b/service/frontend/workflow_handler.go @@ -525,7 +525,6 @@ func (wh *WorkflowHandler) prepareStartWorkflowRequest( if err := wh.validateWorkflowCompletionCallbacks(namespaceName, request.GetCompletionCallbacks()); err != nil { return nil, err } - request.Links = dedupLinksFromCallbacks(request.GetLinks(), request.GetCompletionCallbacks()) allLinks := make([]*commonpb.Link, 0, len(request.GetLinks())+len(request.GetCompletionCallbacks())) @@ -537,9 +536,32 @@ func (wh *WorkflowHandler) prepareStartWorkflowRequest( return nil, err } + if err := wh.validateTimeSkippingConfig(request.GetTimeSkippingConfig(), namespaceName); err != nil { + return nil, err + } return request, nil } +func (wh *WorkflowHandler) validateTimeSkippingConfig( + timeSkippingConfig *workflowpb.TimeSkippingConfig, + namespaceName namespace.Name, +) error { + if timeSkippingConfig == nil { + return nil + } + if !timeSkippingConfig.GetEnabled() { + return nil + } + enabled := wh.config.TimeSkippingEnabled(namespaceName.String()) + if !enabled { + return serviceerror.NewInvalidArgumentf( + "Time skipping is not enabled for namespace %s", + namespaceName, + ) + } + return nil +} + func (wh *WorkflowHandler) unaliasedSearchAttributesFrom( attributes *commonpb.SearchAttributes, namespaceName namespace.Name, @@ -2175,6 +2197,9 @@ func (wh *WorkflowHandler) SignalWithStartWorkflowExecution(ctx context.Context, ); err != nil { return nil, err } + if err := wh.validateTimeSkippingConfig(request.GetTimeSkippingConfig(), namespaceName); err != nil { + return nil, err + } if request.WorkflowIdConflictPolicy == enumspb.WORKFLOW_ID_CONFLICT_POLICY_FAIL { // Signal-with-*Required*-Start is not supported @@ -6560,6 +6585,8 @@ func getBatchOperationState(workflowState enumspb.WorkflowExecutionStatus) enums return operationState } +// todo: to be removed +// another entrypoint for time skipping config validation func (wh *WorkflowHandler) UpdateWorkflowExecutionOptions( ctx context.Context, request *workflowservice.UpdateWorkflowExecutionOptionsRequest, @@ -6586,6 +6613,9 @@ func (wh *WorkflowHandler) UpdateWorkflowExecutionOptions( if err := priorities.Validate(opts.GetPriority()); err != nil { return nil, err } + if err := wh.validateTimeSkippingConfig(opts.GetTimeSkippingConfig(), namespace.Name(request.GetNamespace())); err != nil { + return nil, err + } namespaceID, err := wh.namespaceRegistry.GetNamespaceID(namespace.Name(request.GetNamespace())) if err != nil { diff --git a/service/frontend/workflow_handler_test.go b/service/frontend/workflow_handler_test.go index c202ddbddc..97986c86bf 100644 --- a/service/frontend/workflow_handler_test.go +++ b/service/frontend/workflow_handler_test.go @@ -3220,6 +3220,25 @@ func (s *WorkflowHandlerSuite) TestGetWorkflowExecutionHistory_InternalRawHistor s.Equal("this workflow failed", attrs2.Failure.Message) } +func (s *WorkflowHandlerSuite) TestValidateTimeSkippingConfig() { + config := s.newConfig() + wh := s.getWorkflowHandler(config) + + // nil config is valid + s.NoError(wh.validateTimeSkippingConfig(nil, s.testNamespace)) + + // config with enabled=false is valid + s.NoError(wh.validateTimeSkippingConfig(&workflowpb.TimeSkippingConfig{Enabled: false}, s.testNamespace)) + + // config with enabled=true but dynamic config disabled returns error + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + s.Error(wh.validateTimeSkippingConfig(&workflowpb.TimeSkippingConfig{Enabled: true}, s.testNamespace)) + + // config with enabled=true and dynamic config enabled is valid + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + s.NoError(wh.validateTimeSkippingConfig(&workflowpb.TimeSkippingConfig{Enabled: true}, s.testNamespace)) +} + func (s *WorkflowHandlerSuite) newConfig() *Config { return NewConfig(dc.NewNoopCollection(), numHistoryShards) } diff --git a/service/history/api/signalwithstartworkflow/convert.go b/service/history/api/signalwithstartworkflow/convert.go index 0e7a0a131c..39a68c32e5 100644 --- a/service/history/api/signalwithstartworkflow/convert.go +++ b/service/history/api/signalwithstartworkflow/convert.go @@ -37,6 +37,7 @@ func ConvertToStartRequest( Links: request.GetLinks(), VersioningOverride: request.GetVersioningOverride(), Priority: request.GetPriority(), + TimeSkippingConfig: request.GetTimeSkippingConfig(), } return common.CreateHistoryStartWorkflowRequest(namespaceID.String(), req, nil, nil, now) diff --git a/service/history/api/startworkflow/api.go b/service/history/api/startworkflow/api.go index 030c9e36ab..db570576f7 100644 --- a/service/history/api/startworkflow/api.go +++ b/service/history/api/startworkflow/api.go @@ -699,6 +699,7 @@ func (s *Starter) handleUseExistingWorkflowOnConflictOptions( links, "", // identity nil, // priority + nil, // timeSkippingConfig ) return api.UpdateWorkflowWithoutWorkflowTask, err }, diff --git a/service/history/api/updateworkflowoptions/api.go b/service/history/api/updateworkflowoptions/api.go index 12a2f12dbd..166ac6efa9 100644 --- a/service/history/api/updateworkflowoptions/api.go +++ b/service/history/api/updateworkflowoptions/api.go @@ -151,7 +151,7 @@ func MergeAndApply( if mergedOpts.GetVersioningOverride() == nil { unsetOverride = true } - _, err = ms.AddWorkflowExecutionOptionsUpdatedEvent(mergedOpts.GetVersioningOverride(), unsetOverride, "", nil, nil, identity, mergedOpts.GetPriority()) + _, err = ms.AddWorkflowExecutionOptionsUpdatedEvent(mergedOpts.GetVersioningOverride(), unsetOverride, "", nil, nil, identity, mergedOpts.GetPriority(), mergedOpts.GetTimeSkippingConfig()) if err != nil { return nil, hasChanges, err } @@ -172,6 +172,12 @@ func getOptionsFromMutableState(ms historyi.MutableState) *workflowpb.WorkflowEx opts.Priority = cloned } } + // todo: right now we only assume enabled is the only field we care in options + if timeSkippingInfo := ms.GetExecutionInfo().GetTimeSkippingInfo(); timeSkippingInfo != nil { + opts.TimeSkippingConfig = &workflowpb.TimeSkippingConfig{ + Enabled: timeSkippingInfo.GetEnabled(), + } + } return opts } @@ -230,5 +236,14 @@ func mergeWorkflowExecutionOptions( mergeInto.Priority.FairnessWeight = mergeFrom.Priority.GetFairnessWeight() } + // ==== Time Skipping Config + // todo: only assuming enabled is the only field we use now + // nil means "no change" — only update if the caller provided an explicit value. + if _, ok := updateFields["timeSkippingConfig"]; ok { + if mergeFrom.GetTimeSkippingConfig() != nil { + mergeInto.TimeSkippingConfig = mergeFrom.GetTimeSkippingConfig() + } + } + return mergeInto, nil } diff --git a/service/history/api/updateworkflowoptions/api_test.go b/service/history/api/updateworkflowoptions/api_test.go index 8f41922fe1..377499aa9d 100644 --- a/service/history/api/updateworkflowoptions/api_test.go +++ b/service/history/api/updateworkflowoptions/api_test.go @@ -253,7 +253,7 @@ func (s *updateWorkflowOptionsSuite) TestInvoke_Success() { ).Return(&matchingservice.CheckTaskQueueVersionMembershipResponse{ IsMember: true, }, nil) - s.currentMutableState.EXPECT().AddWorkflowExecutionOptionsUpdatedEvent(expectedOverrideOptions.VersioningOverride, false, "", nil, nil, "", expectedOverrideOptions.Priority).Return(&historypb.HistoryEvent{}, nil) + s.currentMutableState.EXPECT().AddWorkflowExecutionOptionsUpdatedEvent(expectedOverrideOptions.VersioningOverride, false, "", nil, nil, "", expectedOverrideOptions.Priority, expectedOverrideOptions.TimeSkippingConfig).Return(&historypb.HistoryEvent{}, nil) s.currentContext.EXPECT().UpdateWorkflowExecutionAsActive(gomock.Any(), s.shardContext).Return(nil) updateReq := &historyservice.UpdateWorkflowExecutionOptionsRequest{ diff --git a/service/history/historybuilder/event_factory.go b/service/history/historybuilder/event_factory.go index f6831f2f55..81d3adaefe 100644 --- a/service/history/historybuilder/event_factory.go +++ b/service/history/historybuilder/event_factory.go @@ -401,6 +401,7 @@ func (b *EventFactory) CreateWorkflowExecutionOptionsUpdatedEvent( links []*commonpb.Link, identity string, priority *commonpb.Priority, + timeSkippingConfig *workflowpb.TimeSkippingConfig, ) *historypb.HistoryEvent { event := b.createHistoryEvent(enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED, b.timeSource.Now()) event.Attributes = &historypb.HistoryEvent_WorkflowExecutionOptionsUpdatedEventAttributes{ @@ -411,6 +412,7 @@ func (b *EventFactory) CreateWorkflowExecutionOptionsUpdatedEvent( AttachedCompletionCallbacks: attachCompletionCallbacks, Identity: identity, Priority: priority, + TimeSkippingConfig: timeSkippingConfig, }, } event.Links = links diff --git a/service/history/historybuilder/history_builder.go b/service/history/historybuilder/history_builder.go index 993659e4c2..2572e05548 100644 --- a/service/history/historybuilder/history_builder.go +++ b/service/history/historybuilder/history_builder.go @@ -458,6 +458,7 @@ func (b *HistoryBuilder) AddWorkflowExecutionOptionsUpdatedEvent( links []*commonpb.Link, identity string, priority *commonpb.Priority, + timeSkippingConfig *workflowpb.TimeSkippingConfig, ) *historypb.HistoryEvent { event := b.EventFactory.CreateWorkflowExecutionOptionsUpdatedEvent( worker_versioning.ConvertOverrideToV32(versioningOverride), @@ -467,6 +468,7 @@ func (b *HistoryBuilder) AddWorkflowExecutionOptionsUpdatedEvent( links, identity, priority, + timeSkippingConfig, ) event, _ = b.EventStore.add(event) return event diff --git a/service/history/historybuilder/history_builder_categorization_test.go b/service/history/historybuilder/history_builder_categorization_test.go index ee2386a2cc..66534ff653 100644 --- a/service/history/historybuilder/history_builder_categorization_test.go +++ b/service/history/historybuilder/history_builder_categorization_test.go @@ -208,7 +208,7 @@ func TestHistoryBuilder_FlushBufferToCurrentBatch(t *testing.T) { t.Errorf("expected 1 event in memBufferBatch got %d", len(hb.memBufferBatch)) } // add another event to memBufferBatch - hb.AddWorkflowExecutionOptionsUpdatedEvent(nil, false, "request-id-1", nil, nil, "", nil) + hb.AddWorkflowExecutionOptionsUpdatedEvent(nil, false, "request-id-1", nil, nil, "", nil, nil) if len(hb.memBufferBatch) != 2 { t.Errorf("expected 2 event in memBufferBatch got %d", len(hb.memBufferBatch)) } diff --git a/service/history/interfaces/mutable_state.go b/service/history/interfaces/mutable_state.go index 68aedfd2ac..2bb9ae0943 100644 --- a/service/history/interfaces/mutable_state.go +++ b/service/history/interfaces/mutable_state.go @@ -120,6 +120,7 @@ type ( links []*commonpb.Link, identity string, priority *commonpb.Priority, + timeSkippingConfig *workflowpb.TimeSkippingConfig, ) (*historypb.HistoryEvent, error) AddWorkflowExecutionUpdateAcceptedEvent(protocolInstanceID string, acceptedRequestMessageId string, acceptedRequestSequencingEventId int64, acceptedRequest *updatepb.Request) (*historypb.HistoryEvent, error) AddWorkflowExecutionUpdateCompletedEvent(acceptedEventID int64, updResp *updatepb.Response) (*historypb.HistoryEvent, error) diff --git a/service/history/interfaces/mutable_state_mock.go b/service/history/interfaces/mutable_state_mock.go index 103a53840e..11220a935f 100644 --- a/service/history/interfaces/mutable_state_mock.go +++ b/service/history/interfaces/mutable_state_mock.go @@ -663,18 +663,18 @@ func (mr *MockMutableStateMockRecorder) AddWorkflowExecutionCanceledEvent(arg0, } // AddWorkflowExecutionOptionsUpdatedEvent mocks base method. -func (m *MockMutableState) AddWorkflowExecutionOptionsUpdatedEvent(versioningOverride *workflow.VersioningOverride, unsetVersioningOverride bool, attachRequestID string, attachCompletionCallbacks []*common.Callback, links []*common.Link, identity string, priority *common.Priority) (*history.HistoryEvent, error) { +func (m *MockMutableState) AddWorkflowExecutionOptionsUpdatedEvent(versioningOverride *workflow.VersioningOverride, unsetVersioningOverride bool, attachRequestID string, attachCompletionCallbacks []*common.Callback, links []*common.Link, identity string, priority *common.Priority, timeSkippingConfig *workflow.TimeSkippingConfig) (*history.HistoryEvent, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddWorkflowExecutionOptionsUpdatedEvent", versioningOverride, unsetVersioningOverride, attachRequestID, attachCompletionCallbacks, links, identity, priority) + ret := m.ctrl.Call(m, "AddWorkflowExecutionOptionsUpdatedEvent", versioningOverride, unsetVersioningOverride, attachRequestID, attachCompletionCallbacks, links, identity, priority, timeSkippingConfig) ret0, _ := ret[0].(*history.HistoryEvent) ret1, _ := ret[1].(error) return ret0, ret1 } // AddWorkflowExecutionOptionsUpdatedEvent indicates an expected call of AddWorkflowExecutionOptionsUpdatedEvent. -func (mr *MockMutableStateMockRecorder) AddWorkflowExecutionOptionsUpdatedEvent(versioningOverride, unsetVersioningOverride, attachRequestID, attachCompletionCallbacks, links, identity, priority any) *gomock.Call { +func (mr *MockMutableStateMockRecorder) AddWorkflowExecutionOptionsUpdatedEvent(versioningOverride, unsetVersioningOverride, attachRequestID, attachCompletionCallbacks, links, identity, priority, timeSkippingConfig any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddWorkflowExecutionOptionsUpdatedEvent", reflect.TypeOf((*MockMutableState)(nil).AddWorkflowExecutionOptionsUpdatedEvent), versioningOverride, unsetVersioningOverride, attachRequestID, attachCompletionCallbacks, links, identity, priority) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddWorkflowExecutionOptionsUpdatedEvent", reflect.TypeOf((*MockMutableState)(nil).AddWorkflowExecutionOptionsUpdatedEvent), versioningOverride, unsetVersioningOverride, attachRequestID, attachCompletionCallbacks, links, identity, priority, timeSkippingConfig) } // AddWorkflowExecutionPausedEvent mocks base method. diff --git a/service/history/ndc/events_reapplier_test.go b/service/history/ndc/events_reapplier_test.go index b32cf35ca5..146f908f40 100644 --- a/service/history/ndc/events_reapplier_test.go +++ b/service/history/ndc/events_reapplier_test.go @@ -113,6 +113,7 @@ func (s *nDCEventReapplicationSuite) TestReapplyEvents_AppliedEvent_WorkflowExec event.Links, attr.GetIdentity(), attr.GetPriority(), + attr.GetTimeSkippingConfig(), ).Return(event, nil) msCurrent.EXPECT().HSM().Return(s.hsmNode).AnyTimes() msCurrent.EXPECT().IsWorkflowPendingOnWorkflowTaskBackoff().Return(true) diff --git a/service/history/ndc/workflow_resetter.go b/service/history/ndc/workflow_resetter.go index 3005eb1d2c..9ba31f17cf 100644 --- a/service/history/ndc/workflow_resetter.go +++ b/service/history/ndc/workflow_resetter.go @@ -969,6 +969,7 @@ func reapplyEvents( event.Links, attr.GetIdentity(), attr.GetPriority(), + attr.GetTimeSkippingConfig(), ); err != nil { return reappliedEvents, err } diff --git a/service/history/ndc/workflow_resetter_test.go b/service/history/ndc/workflow_resetter_test.go index 486dbc7702..1d567e95ac 100644 --- a/service/history/ndc/workflow_resetter_test.go +++ b/service/history/ndc/workflow_resetter_test.go @@ -1203,6 +1203,7 @@ func (s *workflowResetterSuite) TestReapplyEvents() { event.Links, attr.GetIdentity(), attr.GetPriority(), + attr.GetTimeSkippingConfig(), ).Return(&historypb.HistoryEvent{}, nil) case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_SIGNALED: attr := event.GetWorkflowExecutionSignaledEventAttributes() diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 7d271229bf..657a8780ae 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -2751,6 +2751,12 @@ func (ms *MutableStateImpl) AddWorkflowExecutionStartedEventWithOptions( return nil, err } + if tsc := startRequest.GetStartRequest().GetTimeSkippingConfig(); tsc.GetEnabled() { + ms.executionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{ + Enabled: true, + } + } + // Versioning Override set on StartWorkflowExecutionRequest if startRequest.GetStartRequest().GetVersioningOverride() != nil { metrics.WorkerDeploymentVersioningOverrideCounter.With( @@ -5389,6 +5395,7 @@ func (ms *MutableStateImpl) AddWorkflowExecutionOptionsUpdatedEvent( links []*commonpb.Link, identity string, priority *commonpb.Priority, + timeSkippingConfig *workflowpb.TimeSkippingConfig, ) (*historypb.HistoryEvent, error) { if err := ms.checkMutability(tag.WorkflowActionWorkflowOptionsUpdated); err != nil { return nil, err @@ -5401,6 +5408,7 @@ func (ms *MutableStateImpl) AddWorkflowExecutionOptionsUpdatedEvent( links, identity, priority, + timeSkippingConfig, ) prevEffectiveVersioningBehavior := ms.GetEffectiveVersioningBehavior() prevEffectiveDeployment := ms.GetEffectiveDeployment() @@ -5461,6 +5469,13 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent(event *his ms.executionInfo.Priority = attributes.GetPriority() } + // Update time skipping config. + if tsc := attributes.GetTimeSkippingConfig(); tsc != nil { + ms.executionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{ + Enabled: tsc.GetEnabled(), + } + } + // Finally, reschedule the pending workflow task if so requested. if requestReschedulePendingWorkflowTask { return ms.reschedulePendingWorkflowTask() diff --git a/service/history/workflow/mutable_state_impl_test.go b/service/history/workflow/mutable_state_impl_test.go index 2fdaace570..9e174f0277 100644 --- a/service/history/workflow/mutable_state_impl_test.go +++ b/service/history/workflow/mutable_state_impl_test.go @@ -1140,7 +1140,7 @@ func (s *mutableStateSuite) TestOverride_UnpinnedBase_SetPinnedAndUnsetWithEmpty s.createMutableStateWithVersioningBehavior(baseBehavior, deployment1, tq) // set pinned override - event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(pinnedOptions2.GetVersioningOverride(), false, "", nil, nil, id, nil) + event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(pinnedOptions2.GetVersioningOverride(), false, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment2, overrideBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( @@ -1155,7 +1155,7 @@ func (s *mutableStateSuite) TestOverride_UnpinnedBase_SetPinnedAndUnsetWithEmpty // unset pinned override with boolean id = uuid.NewString() - event, err = s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(nil, true, "", nil, nil, id, nil) + event, err = s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(nil, true, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment1, baseBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( @@ -1177,7 +1177,7 @@ func (s *mutableStateSuite) TestOverride_PinnedBase_SetUnpinnedAndUnsetWithEmpty s.createMutableStateWithVersioningBehavior(baseBehavior, deployment1, tq) // set unpinned override - event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(unpinnedOptions.GetVersioningOverride(), false, "", nil, nil, id, nil) + event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(unpinnedOptions.GetVersioningOverride(), false, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment1, overrideBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( @@ -1192,7 +1192,7 @@ func (s *mutableStateSuite) TestOverride_PinnedBase_SetUnpinnedAndUnsetWithEmpty // unset pinned override with empty id = uuid.NewString() - event, err = s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(nil, true, "", nil, nil, id, nil) + event, err = s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(nil, true, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment1, baseBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( @@ -1213,7 +1213,7 @@ func (s *mutableStateSuite) TestOverride_RedirectFails() { id := uuid.NewString() s.createMutableStateWithVersioningBehavior(baseBehavior, deployment1, tq) - event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(pinnedOptions3.GetVersioningOverride(), false, "", nil, nil, id, nil) + event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(pinnedOptions3.GetVersioningOverride(), false, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment3, overrideBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( @@ -1240,7 +1240,7 @@ func (s *mutableStateSuite) TestOverride_BaseDeploymentUpdatedOnCompletion() { id := uuid.NewString() s.createMutableStateWithVersioningBehavior(baseBehavior, deployment1, tq) - event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(pinnedOptions3.GetVersioningOverride(), false, "", nil, nil, id, nil) + event, err := s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(pinnedOptions3.GetVersioningOverride(), false, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment3, overrideBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( @@ -1293,7 +1293,7 @@ func (s *mutableStateSuite) TestOverride_BaseDeploymentUpdatedOnCompletion() { // now we unset the override and check that the base deployment/behavior is in effect id = uuid.NewString() - event, err = s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(nil, true, "", nil, nil, id, nil) + event, err = s.mutableState.AddWorkflowExecutionOptionsUpdatedEvent(nil, true, "", nil, nil, id, nil, nil) s.NoError(err) s.verifyEffectiveDeployment(deployment2, baseBehavior) s.verifyWorkflowOptionsUpdatedEventAttr( diff --git a/setting_gen.go b/setting_gen.go new file mode 100644 index 0000000000..3f01ae6ecc --- /dev/null +++ b/setting_gen.go @@ -0,0 +1,1733 @@ +// Code generated by cmd/tools/gendynamicconfig. DO NOT EDIT. + +package dynamicconfig + +import ( + "time" + + enumspb "go.temporal.io/api/enums/v1" + enumsspb "go.temporal.io/server/api/enums/v1" + "go.temporal.io/server/common/namespace" +) + +const ( + PrecedenceUnknown Precedence = iota + PrecedenceGlobal + PrecedenceNamespace + PrecedenceNamespaceID + PrecedenceTaskQueue + PrecedenceShardID + PrecedenceTaskType + PrecedenceDestination +) + +type GlobalBoolSetting = GlobalTypedSetting[bool] +type GlobalBoolConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[bool] + +func NewGlobalBoolSetting(key string, def bool, description string) GlobalBoolSetting { + return NewGlobalTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewGlobalBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) GlobalBoolConstrainedDefaultSetting { + return NewGlobalTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFn = TypedPropertyFn[bool] + +func GetBoolPropertyFn(value bool) BoolPropertyFn { + return GetTypedPropertyFn(value) +} + +type NamespaceBoolSetting = NamespaceTypedSetting[bool] +type NamespaceBoolConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[bool] + +func NewNamespaceBoolSetting(key string, def bool, description string) NamespaceBoolSetting { + return NewNamespaceTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewNamespaceBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) NamespaceBoolConstrainedDefaultSetting { + return NewNamespaceTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[bool] + +func GetBoolPropertyFnFilteredByNamespace(value bool) BoolPropertyFnWithNamespaceFilter { + return GetTypedPropertyFnFilteredByNamespace(value) +} + +type NamespaceIDBoolSetting = NamespaceIDTypedSetting[bool] +type NamespaceIDBoolConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[bool] + +func NewNamespaceIDBoolSetting(key string, def bool, description string) NamespaceIDBoolSetting { + return NewNamespaceIDTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewNamespaceIDBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) NamespaceIDBoolConstrainedDefaultSetting { + return NewNamespaceIDTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[bool] + +func GetBoolPropertyFnFilteredByNamespaceID(value bool) BoolPropertyFnWithNamespaceIDFilter { + return GetTypedPropertyFnFilteredByNamespaceID(value) +} + +type TaskQueueBoolSetting = TaskQueueTypedSetting[bool] +type TaskQueueBoolConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[bool] + +func NewTaskQueueBoolSetting(key string, def bool, description string) TaskQueueBoolSetting { + return NewTaskQueueTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewTaskQueueBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) TaskQueueBoolConstrainedDefaultSetting { + return NewTaskQueueTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[bool] + +func GetBoolPropertyFnFilteredByTaskQueue(value bool) BoolPropertyFnWithTaskQueueFilter { + return GetTypedPropertyFnFilteredByTaskQueue(value) +} + +type ShardIDBoolSetting = ShardIDTypedSetting[bool] +type ShardIDBoolConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[bool] + +func NewShardIDBoolSetting(key string, def bool, description string) ShardIDBoolSetting { + return NewShardIDTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewShardIDBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) ShardIDBoolConstrainedDefaultSetting { + return NewShardIDTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[bool] + +func GetBoolPropertyFnFilteredByShardID(value bool) BoolPropertyFnWithShardIDFilter { + return GetTypedPropertyFnFilteredByShardID(value) +} + +type TaskTypeBoolSetting = TaskTypeTypedSetting[bool] +type TaskTypeBoolConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[bool] + +func NewTaskTypeBoolSetting(key string, def bool, description string) TaskTypeBoolSetting { + return NewTaskTypeTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewTaskTypeBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) TaskTypeBoolConstrainedDefaultSetting { + return NewTaskTypeTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[bool] + +func GetBoolPropertyFnFilteredByTaskType(value bool) BoolPropertyFnWithTaskTypeFilter { + return GetTypedPropertyFnFilteredByTaskType(value) +} + +type DestinationBoolSetting = DestinationTypedSetting[bool] +type DestinationBoolConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[bool] + +func NewDestinationBoolSetting(key string, def bool, description string) DestinationBoolSetting { + return NewDestinationTypedSettingWithConverter[bool](key, convertBool, def, description) +} + +func NewDestinationBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) DestinationBoolConstrainedDefaultSetting { + return NewDestinationTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) +} + +type BoolPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[bool] + +func GetBoolPropertyFnFilteredByDestination(value bool) BoolPropertyFnWithDestinationFilter { + return GetTypedPropertyFnFilteredByDestination(value) +} + +type GlobalIntSetting = GlobalTypedSetting[int] +type GlobalIntConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[int] + +func NewGlobalIntSetting(key string, def int, description string) GlobalIntSetting { + return NewGlobalTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewGlobalIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) GlobalIntConstrainedDefaultSetting { + return NewGlobalTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFn = TypedPropertyFn[int] + +func GetIntPropertyFn(value int) IntPropertyFn { + return GetTypedPropertyFn(value) +} + +type NamespaceIntSetting = NamespaceTypedSetting[int] +type NamespaceIntConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[int] + +func NewNamespaceIntSetting(key string, def int, description string) NamespaceIntSetting { + return NewNamespaceTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewNamespaceIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) NamespaceIntConstrainedDefaultSetting { + return NewNamespaceTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[int] + +func GetIntPropertyFnFilteredByNamespace(value int) IntPropertyFnWithNamespaceFilter { + return GetTypedPropertyFnFilteredByNamespace(value) +} + +type NamespaceIDIntSetting = NamespaceIDTypedSetting[int] +type NamespaceIDIntConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[int] + +func NewNamespaceIDIntSetting(key string, def int, description string) NamespaceIDIntSetting { + return NewNamespaceIDTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewNamespaceIDIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) NamespaceIDIntConstrainedDefaultSetting { + return NewNamespaceIDTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[int] + +func GetIntPropertyFnFilteredByNamespaceID(value int) IntPropertyFnWithNamespaceIDFilter { + return GetTypedPropertyFnFilteredByNamespaceID(value) +} + +type TaskQueueIntSetting = TaskQueueTypedSetting[int] +type TaskQueueIntConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[int] + +func NewTaskQueueIntSetting(key string, def int, description string) TaskQueueIntSetting { + return NewTaskQueueTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewTaskQueueIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) TaskQueueIntConstrainedDefaultSetting { + return NewTaskQueueTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[int] + +func GetIntPropertyFnFilteredByTaskQueue(value int) IntPropertyFnWithTaskQueueFilter { + return GetTypedPropertyFnFilteredByTaskQueue(value) +} + +type ShardIDIntSetting = ShardIDTypedSetting[int] +type ShardIDIntConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[int] + +func NewShardIDIntSetting(key string, def int, description string) ShardIDIntSetting { + return NewShardIDTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewShardIDIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) ShardIDIntConstrainedDefaultSetting { + return NewShardIDTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[int] + +func GetIntPropertyFnFilteredByShardID(value int) IntPropertyFnWithShardIDFilter { + return GetTypedPropertyFnFilteredByShardID(value) +} + +type TaskTypeIntSetting = TaskTypeTypedSetting[int] +type TaskTypeIntConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[int] + +func NewTaskTypeIntSetting(key string, def int, description string) TaskTypeIntSetting { + return NewTaskTypeTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewTaskTypeIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) TaskTypeIntConstrainedDefaultSetting { + return NewTaskTypeTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[int] + +func GetIntPropertyFnFilteredByTaskType(value int) IntPropertyFnWithTaskTypeFilter { + return GetTypedPropertyFnFilteredByTaskType(value) +} + +type DestinationIntSetting = DestinationTypedSetting[int] +type DestinationIntConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[int] + +func NewDestinationIntSetting(key string, def int, description string) DestinationIntSetting { + return NewDestinationTypedSettingWithConverter[int](key, convertInt, def, description) +} + +func NewDestinationIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) DestinationIntConstrainedDefaultSetting { + return NewDestinationTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) +} + +type IntPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[int] + +func GetIntPropertyFnFilteredByDestination(value int) IntPropertyFnWithDestinationFilter { + return GetTypedPropertyFnFilteredByDestination(value) +} + +type GlobalFloatSetting = GlobalTypedSetting[float64] +type GlobalFloatConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[float64] + +func NewGlobalFloatSetting(key string, def float64, description string) GlobalFloatSetting { + return NewGlobalTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewGlobalFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) GlobalFloatConstrainedDefaultSetting { + return NewGlobalTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFn = TypedPropertyFn[float64] + +func GetFloatPropertyFn(value float64) FloatPropertyFn { + return GetTypedPropertyFn(value) +} + +type NamespaceFloatSetting = NamespaceTypedSetting[float64] +type NamespaceFloatConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[float64] + +func NewNamespaceFloatSetting(key string, def float64, description string) NamespaceFloatSetting { + return NewNamespaceTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewNamespaceFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) NamespaceFloatConstrainedDefaultSetting { + return NewNamespaceTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[float64] + +func GetFloatPropertyFnFilteredByNamespace(value float64) FloatPropertyFnWithNamespaceFilter { + return GetTypedPropertyFnFilteredByNamespace(value) +} + +type NamespaceIDFloatSetting = NamespaceIDTypedSetting[float64] +type NamespaceIDFloatConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[float64] + +func NewNamespaceIDFloatSetting(key string, def float64, description string) NamespaceIDFloatSetting { + return NewNamespaceIDTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewNamespaceIDFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) NamespaceIDFloatConstrainedDefaultSetting { + return NewNamespaceIDTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[float64] + +func GetFloatPropertyFnFilteredByNamespaceID(value float64) FloatPropertyFnWithNamespaceIDFilter { + return GetTypedPropertyFnFilteredByNamespaceID(value) +} + +type TaskQueueFloatSetting = TaskQueueTypedSetting[float64] +type TaskQueueFloatConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[float64] + +func NewTaskQueueFloatSetting(key string, def float64, description string) TaskQueueFloatSetting { + return NewTaskQueueTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewTaskQueueFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) TaskQueueFloatConstrainedDefaultSetting { + return NewTaskQueueTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[float64] + +func GetFloatPropertyFnFilteredByTaskQueue(value float64) FloatPropertyFnWithTaskQueueFilter { + return GetTypedPropertyFnFilteredByTaskQueue(value) +} + +type ShardIDFloatSetting = ShardIDTypedSetting[float64] +type ShardIDFloatConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[float64] + +func NewShardIDFloatSetting(key string, def float64, description string) ShardIDFloatSetting { + return NewShardIDTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewShardIDFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) ShardIDFloatConstrainedDefaultSetting { + return NewShardIDTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[float64] + +func GetFloatPropertyFnFilteredByShardID(value float64) FloatPropertyFnWithShardIDFilter { + return GetTypedPropertyFnFilteredByShardID(value) +} + +type TaskTypeFloatSetting = TaskTypeTypedSetting[float64] +type TaskTypeFloatConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[float64] + +func NewTaskTypeFloatSetting(key string, def float64, description string) TaskTypeFloatSetting { + return NewTaskTypeTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewTaskTypeFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) TaskTypeFloatConstrainedDefaultSetting { + return NewTaskTypeTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[float64] + +func GetFloatPropertyFnFilteredByTaskType(value float64) FloatPropertyFnWithTaskTypeFilter { + return GetTypedPropertyFnFilteredByTaskType(value) +} + +type DestinationFloatSetting = DestinationTypedSetting[float64] +type DestinationFloatConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[float64] + +func NewDestinationFloatSetting(key string, def float64, description string) DestinationFloatSetting { + return NewDestinationTypedSettingWithConverter[float64](key, convertFloat, def, description) +} + +func NewDestinationFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) DestinationFloatConstrainedDefaultSetting { + return NewDestinationTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) +} + +type FloatPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[float64] + +func GetFloatPropertyFnFilteredByDestination(value float64) FloatPropertyFnWithDestinationFilter { + return GetTypedPropertyFnFilteredByDestination(value) +} + +type GlobalStringSetting = GlobalTypedSetting[string] +type GlobalStringConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[string] + +func NewGlobalStringSetting(key string, def string, description string) GlobalStringSetting { + return NewGlobalTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewGlobalStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) GlobalStringConstrainedDefaultSetting { + return NewGlobalTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFn = TypedPropertyFn[string] + +func GetStringPropertyFn(value string) StringPropertyFn { + return GetTypedPropertyFn(value) +} + +type NamespaceStringSetting = NamespaceTypedSetting[string] +type NamespaceStringConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[string] + +func NewNamespaceStringSetting(key string, def string, description string) NamespaceStringSetting { + return NewNamespaceTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewNamespaceStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) NamespaceStringConstrainedDefaultSetting { + return NewNamespaceTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[string] + +func GetStringPropertyFnFilteredByNamespace(value string) StringPropertyFnWithNamespaceFilter { + return GetTypedPropertyFnFilteredByNamespace(value) +} + +type NamespaceIDStringSetting = NamespaceIDTypedSetting[string] +type NamespaceIDStringConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[string] + +func NewNamespaceIDStringSetting(key string, def string, description string) NamespaceIDStringSetting { + return NewNamespaceIDTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewNamespaceIDStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) NamespaceIDStringConstrainedDefaultSetting { + return NewNamespaceIDTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[string] + +func GetStringPropertyFnFilteredByNamespaceID(value string) StringPropertyFnWithNamespaceIDFilter { + return GetTypedPropertyFnFilteredByNamespaceID(value) +} + +type TaskQueueStringSetting = TaskQueueTypedSetting[string] +type TaskQueueStringConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[string] + +func NewTaskQueueStringSetting(key string, def string, description string) TaskQueueStringSetting { + return NewTaskQueueTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewTaskQueueStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) TaskQueueStringConstrainedDefaultSetting { + return NewTaskQueueTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[string] + +func GetStringPropertyFnFilteredByTaskQueue(value string) StringPropertyFnWithTaskQueueFilter { + return GetTypedPropertyFnFilteredByTaskQueue(value) +} + +type ShardIDStringSetting = ShardIDTypedSetting[string] +type ShardIDStringConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[string] + +func NewShardIDStringSetting(key string, def string, description string) ShardIDStringSetting { + return NewShardIDTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewShardIDStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) ShardIDStringConstrainedDefaultSetting { + return NewShardIDTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[string] + +func GetStringPropertyFnFilteredByShardID(value string) StringPropertyFnWithShardIDFilter { + return GetTypedPropertyFnFilteredByShardID(value) +} + +type TaskTypeStringSetting = TaskTypeTypedSetting[string] +type TaskTypeStringConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[string] + +func NewTaskTypeStringSetting(key string, def string, description string) TaskTypeStringSetting { + return NewTaskTypeTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewTaskTypeStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) TaskTypeStringConstrainedDefaultSetting { + return NewTaskTypeTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[string] + +func GetStringPropertyFnFilteredByTaskType(value string) StringPropertyFnWithTaskTypeFilter { + return GetTypedPropertyFnFilteredByTaskType(value) +} + +type DestinationStringSetting = DestinationTypedSetting[string] +type DestinationStringConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[string] + +func NewDestinationStringSetting(key string, def string, description string) DestinationStringSetting { + return NewDestinationTypedSettingWithConverter[string](key, convertString, def, description) +} + +func NewDestinationStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) DestinationStringConstrainedDefaultSetting { + return NewDestinationTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) +} + +type StringPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[string] + +func GetStringPropertyFnFilteredByDestination(value string) StringPropertyFnWithDestinationFilter { + return GetTypedPropertyFnFilteredByDestination(value) +} + +type GlobalDurationSetting = GlobalTypedSetting[time.Duration] +type GlobalDurationConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[time.Duration] + +func NewGlobalDurationSetting(key string, def time.Duration, description string) GlobalDurationSetting { + return NewGlobalTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewGlobalDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) GlobalDurationConstrainedDefaultSetting { + return NewGlobalTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFn = TypedPropertyFn[time.Duration] + +func GetDurationPropertyFn(value time.Duration) DurationPropertyFn { + return GetTypedPropertyFn(value) +} + +type NamespaceDurationSetting = NamespaceTypedSetting[time.Duration] +type NamespaceDurationConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[time.Duration] + +func NewNamespaceDurationSetting(key string, def time.Duration, description string) NamespaceDurationSetting { + return NewNamespaceTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewNamespaceDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) NamespaceDurationConstrainedDefaultSetting { + return NewNamespaceTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[time.Duration] + +func GetDurationPropertyFnFilteredByNamespace(value time.Duration) DurationPropertyFnWithNamespaceFilter { + return GetTypedPropertyFnFilteredByNamespace(value) +} + +type NamespaceIDDurationSetting = NamespaceIDTypedSetting[time.Duration] +type NamespaceIDDurationConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[time.Duration] + +func NewNamespaceIDDurationSetting(key string, def time.Duration, description string) NamespaceIDDurationSetting { + return NewNamespaceIDTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewNamespaceIDDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) NamespaceIDDurationConstrainedDefaultSetting { + return NewNamespaceIDTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[time.Duration] + +func GetDurationPropertyFnFilteredByNamespaceID(value time.Duration) DurationPropertyFnWithNamespaceIDFilter { + return GetTypedPropertyFnFilteredByNamespaceID(value) +} + +type TaskQueueDurationSetting = TaskQueueTypedSetting[time.Duration] +type TaskQueueDurationConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[time.Duration] + +func NewTaskQueueDurationSetting(key string, def time.Duration, description string) TaskQueueDurationSetting { + return NewTaskQueueTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewTaskQueueDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) TaskQueueDurationConstrainedDefaultSetting { + return NewTaskQueueTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[time.Duration] + +func GetDurationPropertyFnFilteredByTaskQueue(value time.Duration) DurationPropertyFnWithTaskQueueFilter { + return GetTypedPropertyFnFilteredByTaskQueue(value) +} + +type ShardIDDurationSetting = ShardIDTypedSetting[time.Duration] +type ShardIDDurationConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[time.Duration] + +func NewShardIDDurationSetting(key string, def time.Duration, description string) ShardIDDurationSetting { + return NewShardIDTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewShardIDDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) ShardIDDurationConstrainedDefaultSetting { + return NewShardIDTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[time.Duration] + +func GetDurationPropertyFnFilteredByShardID(value time.Duration) DurationPropertyFnWithShardIDFilter { + return GetTypedPropertyFnFilteredByShardID(value) +} + +type TaskTypeDurationSetting = TaskTypeTypedSetting[time.Duration] +type TaskTypeDurationConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[time.Duration] + +func NewTaskTypeDurationSetting(key string, def time.Duration, description string) TaskTypeDurationSetting { + return NewTaskTypeTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewTaskTypeDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) TaskTypeDurationConstrainedDefaultSetting { + return NewTaskTypeTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[time.Duration] + +func GetDurationPropertyFnFilteredByTaskType(value time.Duration) DurationPropertyFnWithTaskTypeFilter { + return GetTypedPropertyFnFilteredByTaskType(value) +} + +type DestinationDurationSetting = DestinationTypedSetting[time.Duration] +type DestinationDurationConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[time.Duration] + +func NewDestinationDurationSetting(key string, def time.Duration, description string) DestinationDurationSetting { + return NewDestinationTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) +} + +func NewDestinationDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) DestinationDurationConstrainedDefaultSetting { + return NewDestinationTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) +} + +type DurationPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[time.Duration] + +func GetDurationPropertyFnFilteredByDestination(value time.Duration) DurationPropertyFnWithDestinationFilter { + return GetTypedPropertyFnFilteredByDestination(value) +} + +type GlobalMapSetting = GlobalTypedSetting[map[string]any] +type GlobalMapConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[map[string]any] + +func NewGlobalMapSetting(key string, def map[string]any, description string) GlobalMapSetting { + return NewGlobalTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewGlobalMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) GlobalMapConstrainedDefaultSetting { + return NewGlobalTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFn = TypedPropertyFn[map[string]any] + +func GetMapPropertyFn(value map[string]any) MapPropertyFn { + return GetTypedPropertyFn(value) +} + +type NamespaceMapSetting = NamespaceTypedSetting[map[string]any] +type NamespaceMapConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[map[string]any] + +func NewNamespaceMapSetting(key string, def map[string]any, description string) NamespaceMapSetting { + return NewNamespaceTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewNamespaceMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) NamespaceMapConstrainedDefaultSetting { + return NewNamespaceTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[map[string]any] + +func GetMapPropertyFnFilteredByNamespace(value map[string]any) MapPropertyFnWithNamespaceFilter { + return GetTypedPropertyFnFilteredByNamespace(value) +} + +type NamespaceIDMapSetting = NamespaceIDTypedSetting[map[string]any] +type NamespaceIDMapConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[map[string]any] + +func NewNamespaceIDMapSetting(key string, def map[string]any, description string) NamespaceIDMapSetting { + return NewNamespaceIDTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewNamespaceIDMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) NamespaceIDMapConstrainedDefaultSetting { + return NewNamespaceIDTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[map[string]any] + +func GetMapPropertyFnFilteredByNamespaceID(value map[string]any) MapPropertyFnWithNamespaceIDFilter { + return GetTypedPropertyFnFilteredByNamespaceID(value) +} + +type TaskQueueMapSetting = TaskQueueTypedSetting[map[string]any] +type TaskQueueMapConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[map[string]any] + +func NewTaskQueueMapSetting(key string, def map[string]any, description string) TaskQueueMapSetting { + return NewTaskQueueTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewTaskQueueMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) TaskQueueMapConstrainedDefaultSetting { + return NewTaskQueueTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[map[string]any] + +func GetMapPropertyFnFilteredByTaskQueue(value map[string]any) MapPropertyFnWithTaskQueueFilter { + return GetTypedPropertyFnFilteredByTaskQueue(value) +} + +type ShardIDMapSetting = ShardIDTypedSetting[map[string]any] +type ShardIDMapConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[map[string]any] + +func NewShardIDMapSetting(key string, def map[string]any, description string) ShardIDMapSetting { + return NewShardIDTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewShardIDMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) ShardIDMapConstrainedDefaultSetting { + return NewShardIDTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[map[string]any] + +func GetMapPropertyFnFilteredByShardID(value map[string]any) MapPropertyFnWithShardIDFilter { + return GetTypedPropertyFnFilteredByShardID(value) +} + +type TaskTypeMapSetting = TaskTypeTypedSetting[map[string]any] +type TaskTypeMapConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[map[string]any] + +func NewTaskTypeMapSetting(key string, def map[string]any, description string) TaskTypeMapSetting { + return NewTaskTypeTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewTaskTypeMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) TaskTypeMapConstrainedDefaultSetting { + return NewTaskTypeTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[map[string]any] + +func GetMapPropertyFnFilteredByTaskType(value map[string]any) MapPropertyFnWithTaskTypeFilter { + return GetTypedPropertyFnFilteredByTaskType(value) +} + +type DestinationMapSetting = DestinationTypedSetting[map[string]any] +type DestinationMapConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[map[string]any] + +func NewDestinationMapSetting(key string, def map[string]any, description string) DestinationMapSetting { + return NewDestinationTypedSettingWithConverter[map[string]any](key, convertMap, def, description) +} + +func NewDestinationMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) DestinationMapConstrainedDefaultSetting { + return NewDestinationTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) +} + +type MapPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[map[string]any] + +func GetMapPropertyFnFilteredByDestination(value map[string]any) MapPropertyFnWithDestinationFilter { + return GetTypedPropertyFnFilteredByDestination(value) +} + +type GlobalTypedSetting[T any] setting[T, func()] +type GlobalTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func()] + +// NewGlobalTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewGlobalTypedSetting[T any](key string, def T, description string) GlobalTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := GlobalTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewGlobalTypedSettingWithConverter creates a setting with a custom converter function. +func NewGlobalTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) GlobalTypedSetting[T] { + s := GlobalTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewGlobalTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewGlobalTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) GlobalTypedConstrainedDefaultSetting[T] { + s := GlobalTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s GlobalTypedSetting[T]) Key() Key { return s.key } +func (s GlobalTypedSetting[T]) Precedence() Precedence { return PrecedenceGlobal } +func (s GlobalTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s GlobalTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s GlobalTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceGlobal } +func (s GlobalTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s GlobalTypedSetting[T]) WithDefault(v T) GlobalTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFn[T any] func() T + +func (s GlobalTypedSetting[T]) Get(c *Collection) TypedPropertyFn[T] { + return func() T { + prec := []Constraints{{}} + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s GlobalTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFn[T] { + return func() T { + prec := []Constraints{{}} + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribable[T any] func(callback func(T)) (v T, cancel func()) + +func (s GlobalTypedSetting[T]) Subscribe(c *Collection) TypedSubscribable[T] { + return func(callback func(T)) (T, func()) { + prec := []Constraints{{}} + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s GlobalTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s GlobalTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribable[T] { + return func(callback func(T)) (T, func()) { + prec := []Constraints{{}} + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s GlobalTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFn[T any](value T) TypedPropertyFn[T] { + return func() T { + return value + } +} + +type NamespaceTypedSetting[T any] setting[T, func(namespace string)] +type NamespaceTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespace string)] + +// NewNamespaceTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewNamespaceTypedSetting[T any](key string, def T, description string) NamespaceTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := NamespaceTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewNamespaceTypedSettingWithConverter creates a setting with a custom converter function. +func NewNamespaceTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) NamespaceTypedSetting[T] { + s := NamespaceTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewNamespaceTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewNamespaceTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) NamespaceTypedConstrainedDefaultSetting[T] { + s := NamespaceTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s NamespaceTypedSetting[T]) Key() Key { return s.key } +func (s NamespaceTypedSetting[T]) Precedence() Precedence { return PrecedenceNamespace } +func (s NamespaceTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s NamespaceTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s NamespaceTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceNamespace } +func (s NamespaceTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s NamespaceTypedSetting[T]) WithDefault(v T) NamespaceTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFnWithNamespaceFilter[T any] func(namespace string) T + +func (s NamespaceTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceFilter[T] { + return func(namespace string) T { + prec := []Constraints{{Namespace: namespace}, {}} + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s NamespaceTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceFilter[T] { + return func(namespace string) T { + prec := []Constraints{{Namespace: namespace}, {}} + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribableWithNamespaceFilter[T any] func(namespace string, callback func(T)) (v T, cancel func()) + +func (s NamespaceTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceFilter[T] { + return func(namespace string, callback func(T)) (T, func()) { + prec := []Constraints{{Namespace: namespace}, {}} + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s NamespaceTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s NamespaceTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceFilter[T] { + return func(namespace string, callback func(T)) (T, func()) { + prec := []Constraints{{Namespace: namespace}, {}} + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s NamespaceTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFnFilteredByNamespace[T any](value T) TypedPropertyFnWithNamespaceFilter[T] { + return func(namespace string) T { + return value + } +} + +type NamespaceIDTypedSetting[T any] setting[T, func(namespaceID namespace.ID)] +type NamespaceIDTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespaceID namespace.ID)] + +// NewNamespaceIDTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewNamespaceIDTypedSetting[T any](key string, def T, description string) NamespaceIDTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := NamespaceIDTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewNamespaceIDTypedSettingWithConverter creates a setting with a custom converter function. +func NewNamespaceIDTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) NamespaceIDTypedSetting[T] { + s := NamespaceIDTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewNamespaceIDTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewNamespaceIDTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) NamespaceIDTypedConstrainedDefaultSetting[T] { + s := NamespaceIDTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s NamespaceIDTypedSetting[T]) Key() Key { return s.key } +func (s NamespaceIDTypedSetting[T]) Precedence() Precedence { return PrecedenceNamespaceID } +func (s NamespaceIDTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceNamespaceID } +func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s NamespaceIDTypedSetting[T]) WithDefault(v T) NamespaceIDTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFnWithNamespaceIDFilter[T any] func(namespaceID namespace.ID) T + +func (s NamespaceIDTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceIDFilter[T] { + return func(namespaceID namespace.ID) T { + prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceIDFilter[T] { + return func(namespaceID namespace.ID) T { + prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribableWithNamespaceIDFilter[T any] func(namespaceID namespace.ID, callback func(T)) (v T, cancel func()) + +func (s NamespaceIDTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceIDFilter[T] { + return func(namespaceID namespace.ID, callback func(T)) (T, func()) { + prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s NamespaceIDTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceIDFilter[T] { + return func(namespaceID namespace.ID, callback func(T)) (T, func()) { + prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s NamespaceIDTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFnFilteredByNamespaceID[T any](value T) TypedPropertyFnWithNamespaceIDFilter[T] { + return func(namespaceID namespace.ID) T { + return value + } +} + +type TaskQueueTypedSetting[T any] setting[T, func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType)] +type TaskQueueTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType)] + +// NewTaskQueueTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewTaskQueueTypedSetting[T any](key string, def T, description string) TaskQueueTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := TaskQueueTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewTaskQueueTypedSettingWithConverter creates a setting with a custom converter function. +func NewTaskQueueTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) TaskQueueTypedSetting[T] { + s := TaskQueueTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewTaskQueueTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewTaskQueueTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) TaskQueueTypedConstrainedDefaultSetting[T] { + s := TaskQueueTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s TaskQueueTypedSetting[T]) Key() Key { return s.key } +func (s TaskQueueTypedSetting[T]) Precedence() Precedence { return PrecedenceTaskQueue } +func (s TaskQueueTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s TaskQueueTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s TaskQueueTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceTaskQueue } +func (s TaskQueueTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s TaskQueueTypedSetting[T]) WithDefault(v T) TaskQueueTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFnWithTaskQueueFilter[T any] func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T + +func (s TaskQueueTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskQueueFilter[T] { + return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T { + prec := []Constraints{ + {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, + {Namespace: namespace, TaskQueueName: taskQueue}, + {TaskQueueName: taskQueue}, + {Namespace: namespace}, + {}, + } + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s TaskQueueTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskQueueFilter[T] { + return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T { + prec := []Constraints{ + {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, + {Namespace: namespace, TaskQueueName: taskQueue}, + {TaskQueueName: taskQueue}, + {Namespace: namespace}, + {}, + } + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribableWithTaskQueueFilter[T any] func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType, callback func(T)) (v T, cancel func()) + +func (s TaskQueueTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskQueueFilter[T] { + return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType, callback func(T)) (T, func()) { + prec := []Constraints{ + {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, + {Namespace: namespace, TaskQueueName: taskQueue}, + {TaskQueueName: taskQueue}, + {Namespace: namespace}, + {}, + } + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s TaskQueueTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s TaskQueueTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskQueueFilter[T] { + return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType, callback func(T)) (T, func()) { + prec := []Constraints{ + {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, + {Namespace: namespace, TaskQueueName: taskQueue}, + {TaskQueueName: taskQueue}, + {Namespace: namespace}, + {}, + } + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s TaskQueueTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFnFilteredByTaskQueue[T any](value T) TypedPropertyFnWithTaskQueueFilter[T] { + return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T { + return value + } +} + +type ShardIDTypedSetting[T any] setting[T, func(shardID int32)] +type ShardIDTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(shardID int32)] + +// NewShardIDTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewShardIDTypedSetting[T any](key string, def T, description string) ShardIDTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := ShardIDTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewShardIDTypedSettingWithConverter creates a setting with a custom converter function. +func NewShardIDTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) ShardIDTypedSetting[T] { + s := ShardIDTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewShardIDTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewShardIDTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) ShardIDTypedConstrainedDefaultSetting[T] { + s := ShardIDTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s ShardIDTypedSetting[T]) Key() Key { return s.key } +func (s ShardIDTypedSetting[T]) Precedence() Precedence { return PrecedenceShardID } +func (s ShardIDTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s ShardIDTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s ShardIDTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceShardID } +func (s ShardIDTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s ShardIDTypedSetting[T]) WithDefault(v T) ShardIDTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFnWithShardIDFilter[T any] func(shardID int32) T + +func (s ShardIDTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithShardIDFilter[T] { + return func(shardID int32) T { + prec := []Constraints{{ShardID: shardID}, {}} + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s ShardIDTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithShardIDFilter[T] { + return func(shardID int32) T { + prec := []Constraints{{ShardID: shardID}, {}} + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribableWithShardIDFilter[T any] func(shardID int32, callback func(T)) (v T, cancel func()) + +func (s ShardIDTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithShardIDFilter[T] { + return func(shardID int32, callback func(T)) (T, func()) { + prec := []Constraints{{ShardID: shardID}, {}} + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s ShardIDTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s ShardIDTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithShardIDFilter[T] { + return func(shardID int32, callback func(T)) (T, func()) { + prec := []Constraints{{ShardID: shardID}, {}} + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s ShardIDTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFnFilteredByShardID[T any](value T) TypedPropertyFnWithShardIDFilter[T] { + return func(shardID int32) T { + return value + } +} + +type TaskTypeTypedSetting[T any] setting[T, func(taskType enumsspb.TaskType)] +type TaskTypeTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(taskType enumsspb.TaskType)] + +// NewTaskTypeTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewTaskTypeTypedSetting[T any](key string, def T, description string) TaskTypeTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := TaskTypeTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewTaskTypeTypedSettingWithConverter creates a setting with a custom converter function. +func NewTaskTypeTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) TaskTypeTypedSetting[T] { + s := TaskTypeTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewTaskTypeTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewTaskTypeTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) TaskTypeTypedConstrainedDefaultSetting[T] { + s := TaskTypeTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s TaskTypeTypedSetting[T]) Key() Key { return s.key } +func (s TaskTypeTypedSetting[T]) Precedence() Precedence { return PrecedenceTaskType } +func (s TaskTypeTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s TaskTypeTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s TaskTypeTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceTaskType } +func (s TaskTypeTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s TaskTypeTypedSetting[T]) WithDefault(v T) TaskTypeTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFnWithTaskTypeFilter[T any] func(taskType enumsspb.TaskType) T + +func (s TaskTypeTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskTypeFilter[T] { + return func(taskType enumsspb.TaskType) T { + prec := []Constraints{{TaskType: taskType}, {}} + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s TaskTypeTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskTypeFilter[T] { + return func(taskType enumsspb.TaskType) T { + prec := []Constraints{{TaskType: taskType}, {}} + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribableWithTaskTypeFilter[T any] func(taskType enumsspb.TaskType, callback func(T)) (v T, cancel func()) + +func (s TaskTypeTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskTypeFilter[T] { + return func(taskType enumsspb.TaskType, callback func(T)) (T, func()) { + prec := []Constraints{{TaskType: taskType}, {}} + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s TaskTypeTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s TaskTypeTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskTypeFilter[T] { + return func(taskType enumsspb.TaskType, callback func(T)) (T, func()) { + prec := []Constraints{{TaskType: taskType}, {}} + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s TaskTypeTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFnFilteredByTaskType[T any](value T) TypedPropertyFnWithTaskTypeFilter[T] { + return func(taskType enumsspb.TaskType) T { + return value + } +} + +type DestinationTypedSetting[T any] setting[T, func(namespace string, destination string)] +type DestinationTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespace string, destination string)] + +// NewDestinationTypedSetting creates a setting that uses mapstructure to handle complex structured +// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful +// when using non-empty maps or slices as defaults, the result may not be what you want. +func NewDestinationTypedSetting[T any](key string, def T, description string) DestinationTypedSetting[T] { + // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. + warnDefaultSharedStructure(key, def) + // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. + _ = deepCopyForMapstructure(def) + + s := DestinationTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: ConvertStructure[T](def), + description: description, + } + register(s) + return s +} + +// NewDestinationTypedSettingWithConverter creates a setting with a custom converter function. +func NewDestinationTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) DestinationTypedSetting[T] { + s := DestinationTypedSetting[T]{ + key: MakeKey(key), + def: def, + convert: convert, + description: description, + } + register(s) + return s +} + +// NewDestinationTypedSettingWithConstrainedDefault creates a setting with a compound default value. +func NewDestinationTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) DestinationTypedConstrainedDefaultSetting[T] { + s := DestinationTypedConstrainedDefaultSetting[T]{ + key: MakeKey(key), + cdef: cdef, + convert: convert, + description: description, + } + register(s) + return s +} + +func (s DestinationTypedSetting[T]) Key() Key { return s.key } +func (s DestinationTypedSetting[T]) Precedence() Precedence { return PrecedenceDestination } +func (s DestinationTypedSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s DestinationTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } +func (s DestinationTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceDestination } +func (s DestinationTypedConstrainedDefaultSetting[T]) Validate(v any) error { + _, err := s.convert(v) + return err +} + +func (s DestinationTypedSetting[T]) WithDefault(v T) DestinationTypedSetting[T] { + newS := s + newS.def = v + return newS +} + +type TypedPropertyFnWithDestinationFilter[T any] func(namespace string, destination string) T + +func (s DestinationTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithDestinationFilter[T] { + return func(namespace string, destination string) T { + prec := []Constraints{ + {Namespace: namespace, Destination: destination}, + {Destination: destination}, + {Namespace: namespace}, + {}, + } + return matchAndConvert( + c, + s.key, + s.def, + s.convert, + prec, + ) + } +} + +func (s DestinationTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithDestinationFilter[T] { + return func(namespace string, destination string) T { + prec := []Constraints{ + {Namespace: namespace, Destination: destination}, + {Destination: destination}, + {Namespace: namespace}, + {}, + } + return matchAndConvertWithConstrainedDefault( + c, + s.key, + s.cdef, + s.convert, + prec, + ) + } +} + +type TypedSubscribableWithDestinationFilter[T any] func(namespace string, destination string, callback func(T)) (v T, cancel func()) + +func (s DestinationTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithDestinationFilter[T] { + return func(namespace string, destination string, callback func(T)) (T, func()) { + prec := []Constraints{ + {Namespace: namespace, Destination: destination}, + {Destination: destination}, + {Namespace: namespace}, + {}, + } + return subscribe(c, s.key, s.def, s.convert, prec, callback) + } +} + +func (s DestinationTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdate( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func (s DestinationTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithDestinationFilter[T] { + return func(namespace string, destination string, callback func(T)) (T, func()) { + prec := []Constraints{ + {Namespace: namespace, Destination: destination}, + {Destination: destination}, + {Namespace: namespace}, + {}, + } + return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) + } +} + +func (s DestinationTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { + dispatchUpdateWithConstrainedDefault( + c, + s.key, + s.convert, + sub.(*subscription[T]), + cvs, + ) +} + +func GetTypedPropertyFnFilteredByDestination[T any](value T) TypedPropertyFnWithDestinationFilter[T] { + return func(namespace string, destination string) T { + return value + } +} + diff --git a/tests/timeskipping_test.go b/tests/timeskipping_test.go new file mode 100644 index 0000000000..7a78420850 --- /dev/null +++ b/tests/timeskipping_test.go @@ -0,0 +1,226 @@ +package tests + +import ( + "testing" + "time" + + "github.com/google/uuid" + "github.com/stretchr/testify/suite" + commonpb "go.temporal.io/api/common/v1" + enumspb "go.temporal.io/api/enums/v1" + taskqueuepb "go.temporal.io/api/taskqueue/v1" + workflowpb "go.temporal.io/api/workflow/v1" + "go.temporal.io/api/workflowservice/v1" + "go.temporal.io/server/common/dynamicconfig" + "go.temporal.io/server/common/testing/taskpoller" + "go.temporal.io/server/common/testing/testvars" + "go.temporal.io/server/tests/testcore" + "google.golang.org/protobuf/types/known/durationpb" + "google.golang.org/protobuf/types/known/fieldmaskpb" +) + +type TimeSkippingTestSuite struct { + testcore.FunctionalTestBase +} + +func TestTimeSkippingTestSuite(t *testing.T) { + t.Parallel() + suite.Run(t, new(TimeSkippingTestSuite)) +} + +func (s *TimeSkippingTestSuite) SetupTest() { + s.FunctionalTestBase.SetupTest() +} + +func (s *TimeSkippingTestSuite) updateTimeSkipping( + workflowExecution *commonpb.WorkflowExecution, + identity string, + enabled bool, +) *workflowservice.UpdateWorkflowExecutionOptionsResponse { + resp, err := s.FrontendClient().UpdateWorkflowExecutionOptions(testcore.NewContext(), &workflowservice.UpdateWorkflowExecutionOptionsRequest{ + Namespace: s.Namespace().String(), + WorkflowExecution: workflowExecution, + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: enabled}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + Identity: identity, + }) + s.NoError(err) + return resp +} + +// TestTimeSkipping_EnabledToDisabled starts a workflow with time skipping enabled, +// then disables it via UpdateWorkflowExecutionOptions. Verifies a +// WorkflowExecutionOptionsUpdated event is written with Enabled=false. +func (s *TimeSkippingTestSuite) TestTimeSkipping_EnabledToDisabled() { + s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) + + id := "functional-timeskipping-enabled-to-disabled" + tl := "functional-timeskipping-enabled-to-disabled-tq" + tv := testvars.New(s.T()).WithTaskQueue(tl) + + startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: id, + WorkflowType: &commonpb.WorkflowType{Name: id + "-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(100 * time.Second), + WorkflowTaskTimeout: durationpb.New(10 * time.Second), + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.NoError(err) + workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.GetRunId()} + + // Disable time skipping — a real change that must produce an options-updated event. + updateResp := s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), false) + s.False(updateResp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) + + poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + _, err = poller.PollWorkflowTask( + &workflowservice.PollWorkflowTaskQueueRequest{ + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + }, + ).HandleTask(tv, taskpoller.CompleteWorkflowHandler) + s.NoError(err) + + // todo: @feiyang, will change with a new event type after data plane is added + historyEvents := s.GetHistory(s.Namespace().String(), workflowExecution) + s.EqualHistoryEvents(` + 1 WorkflowExecutionStarted + 2 WorkflowTaskScheduled + 3 WorkflowExecutionOptionsUpdated + 4 WorkflowTaskStarted + 5 WorkflowTaskCompleted + 6 WorkflowExecutionCompleted +`, historyEvents) + + for _, event := range historyEvents { + if event.GetEventType() == enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED { + s.False(event.GetWorkflowExecutionOptionsUpdatedEventAttributes().GetTimeSkippingConfig().GetEnabled()) + } + } +} + +// TestTimeSkipping_DisabledToEnabled starts a workflow without time skipping, +// then enables it via UpdateWorkflowExecutionOptions. Verifies a +// WorkflowExecutionOptionsUpdated event is written with Enabled=true. +func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToEnabled() { + s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) + + id := "functional-timeskipping-disabled-to-enabled" + tl := "functional-timeskipping-disabled-to-enabled-tq" + tv := testvars.New(s.T()).WithTaskQueue(tl) + + startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: id, + WorkflowType: &commonpb.WorkflowType{Name: id + "-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(100 * time.Second), + WorkflowTaskTimeout: durationpb.New(10 * time.Second), + }) + s.NoError(err) + workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.GetRunId()} + + // Enable time skipping — a real change that must produce an options-updated event. + updateResp := s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), true) + s.True(updateResp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) + + poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + _, err = poller.PollWorkflowTask( + &workflowservice.PollWorkflowTaskQueueRequest{ + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + }, + ).HandleTask(tv, taskpoller.CompleteWorkflowHandler) + s.NoError(err) + + // todo: @feiyang, will change with a new event type after data plane is added + historyEvents := s.GetHistory(s.Namespace().String(), workflowExecution) + s.EqualHistoryEvents(` + 1 WorkflowExecutionStarted + 2 WorkflowTaskScheduled + 3 WorkflowExecutionOptionsUpdated + 4 WorkflowTaskStarted + 5 WorkflowTaskCompleted + 6 WorkflowExecutionCompleted +`, historyEvents) + + for _, event := range historyEvents { + if event.GetEventType() == enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_OPTIONS_UPDATED { + s.True(event.GetWorkflowExecutionOptionsUpdatedEventAttributes().GetTimeSkippingConfig().GetEnabled()) + } + } +} + +// TestTimeSkipping_DisabledToDisabled starts a workflow with time skipping enabled, +// disables it, then attempts to disable it again. The second update is a no-op +// and must not produce a second WorkflowExecutionOptionsUpdated event. +func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToDisabled() { + s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) + + id := "functional-timeskipping-disabled-to-disabled" + tl := "functional-timeskipping-disabled-to-disabled-tq" + tv := testvars.New(s.T()).WithTaskQueue(tl) + + startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: id, + WorkflowType: &commonpb.WorkflowType{Name: id + "-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(100 * time.Second), + WorkflowTaskTimeout: durationpb.New(10 * time.Second), + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.NoError(err) + workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.GetRunId()} + + // First update: enabled → disabled. This is a real change that produces an event. + s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), false) + + // Second update: disabled → disabled again. Must be a no-op with no additional event. + updateResp := s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), false) + s.False(updateResp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) + + poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + _, err = poller.PollWorkflowTask( + &workflowservice.PollWorkflowTaskQueueRequest{ + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + }, + ).HandleTask(tv, taskpoller.CompleteWorkflowHandler) + s.NoError(err) + + // Only one WorkflowExecutionOptionsUpdated event (from the first update). + historyEvents := s.GetHistory(s.Namespace().String(), workflowExecution) + s.EqualHistoryEvents(` + 1 WorkflowExecutionStarted + 2 WorkflowTaskScheduled + 3 WorkflowExecutionOptionsUpdated + 4 WorkflowTaskStarted + 5 WorkflowTaskCompleted + 6 WorkflowExecutionCompleted +`, historyEvents) +} + +// TestTimeSkipping_FeatureDisabled verifies that starting a workflow with time skipping +// returns an error when the feature flag is off for the namespace. +func (s *TimeSkippingTestSuite) TestTimeSkipping_FeatureDisabled() { + // TimeSkippingEnabled defaults to false; no override needed. + id := "functional-timeskipping-feature-disabled" + tl := "functional-timeskipping-feature-disabled-tq" + + _, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: id, + WorkflowType: &commonpb.WorkflowType{Name: id + "-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(100 * time.Second), + WorkflowTaskTimeout: durationpb.New(10 * time.Second), + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.Error(err, "expected error when time skipping is disabled for namespace") +} From 0177eff8cebc28f6f66fdde5aa26dd6452e1ba4e Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Fri, 20 Mar 2026 23:01:41 -0700 Subject: [PATCH 2/7] timeskipping-poc: data plane with timeskipping-transfer-timertask --- api/enums/v1/task.go-helpers.pb.go | 1 + api/enums/v1/task.pb.go | 11 ++- .../serialization/task_serializers.go | 27 +++++++ .../temporal/server/api/enums/v1/task.proto | 3 + service/history/interfaces/mutable_state.go | 2 + .../history/interfaces/mutable_state_mock.go | 29 ++++++++ service/history/queues/metrics.go | 4 ++ service/history/tasks/time_skipping_timer.go | 55 ++++++++++++++ .../timer_queue_active_task_executor.go | 72 +++++++++++++++++++ service/history/workflow/context.go | 12 ++++ .../history/workflow/mutable_state_impl.go | 51 +++++++++++++ 11 files changed, 265 insertions(+), 2 deletions(-) create mode 100644 service/history/tasks/time_skipping_timer.go diff --git a/api/enums/v1/task.go-helpers.pb.go b/api/enums/v1/task.go-helpers.pb.go index fdf9ecdb97..fe649d867a 100644 --- a/api/enums/v1/task.go-helpers.pb.go +++ b/api/enums/v1/task.go-helpers.pb.go @@ -57,6 +57,7 @@ var ( "ReplicationSyncVersionedTransition": 31, "ChasmPure": 32, "Chasm": 33, + "TimeSkipping": 34, } ) diff --git a/api/enums/v1/task.pb.go b/api/enums/v1/task.pb.go index 2b902a95b2..4a310896c8 100644 --- a/api/enums/v1/task.pb.go +++ b/api/enums/v1/task.pb.go @@ -126,6 +126,8 @@ const ( TASK_TYPE_CHASM_PURE TaskType = 32 // A task with side effects generated by a CHASM component. TASK_TYPE_CHASM TaskType = 33 + // A task that triggers time skipping logic for a workflow execution. + TASK_TYPE_TIME_SKIPPING TaskType = 34 ) // Enum value maps for TaskType. @@ -162,6 +164,7 @@ var ( 31: "TASK_TYPE_REPLICATION_SYNC_VERSIONED_TRANSITION", 32: "TASK_TYPE_CHASM_PURE", 33: "TASK_TYPE_CHASM", + 34: "TASK_TYPE_TIME_SKIPPING", } TaskType_value = map[string]int32{ "TASK_TYPE_UNSPECIFIED": 0, @@ -195,6 +198,7 @@ var ( "TASK_TYPE_REPLICATION_SYNC_VERSIONED_TRANSITION": 31, "TASK_TYPE_CHASM_PURE": 32, "TASK_TYPE_CHASM": 33, + "TASK_TYPE_TIME_SKIPPING": 34, } ) @@ -278,6 +282,8 @@ func (x TaskType) String() string { return "ChasmPure" case TASK_TYPE_CHASM: return "Chasm" + case TASK_TYPE_TIME_SKIPPING: + return "TimeSkipping" default: return strconv.Itoa(int(x)) } @@ -367,7 +373,7 @@ const file_temporal_server_api_enums_v1_task_proto_rawDesc = "" + "TaskSource\x12\x1b\n" + "\x17TASK_SOURCE_UNSPECIFIED\x10\x00\x12\x17\n" + "\x13TASK_SOURCE_HISTORY\x10\x01\x12\x1a\n" + - "\x16TASK_SOURCE_DB_BACKLOG\x10\x02*\xb6\t\n" + + "\x16TASK_SOURCE_DB_BACKLOG\x10\x02*\xd3\t\n" + "\bTaskType\x12\x19\n" + "\x15TASK_TYPE_UNSPECIFIED\x10\x00\x12!\n" + "\x1dTASK_TYPE_REPLICATION_HISTORY\x10\x01\x12'\n" + @@ -400,7 +406,8 @@ const file_temporal_server_api_enums_v1_task_proto_rawDesc = "" + "\x1eTASK_TYPE_REPLICATION_SYNC_HSM\x10\x1e\x123\n" + "/TASK_TYPE_REPLICATION_SYNC_VERSIONED_TRANSITION\x10\x1f\x12\x18\n" + "\x14TASK_TYPE_CHASM_PURE\x10 \x12\x13\n" + - "\x0fTASK_TYPE_CHASM\x10!\"\x04\b\t\x10\t\"\x04\b\v\x10\v\"\x04\b\x17\x10\x17*\\\n" + + "\x0fTASK_TYPE_CHASM\x10!\x12\x1b\n" + + "\x17TASK_TYPE_TIME_SKIPPING\x10\"\"\x04\b\t\x10\t\"\x04\b\v\x10\v\"\x04\b\x17\x10\x17*\\\n" + "\fTaskPriority\x12\x1d\n" + "\x19TASK_PRIORITY_UNSPECIFIED\x10\x00\x12\x16\n" + "\x12TASK_PRIORITY_HIGH\x10\x01\x12\x15\n" + diff --git a/common/persistence/serialization/task_serializers.go b/common/persistence/serialization/task_serializers.go index 598cd194dd..aedab69378 100644 --- a/common/persistence/serialization/task_serializers.go +++ b/common/persistence/serialization/task_serializers.go @@ -134,6 +134,8 @@ func serializeTimerTask( timerTask = timerChasmTaskToProto(task) case *tasks.ChasmTaskPure: timerTask = timerChasmPureTaskToProto(task) + case *tasks.TimeSkippingTimerTask: + timerTask = timerTimeSkippingTaskToProto(task) default: return nil, serviceerror.NewInternalf("Unknown timer task type: %v", task) } @@ -202,6 +204,8 @@ func deserializeTimerTask( timer = timerChasmTaskFromProto(timerTask) case enumsspb.TASK_TYPE_CHASM_PURE: timer = timerChasmPureTaskFromProto(timerTask) + case enumsspb.TASK_TYPE_TIME_SKIPPING: + timer = timerTimeSkippingTaskFromProto(timerTask) default: return nil, serviceerror.NewInternalf("Unknown timer task type: %v", timerTask.TaskType) } @@ -1492,3 +1496,26 @@ func deserializeOutboundTask( return nil, serviceerror.NewInternalf("unknown outbound task type while deserializing: %v", info) } } + +func timerTimeSkippingTaskToProto(task *tasks.TimeSkippingTimerTask) *persistencespb.TimerTaskInfo { + return &persistencespb.TimerTaskInfo{ + NamespaceId: task.WorkflowKey.NamespaceID, + WorkflowId: task.WorkflowKey.WorkflowID, + RunId: task.WorkflowKey.RunID, + TaskType: enumsspb.TASK_TYPE_TIME_SKIPPING, + TaskId: task.TaskID, + VisibilityTime: timestamppb.New(task.VisibilityTimestamp), + } +} + +func timerTimeSkippingTaskFromProto(info *persistencespb.TimerTaskInfo) *tasks.TimeSkippingTimerTask { + return &tasks.TimeSkippingTimerTask{ + WorkflowKey: definition.NewWorkflowKey( + info.NamespaceId, + info.WorkflowId, + info.RunId, + ), + VisibilityTimestamp: info.VisibilityTime.AsTime(), + TaskID: info.TaskId, + } +} diff --git a/proto/internal/temporal/server/api/enums/v1/task.proto b/proto/internal/temporal/server/api/enums/v1/task.proto index 34e026271a..653c49c65c 100644 --- a/proto/internal/temporal/server/api/enums/v1/task.proto +++ b/proto/internal/temporal/server/api/enums/v1/task.proto @@ -59,6 +59,9 @@ enum TaskType { // A task with side effects generated by a CHASM component. TASK_TYPE_CHASM = 33; + + // A task that triggers time skipping logic for a workflow execution. + TASK_TYPE_TIME_SKIPPING = 34; } // TaskPriority is only used for replication task as of May 2024 diff --git a/service/history/interfaces/mutable_state.go b/service/history/interfaces/mutable_state.go index 2bb9ae0943..0139bac3a1 100644 --- a/service/history/interfaces/mutable_state.go +++ b/service/history/interfaces/mutable_state.go @@ -89,6 +89,8 @@ type ( AddTimeoutWorkflowEvent(int64, enumspb.RetryState, string) (*historypb.HistoryEvent, error) AddTimerCanceledEvent(int64, *commandpb.CancelTimerCommandAttributes, string) (*historypb.HistoryEvent, error) AddTimerFiredEvent(string) (*historypb.HistoryEvent, error) + AddTimeSkippingEvent(advancedTimeDuration time.Duration) (*historypb.HistoryEvent, error) + IsAutoTimeSkippable() bool AddTimerStartedEvent(int64, *commandpb.StartTimerCommandAttributes) (*historypb.HistoryEvent, *persistencespb.TimerInfo, error) AddUpsertWorkflowSearchAttributesEvent(int64, *commandpb.UpsertWorkflowSearchAttributesCommandAttributes) (*historypb.HistoryEvent, error) AddWorkflowPropertiesModifiedEvent(int64, *commandpb.ModifyWorkflowPropertiesCommandAttributes) (*historypb.HistoryEvent, error) diff --git a/service/history/interfaces/mutable_state_mock.go b/service/history/interfaces/mutable_state_mock.go index 11220a935f..30dc3879ab 100644 --- a/service/history/interfaces/mutable_state_mock.go +++ b/service/history/interfaces/mutable_state_mock.go @@ -556,6 +556,21 @@ func (mr *MockMutableStateMockRecorder) AddTasks(arg0 ...any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTasks", reflect.TypeOf((*MockMutableState)(nil).AddTasks), arg0...) } +// AddTimeSkippingEvent mocks base method. +func (m *MockMutableState) AddTimeSkippingEvent(advancedTimeDuration time.Duration) (*history.HistoryEvent, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddTimeSkippingEvent", advancedTimeDuration) + ret0, _ := ret[0].(*history.HistoryEvent) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AddTimeSkippingEvent indicates an expected call of AddTimeSkippingEvent. +func (mr *MockMutableStateMockRecorder) AddTimeSkippingEvent(advancedTimeDuration any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTimeSkippingEvent", reflect.TypeOf((*MockMutableState)(nil).AddTimeSkippingEvent), advancedTimeDuration) +} + // AddTimeoutWorkflowEvent mocks base method. func (m *MockMutableState) AddTimeoutWorkflowEvent(arg0 int64, arg1 enums.RetryState, arg2 string) (*history.HistoryEvent, error) { m.ctrl.T.Helper() @@ -3009,6 +3024,20 @@ func (mr *MockMutableStateMockRecorder) InitTransitionHistory() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InitTransitionHistory", reflect.TypeOf((*MockMutableState)(nil).InitTransitionHistory)) } +// IsAutoTimeSkippable mocks base method. +func (m *MockMutableState) IsAutoTimeSkippable() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "IsAutoTimeSkippable") + ret0, _ := ret[0].(bool) + return ret0 +} + +// IsAutoTimeSkippable indicates an expected call of IsAutoTimeSkippable. +func (mr *MockMutableStateMockRecorder) IsAutoTimeSkippable() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoTimeSkippable", reflect.TypeOf((*MockMutableState)(nil).IsAutoTimeSkippable)) +} + // IsCancelRequested mocks base method. func (m *MockMutableState) IsCancelRequested() bool { m.ctrl.T.Helper() diff --git a/service/history/queues/metrics.go b/service/history/queues/metrics.go index c836dc5451..9eb2368532 100644 --- a/service/history/queues/metrics.go +++ b/service/history/queues/metrics.go @@ -113,6 +113,8 @@ func GetActiveTimerTaskTypeTagValue( return prefix + "." + getCHASMTaskTypeTagValue(t, chasmRegistry) case *tasks.ChasmTaskPure: return metrics.TaskTypeTimerActiveTaskChasmPureTask + case *tasks.TimeSkippingTimerTask: + return prefix + ".TimeSkipping" default: return prefix + task.GetType().String() } @@ -142,6 +144,8 @@ func GetStandbyTimerTaskTypeTagValue( return metrics.TaskTypeTimerStandbyTaskWorkflowBackoffTimer case *tasks.ChasmTask: return prefix + "." + getCHASMTaskTypeTagValue(t, chasmRegistry) + case *tasks.TimeSkippingTimerTask: + return prefix + ".TimeSkipping" case *tasks.ChasmTaskPure: return metrics.TaskTypeTimerStandbyTaskChasmPureTask default: diff --git a/service/history/tasks/time_skipping_timer.go b/service/history/tasks/time_skipping_timer.go new file mode 100644 index 0000000000..b4b205c5f7 --- /dev/null +++ b/service/history/tasks/time_skipping_timer.go @@ -0,0 +1,55 @@ +package tasks + +import ( + "fmt" + "time" + + enumsspb "go.temporal.io/server/api/enums/v1" + "go.temporal.io/server/common/definition" +) + +var _ Task = (*TimeSkippingTimerTask)(nil) + +type ( + TimeSkippingTimerTask struct { + definition.WorkflowKey + VisibilityTimestamp time.Time + TaskID int64 + } +) + +func (t *TimeSkippingTimerTask) GetKey() Key { + return NewKey(t.VisibilityTimestamp, t.TaskID) +} + +func (t *TimeSkippingTimerTask) GetTaskID() int64 { + return t.TaskID +} + +func (t *TimeSkippingTimerTask) SetTaskID(id int64) { + t.TaskID = id +} + +func (t *TimeSkippingTimerTask) GetVisibilityTime() time.Time { + return t.VisibilityTimestamp +} + +func (t *TimeSkippingTimerTask) SetVisibilityTime(ts time.Time) { + t.VisibilityTimestamp = ts +} + +func (t *TimeSkippingTimerTask) GetCategory() Category { + return CategoryTimer +} + +func (t *TimeSkippingTimerTask) GetType() enumsspb.TaskType { + return enumsspb.TASK_TYPE_TIME_SKIPPING +} + +func (t *TimeSkippingTimerTask) String() string { + return fmt.Sprintf("TimeSkippingTimerTask{WorkflowKey: %s, VisibilityTimestamp: %v, TaskID: %v}", + t.WorkflowKey.String(), + t.VisibilityTimestamp, + t.TaskID, + ) +} diff --git a/service/history/timer_queue_active_task_executor.go b/service/history/timer_queue_active_task_executor.go index 9737bf6cfc..78faddd27c 100644 --- a/service/history/timer_queue_active_task_executor.go +++ b/service/history/timer_queue_active_task_executor.go @@ -112,6 +112,8 @@ func (t *timerQueueActiveTaskExecutor) Execute( err = t.executeWorkflowExecutionTimeoutTask(ctx, task) case *tasks.ActivityRetryTimerTask: err = t.executeActivityRetryTimerTask(ctx, task) + case *tasks.TimeSkippingTimerTask: + err = t.executeTimeSkippingTimerTask(ctx, task) case *tasks.WorkflowBackoffTimerTask: err = t.executeWorkflowBackoffTimerTask(ctx, task) case *tasks.DeleteHistoryEventTask: @@ -133,6 +135,76 @@ func (t *timerQueueActiveTaskExecutor) Execute( } } +func (t *timerQueueActiveTaskExecutor) executeTimeSkippingTimerTask( + ctx context.Context, + task *tasks.TimeSkippingTimerTask, +) (retError error) { + ctx, cancel := context.WithTimeout(ctx, taskTimeout) + defer cancel() + noSkippingReason := "" + defer func() { + if noSkippingReason != "" { + reason := fmt.Sprintf("no skipping reason: %s", noSkippingReason) + t.logger.Debug(reason, + tag.WorkflowID(task.WorkflowID), + tag.WorkflowRunID(task.RunID), + tag.WorkflowScheduledEventID(task.TaskID), + ) + } + }() + + weContext, release, err := getWorkflowExecutionContextForTask(ctx, t.shardContext, t.cache, task) + if err != nil { + return err + } + defer func() { release(retError) }() + + mutableState, err := loadMutableStateForTimerTask(ctx, t.shardContext, weContext, task, t.metricsHandler, t.logger) + if err != nil { + return err + } + if mutableState == nil { + release(nil) + return nil + } + timeSkippingInfo := mutableState.GetExecutionInfo().GetTimeSkippingInfo() + if timeSkippingInfo == nil || !timeSkippingInfo.GetEnabled() { + t.logger.Warn("time skipping is not disabled when runnign this task, this should be a rare case") + release(nil) + return nil + } + + // GUARD: check if time skipping is allowed by current state + if !mutableState.IsAutoTimeSkippable() { + release(nil) + return nil + } + + // time-skipping logic: + // Find the next pending user timer. + timerSequence := t.getTimerSequence(mutableState) + userTimers := timerSequence.LoadAndSortUserTimers() + if len(userTimers) == 0 { + release(nil) + noSkippingReason = "no pending user timers" + return nil + } + + now := t.Now() + nextTimerTs := userTimers[0].Timestamp // todo: @feiyang need to reorder? + if !nextTimerTs.After(now) { + // Already expired; the normal timer queue will handle it. + noSkippingReason = "next timer already expired" + release(nil) + return nil + } + durationToAdvance := nextTimerTs.Sub(now) + + // key step: of time skipping (event, mutable state update) + mutableState.AddTimeSkippingEvent(durationToAdvance) + return t.updateWorkflowExecution(ctx, weContext, mutableState, true) +} + func (t *timerQueueActiveTaskExecutor) executeUserTimerTimeoutTask( ctx context.Context, task *tasks.UserTimerTask, diff --git a/service/history/workflow/context.go b/service/history/workflow/context.go index 9948b31d03..1cc5df9230 100644 --- a/service/history/workflow/context.go +++ b/service/history/workflow/context.go @@ -234,6 +234,14 @@ func (c *ContextImpl) PersistWorkflowEvents( return PersistWorkflowEvents(ctx, shardContext, workflowEventsSlice...) } +// @feiyang this is a place for triggering time skipping changes so that it is inside the transaction +// but a workflow task is always scheduled for +// (1) standalone workflow execution -> pending workflowTask, cannot auto-skipping +// (2) workflow continue-as-new -> pending workflowTask, cannot auto-skipping +// cases workflow task is not immediately started, +// (3) child workflow - parent worklfow 2 phase commit -> won't time-skipping until the 2 phase commit is completed +// (4) delayed start -> only trigger time-skipping for this type +// so the last step shall be still triggering the time-skipping but only for (4) func (c *ContextImpl) CreateWorkflowExecution( ctx context.Context, shardContext historyi.ShardContext, @@ -519,6 +527,10 @@ func (c *ContextImpl) UpdateWorkflowExecutionWithNewAsPassive( ) } +// todo @feiyang this is a place for triggering time skipping changes so that it is inside the transaction +// another candidate than closeTransactionAsMutation/Snapshot +// - 544/568: covers both in mutation and snapshot +// - in all universal mutable state changes func (c *ContextImpl) UpdateWorkflowExecutionWithNew( ctx context.Context, shardContext historyi.ShardContext, diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 657a8780ae..888f8c748a 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -61,6 +61,7 @@ import ( "go.temporal.io/server/common/util" "go.temporal.io/server/common/worker_versioning" "go.temporal.io/server/components/callbacks" + "go.temporal.io/server/components/nexusoperations" "go.temporal.io/server/service/history/configs" "go.temporal.io/server/service/history/consts" "go.temporal.io/server/service/history/events" @@ -6917,6 +6918,8 @@ func (ms *MutableStateImpl) StartTransaction( return flushBeforeReady, nil } +// todo @feiyang this is a place for triggering time skipping changes so that it is inside the transaction +// won't get lost, the whole process is a transaction func (ms *MutableStateImpl) CloseTransactionAsMutation( ctx context.Context, transactionPolicy historyi.TransactionPolicy, @@ -6963,6 +6966,7 @@ func (ms *MutableStateImpl) CloseTransactionAsMutation( return workflowMutation, result.workflowEventsSeq, nil } +// todo @feiyang this is a place for triggering time skipping changes so that it is inside the transaction func (ms *MutableStateImpl) CloseTransactionAsSnapshot( ctx context.Context, transactionPolicy historyi.TransactionPolicy, @@ -7151,6 +7155,16 @@ func (ms *MutableStateImpl) closeTransaction( ms.executionInfo.StateTransitionCount += 1 ms.executionInfo.LastUpdateTime = timestamppb.New(ms.shard.GetTimeSource().Now()) + // whenever time skipping is enabled && mutable state changes, + // we need to schedule a time skipping timer task to check possible time skipping opportunities + timeSkippingInfo := ms.executionInfo.GetTimeSkippingInfo() + if timeSkippingInfo != nil && timeSkippingInfo.Enabled { + ms.InsertTasks[tasks.CategoryTimer] = append(ms.InsertTasks[tasks.CategoryTimer], &tasks.TimeSkippingTimerTask{ + WorkflowKey: ms.GetWorkflowKey(), + VisibilityTimestamp: ms.shard.GetTimeSource().Now(), + }) + } + // We generate checksum here based on the assumption that the returned // snapshot object is considered immutable. As of this writing, the only // code that modifies the returned object lives inside Context.resetWorkflowExecution. @@ -9106,6 +9120,43 @@ func (ms *MutableStateImpl) SetVersioningRevisionNumber(revisionNumber int64) { ms.GetExecutionInfo().GetVersioningInfo().RevisionNumber = revisionNumber } +func (ms *MutableStateImpl) AddTimeSkippingEvent(advancedTimeDuration time.Duration) (*historypb.HistoryEvent, error) { + // todo: @feiyang to be implemented + return nil, nil +} +func (ms *MutableStateImpl) IsAutoTimeSkippable() bool { + noSkippingReason := "" + defer func() { + if noSkippingReason != "" { + ms.logInfo(fmt.Sprintf("no auto time skipping allowed: %s", noSkippingReason), + tag.WorkflowID(ms.GetExecutionInfo().WorkflowId), + tag.WorkflowRunID(ms.GetExecutionState().RunId), + ) + } + }() + if !ms.IsWorkflowExecutionRunning() { + noSkippingReason = "workflow is not running" + return false + } + if ms.HasPendingWorkflowTask() { + noSkippingReason = "pending workflow task" + return false + } + if len(ms.GetPendingActivityInfos()) > 0 { + noSkippingReason = "pending activity" + return false + } + if len(ms.GetPendingChildExecutionInfos()) > 0 { + noSkippingReason = "pending child execution" + return false + } + if nexusoperations.MachineCollection(ms.HSM()).Size() > 0 { + noSkippingReason = "pending Nexus operations" + return false + } + return true +} + // reschedulePendingActivities reschedules all the activities that are not started, so they are // scheduled against the right queue in matching. func (ms *MutableStateImpl) reschedulePendingActivities(wftScheduleToClose time.Duration) error { From 4abe6f7b23e2db6df021f4f7766af8567c71a0b4 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Sat, 21 Mar 2026 23:23:08 -0700 Subject: [PATCH 3/7] time-skipping: core part of state manipulation --- .../v1/executions.go-helpers.pb.go | 37 + api/persistence/v1/executions.pb.go | 540 +++++++-- .../v1/activity_state.go-helpers.pb.go | 292 ----- .../gen/activitypb/v1/activity_state.pb.go | 1061 ----------------- .../v1/request_response.go-helpers.pb.go | 450 ------- .../gen/activitypb/v1/request_response.pb.go | 686 ----------- .../activity/gen/activitypb/v1/service.pb.go | 96 -- .../gen/activitypb/v1/service_client.pb.go | 318 ----- .../gen/activitypb/v1/service_grpc.pb.go | 295 ----- .../gen/activitypb/v1/tasks.go-helpers.pb.go | 191 --- .../activity/gen/activitypb/v1/tasks.pb.go | 307 ----- .../callbackpb/v1/message.go-helpers.pb.go | 104 -- .../callback/gen/callbackpb/v1/message.pb.go | 490 -------- .../gen/callbackpb/v1/tasks.go-helpers.pb.go | 80 -- .../callback/gen/callbackpb/v1/tasks.pb.go | 172 --- .../v1/operation.go-helpers.pb.go | 129 -- .../gen/nexusoperationpb/v1/operation.pb.go | 375 ------ .../v1/tasks.go-helpers.pb.go | 191 --- .../gen/nexusoperationpb/v1/tasks.pb.go | 311 ----- .../schedulerpb/v1/message.go-helpers.pb.go | 265 ---- .../gen/schedulerpb/v1/message.pb.go | 749 ------------ .../gen/schedulerpb/v1/tasks.go-helpers.pb.go | 265 ---- .../scheduler/gen/schedulerpb/v1/tasks.pb.go | 367 ------ .../gen/testspb/v1/message.go-helpers.pb.go | 117 -- chasm/lib/tests/gen/testspb/v1/message.pb.go | 266 ----- .../v1/request_response.go-helpers.pb.go | 80 -- .../gen/testspb/v1/request_response.pb.go | 181 --- chasm/lib/tests/gen/testspb/v1/service.pb.go | 70 -- .../tests/gen/testspb/v1/service_client.pb.go | 104 -- .../tests/gen/testspb/v1/service_grpc.pb.go | 110 -- common/log/tag/values.go | 1 + common/metrics/metric_defs.go | 5 +- go.mod | 2 +- go.sum | 6 + .../api/persistence/v1/executions.proto | 9 +- .../history/historybuilder/event_factory.go | 15 + service/history/historybuilder/event_store.go | 3 +- .../history/historybuilder/history_builder.go | 13 + service/history/interfaces/mutable_state.go | 4 +- .../history/interfaces/mutable_state_mock.go | 58 +- service/history/tasks/utils.go | 2 + .../timer_queue_active_task_executor.go | 23 +- .../history/workflow/mutable_state_impl.go | 180 ++- .../workflow/mutable_state_impl_test.go | 125 ++ service/history/workflow/task_refresher.go | 37 + .../workflow/time_skipping_time_source.go | 62 + .../time_skipping_time_source_test.go | 121 ++ tests/timeskipping_test.go | 262 ++++ 48 files changed, 1324 insertions(+), 8303 deletions(-) delete mode 100644 chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/request_response.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/service.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/service_client.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go delete mode 100644 chasm/lib/activity/gen/activitypb/v1/tasks.pb.go delete mode 100644 chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go delete mode 100644 chasm/lib/callback/gen/callbackpb/v1/message.pb.go delete mode 100644 chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go delete mode 100644 chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go delete mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go delete mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go delete mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go delete mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go delete mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go delete mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go delete mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go delete mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/message.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/request_response.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/service.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/service_client.pb.go delete mode 100644 chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go create mode 100644 service/history/workflow/time_skipping_time_source.go create mode 100644 service/history/workflow/time_skipping_time_source_test.go diff --git a/api/persistence/v1/executions.go-helpers.pb.go b/api/persistence/v1/executions.go-helpers.pb.go index 219a2374ac..04d45b6945 100644 --- a/api/persistence/v1/executions.go-helpers.pb.go +++ b/api/persistence/v1/executions.go-helpers.pb.go @@ -146,6 +146,43 @@ func (this *TimeSkippingInfo) Equal(that interface{}) bool { return proto.Equal(this, that1) } +// Marshal an object of type TimeSkippedDetails to the protobuf v3 wire format +func (val *TimeSkippedDetails) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TimeSkippedDetails from the protobuf v3 wire format +func (val *TimeSkippedDetails) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TimeSkippedDetails) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TimeSkippedDetails values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TimeSkippedDetails) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TimeSkippedDetails + switch t := that.(type) { + case *TimeSkippedDetails: + that1 = t + case TimeSkippedDetails: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + // Marshal an object of type ExecutionStats to the protobuf v3 wire format func (val *ExecutionStats) Marshal() ([]byte, error) { return proto.Marshal(val) diff --git a/api/persistence/v1/executions.pb.go b/api/persistence/v1/executions.pb.go index 053b4d197c..4993dee9c4 100644 --- a/api/persistence/v1/executions.pb.go +++ b/api/persistence/v1/executions.pb.go @@ -1196,7 +1196,7 @@ type TimeSkippingInfo struct { // metadata Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` // runtime history - SkippedTimeOffsets []*timestamppb.Timestamp `protobuf:"bytes,4,rep,name=skipped_time_offsets,json=skippedTimeOffsets,proto3" json:"skipped_time_offsets,omitempty"` + TimeSkippedDetails []*TimeSkippedDetails `protobuf:"bytes,2,rep,name=time_skipped_details,json=timeSkippedDetails,proto3" json:"time_skipped_details,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -1259,10 +1259,82 @@ func (x *TimeSkippingInfo) GetEnabled() bool { return false } -func (x *TimeSkippingInfo) GetSkippedTimeOffsets() []*timestamppb.Timestamp { +func (x *TimeSkippingInfo) GetTimeSkippedDetails() []*TimeSkippedDetails { if x != nil { +<<<<<<< HEAD return x.SkippedTimeOffsets >>>>>>> 286ac49dc (timeskipping-poc: control plane) +======= + return x.TimeSkippedDetails + } + return nil +} + +type TimeSkippedDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + RealTimePointWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=real_time_point_when_skipped,json=realTimePointWhenSkipped,proto3" json:"real_time_point_when_skipped,omitempty"` + VirtualTimePointWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=virtual_time_point_when_skipped,json=virtualTimePointWhenSkipped,proto3" json:"virtual_time_point_when_skipped,omitempty"` + DurationToSkip *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=duration_to_skip,json=durationToSkip,proto3" json:"duration_to_skip,omitempty"` + TargetVirtualTimePoint *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=target_virtual_time_point,json=targetVirtualTimePoint,proto3" json:"target_virtual_time_point,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimeSkippedDetails) Reset() { + *x = TimeSkippedDetails{} + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimeSkippedDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimeSkippedDetails) ProtoMessage() {} + +func (x *TimeSkippedDetails) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimeSkippedDetails.ProtoReflect.Descriptor instead. +func (*TimeSkippedDetails) Descriptor() ([]byte, []int) { + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{3} +} + +func (x *TimeSkippedDetails) GetRealTimePointWhenSkipped() *timestamppb.Timestamp { + if x != nil { + return x.RealTimePointWhenSkipped + } + return nil +} + +func (x *TimeSkippedDetails) GetVirtualTimePointWhenSkipped() *timestamppb.Timestamp { + if x != nil { + return x.VirtualTimePointWhenSkipped + } + return nil +} + +func (x *TimeSkippedDetails) GetDurationToSkip() *timestamppb.Timestamp { + if x != nil { + return x.DurationToSkip + } + return nil +} + +func (x *TimeSkippedDetails) GetTargetVirtualTimePoint() *timestamppb.Timestamp { + if x != nil { + return x.TargetVirtualTimePoint +>>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) } return nil } @@ -1282,7 +1354,7 @@ type ExecutionStats struct { func (x *ExecutionStats) Reset() { *x = ExecutionStats{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1294,7 +1366,7 @@ func (x *ExecutionStats) String() string { func (*ExecutionStats) ProtoMessage() {} func (x *ExecutionStats) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1307,7 +1379,7 @@ func (x *ExecutionStats) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionStats.ProtoReflect.Descriptor instead. func (*ExecutionStats) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{3} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{4} } func (x *ExecutionStats) GetHistorySize() int64 { @@ -1350,7 +1422,7 @@ type WorkflowExecutionState struct { func (x *WorkflowExecutionState) Reset() { *x = WorkflowExecutionState{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1362,7 +1434,7 @@ func (x *WorkflowExecutionState) String() string { func (*WorkflowExecutionState) ProtoMessage() {} func (x *WorkflowExecutionState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1375,7 +1447,7 @@ func (x *WorkflowExecutionState) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowExecutionState.ProtoReflect.Descriptor instead. func (*WorkflowExecutionState) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{4} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{5} } func (x *WorkflowExecutionState) GetCreateRequestId() string { @@ -1437,7 +1509,7 @@ type RequestIDInfo struct { func (x *RequestIDInfo) Reset() { *x = RequestIDInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1449,7 +1521,7 @@ func (x *RequestIDInfo) String() string { func (*RequestIDInfo) ProtoMessage() {} func (x *RequestIDInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1462,7 +1534,7 @@ func (x *RequestIDInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestIDInfo.ProtoReflect.Descriptor instead. func (*RequestIDInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{5} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{6} } func (x *RequestIDInfo) GetEventType() v11.EventType { @@ -1514,7 +1586,7 @@ type TransferTaskInfo struct { func (x *TransferTaskInfo) Reset() { *x = TransferTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1526,7 +1598,7 @@ func (x *TransferTaskInfo) String() string { func (*TransferTaskInfo) ProtoMessage() {} func (x *TransferTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1539,7 +1611,7 @@ func (x *TransferTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TransferTaskInfo.ProtoReflect.Descriptor instead. func (*TransferTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{6} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{7} } func (x *TransferTaskInfo) GetNamespaceId() string { @@ -1724,7 +1796,7 @@ type ReplicationTaskInfo struct { func (x *ReplicationTaskInfo) Reset() { *x = ReplicationTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1736,7 +1808,7 @@ func (x *ReplicationTaskInfo) String() string { func (*ReplicationTaskInfo) ProtoMessage() {} func (x *ReplicationTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1749,7 +1821,7 @@ func (x *ReplicationTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ReplicationTaskInfo.ProtoReflect.Descriptor instead. func (*ReplicationTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{7} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{8} } func (x *ReplicationTaskInfo) GetNamespaceId() string { @@ -1921,7 +1993,7 @@ type VisibilityTaskInfo struct { func (x *VisibilityTaskInfo) Reset() { *x = VisibilityTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1933,7 +2005,7 @@ func (x *VisibilityTaskInfo) String() string { func (*VisibilityTaskInfo) ProtoMessage() {} func (x *VisibilityTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1946,7 +2018,7 @@ func (x *VisibilityTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use VisibilityTaskInfo.ProtoReflect.Descriptor instead. func (*VisibilityTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{8} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{9} } func (x *VisibilityTaskInfo) GetNamespaceId() string { @@ -2077,7 +2149,7 @@ type TimerTaskInfo struct { func (x *TimerTaskInfo) Reset() { *x = TimerTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2089,7 +2161,7 @@ func (x *TimerTaskInfo) String() string { func (*TimerTaskInfo) ProtoMessage() {} func (x *TimerTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2102,7 +2174,7 @@ func (x *TimerTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TimerTaskInfo.ProtoReflect.Descriptor instead. func (*TimerTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{9} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{10} } func (x *TimerTaskInfo) GetNamespaceId() string { @@ -2259,7 +2331,7 @@ type ArchivalTaskInfo struct { func (x *ArchivalTaskInfo) Reset() { *x = ArchivalTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2271,7 +2343,7 @@ func (x *ArchivalTaskInfo) String() string { func (*ArchivalTaskInfo) ProtoMessage() {} func (x *ArchivalTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2284,7 +2356,7 @@ func (x *ArchivalTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ArchivalTaskInfo.ProtoReflect.Descriptor instead. func (*ArchivalTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{10} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{11} } func (x *ArchivalTaskInfo) GetTaskId() int64 { @@ -2358,7 +2430,7 @@ type OutboundTaskInfo struct { func (x *OutboundTaskInfo) Reset() { *x = OutboundTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2370,7 +2442,7 @@ func (x *OutboundTaskInfo) String() string { func (*OutboundTaskInfo) ProtoMessage() {} func (x *OutboundTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2383,7 +2455,7 @@ func (x *OutboundTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use OutboundTaskInfo.ProtoReflect.Descriptor instead. func (*OutboundTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{11} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{12} } func (x *OutboundTaskInfo) GetNamespaceId() string { @@ -2487,7 +2559,7 @@ type NexusInvocationTaskInfo struct { func (x *NexusInvocationTaskInfo) Reset() { *x = NexusInvocationTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2499,7 +2571,7 @@ func (x *NexusInvocationTaskInfo) String() string { func (*NexusInvocationTaskInfo) ProtoMessage() {} func (x *NexusInvocationTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2512,7 +2584,7 @@ func (x *NexusInvocationTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusInvocationTaskInfo.ProtoReflect.Descriptor instead. func (*NexusInvocationTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{12} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{13} } func (x *NexusInvocationTaskInfo) GetAttempt() int32 { @@ -2531,7 +2603,7 @@ type NexusCancelationTaskInfo struct { func (x *NexusCancelationTaskInfo) Reset() { *x = NexusCancelationTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2543,7 +2615,7 @@ func (x *NexusCancelationTaskInfo) String() string { func (*NexusCancelationTaskInfo) ProtoMessage() {} func (x *NexusCancelationTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2556,7 +2628,7 @@ func (x *NexusCancelationTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusCancelationTaskInfo.ProtoReflect.Descriptor instead. func (*NexusCancelationTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{13} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14} } func (x *NexusCancelationTaskInfo) GetAttempt() int32 { @@ -2664,7 +2736,7 @@ type ActivityInfo struct { func (x *ActivityInfo) Reset() { *x = ActivityInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2676,7 +2748,7 @@ func (x *ActivityInfo) String() string { func (*ActivityInfo) ProtoMessage() {} func (x *ActivityInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2689,7 +2761,7 @@ func (x *ActivityInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityInfo.ProtoReflect.Descriptor instead. func (*ActivityInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15} } func (x *ActivityInfo) GetVersion() int64 { @@ -3071,7 +3143,7 @@ type TimerInfo struct { func (x *TimerInfo) Reset() { *x = TimerInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3083,7 +3155,7 @@ func (x *TimerInfo) String() string { func (*TimerInfo) ProtoMessage() {} func (x *TimerInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3096,7 +3168,7 @@ func (x *TimerInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TimerInfo.ProtoReflect.Descriptor instead. func (*TimerInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16} } func (x *TimerInfo) GetVersion() int64 { @@ -3164,7 +3236,7 @@ type ChildExecutionInfo struct { func (x *ChildExecutionInfo) Reset() { *x = ChildExecutionInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3176,7 +3248,7 @@ func (x *ChildExecutionInfo) String() string { func (*ChildExecutionInfo) ProtoMessage() {} func (x *ChildExecutionInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3189,7 +3261,7 @@ func (x *ChildExecutionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ChildExecutionInfo.ProtoReflect.Descriptor instead. func (*ChildExecutionInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{17} } func (x *ChildExecutionInfo) GetVersion() int64 { @@ -3304,7 +3376,7 @@ type RequestCancelInfo struct { func (x *RequestCancelInfo) Reset() { *x = RequestCancelInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3316,7 +3388,7 @@ func (x *RequestCancelInfo) String() string { func (*RequestCancelInfo) ProtoMessage() {} func (x *RequestCancelInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3329,7 +3401,7 @@ func (x *RequestCancelInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestCancelInfo.ProtoReflect.Descriptor instead. func (*RequestCancelInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{17} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{18} } func (x *RequestCancelInfo) GetVersion() int64 { @@ -3381,7 +3453,7 @@ type SignalInfo struct { func (x *SignalInfo) Reset() { *x = SignalInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3393,7 +3465,7 @@ func (x *SignalInfo) String() string { func (*SignalInfo) ProtoMessage() {} func (x *SignalInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3406,7 +3478,7 @@ func (x *SignalInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use SignalInfo.ProtoReflect.Descriptor instead. func (*SignalInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{18} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{19} } func (x *SignalInfo) GetVersion() int64 { @@ -3456,7 +3528,7 @@ type Checksum struct { func (x *Checksum) Reset() { *x = Checksum{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3468,7 +3540,7 @@ func (x *Checksum) String() string { func (*Checksum) ProtoMessage() {} func (x *Checksum) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3481,7 +3553,7 @@ func (x *Checksum) ProtoReflect() protoreflect.Message { // Deprecated: Use Checksum.ProtoReflect.Descriptor instead. func (*Checksum) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{19} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20} } func (x *Checksum) GetVersion() int32 { @@ -3519,7 +3591,7 @@ type Callback struct { func (x *Callback) Reset() { *x = Callback{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3531,7 +3603,7 @@ func (x *Callback) String() string { func (*Callback) ProtoMessage() {} func (x *Callback) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3544,7 +3616,7 @@ func (x *Callback) ProtoReflect() protoreflect.Message { // Deprecated: Use Callback.ProtoReflect.Descriptor instead. func (*Callback) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21} } func (x *Callback) GetVariant() isCallback_Variant { @@ -3611,7 +3683,7 @@ type HSMCompletionCallbackArg struct { func (x *HSMCompletionCallbackArg) Reset() { *x = HSMCompletionCallbackArg{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3623,7 +3695,7 @@ func (x *HSMCompletionCallbackArg) String() string { func (*HSMCompletionCallbackArg) ProtoMessage() {} func (x *HSMCompletionCallbackArg) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3636,7 +3708,7 @@ func (x *HSMCompletionCallbackArg) ProtoReflect() protoreflect.Message { // Deprecated: Use HSMCompletionCallbackArg.ProtoReflect.Descriptor instead. func (*HSMCompletionCallbackArg) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22} } func (x *HSMCompletionCallbackArg) GetNamespaceId() string { @@ -3693,7 +3765,7 @@ type CallbackInfo struct { func (x *CallbackInfo) Reset() { *x = CallbackInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3705,7 +3777,7 @@ func (x *CallbackInfo) String() string { func (*CallbackInfo) ProtoMessage() {} func (x *CallbackInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3718,7 +3790,7 @@ func (x *CallbackInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackInfo.ProtoReflect.Descriptor instead. func (*CallbackInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23} } func (x *CallbackInfo) GetCallback() *Callback { @@ -3839,7 +3911,7 @@ type NexusOperationInfo struct { func (x *NexusOperationInfo) Reset() { *x = NexusOperationInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3851,7 +3923,7 @@ func (x *NexusOperationInfo) String() string { func (*NexusOperationInfo) ProtoMessage() {} func (x *NexusOperationInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3864,7 +3936,7 @@ func (x *NexusOperationInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusOperationInfo.ProtoReflect.Descriptor instead. func (*NexusOperationInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24} } func (x *NexusOperationInfo) GetEndpoint() string { @@ -4009,7 +4081,7 @@ type NexusOperationCancellationInfo struct { func (x *NexusOperationCancellationInfo) Reset() { *x = NexusOperationCancellationInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4021,7 +4093,7 @@ func (x *NexusOperationCancellationInfo) String() string { func (*NexusOperationCancellationInfo) ProtoMessage() {} func (x *NexusOperationCancellationInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4034,7 +4106,7 @@ func (x *NexusOperationCancellationInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusOperationCancellationInfo.ProtoReflect.Descriptor instead. func (*NexusOperationCancellationInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{25} } func (x *NexusOperationCancellationInfo) GetRequestedTime() *timestamppb.Timestamp { @@ -4097,7 +4169,7 @@ type ResetChildInfo struct { func (x *ResetChildInfo) Reset() { *x = ResetChildInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4109,7 +4181,7 @@ func (x *ResetChildInfo) String() string { func (*ResetChildInfo) ProtoMessage() {} func (x *ResetChildInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4122,7 +4194,7 @@ func (x *ResetChildInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetChildInfo.ProtoReflect.Descriptor instead. func (*ResetChildInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{25} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{26} } func (x *ResetChildInfo) GetShouldTerminateAndStart() bool { @@ -4148,7 +4220,7 @@ type WorkflowPauseInfo struct { func (x *WorkflowPauseInfo) Reset() { *x = WorkflowPauseInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4160,7 +4232,7 @@ func (x *WorkflowPauseInfo) String() string { func (*WorkflowPauseInfo) ProtoMessage() {} func (x *WorkflowPauseInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4173,7 +4245,7 @@ func (x *WorkflowPauseInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowPauseInfo.ProtoReflect.Descriptor instead. func (*WorkflowPauseInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{26} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{27} } func (x *WorkflowPauseInfo) GetPauseTime() *timestamppb.Timestamp { @@ -4215,7 +4287,7 @@ type TransferTaskInfo_CloseExecutionTaskDetails struct { func (x *TransferTaskInfo_CloseExecutionTaskDetails) Reset() { *x = TransferTaskInfo_CloseExecutionTaskDetails{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[35] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4227,7 +4299,7 @@ func (x *TransferTaskInfo_CloseExecutionTaskDetails) String() string { func (*TransferTaskInfo_CloseExecutionTaskDetails) ProtoMessage() {} func (x *TransferTaskInfo_CloseExecutionTaskDetails) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[35] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4240,7 +4312,7 @@ func (x *TransferTaskInfo_CloseExecutionTaskDetails) ProtoReflect() protoreflect // Deprecated: Use TransferTaskInfo_CloseExecutionTaskDetails.ProtoReflect.Descriptor instead. func (*TransferTaskInfo_CloseExecutionTaskDetails) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{6, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{7, 0} } func (x *TransferTaskInfo_CloseExecutionTaskDetails) GetCanSkipVisibilityArchival() bool { @@ -4264,7 +4336,7 @@ type ActivityInfo_UseWorkflowBuildIdInfo struct { func (x *ActivityInfo_UseWorkflowBuildIdInfo) Reset() { *x = ActivityInfo_UseWorkflowBuildIdInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4276,7 +4348,7 @@ func (x *ActivityInfo_UseWorkflowBuildIdInfo) String() string { func (*ActivityInfo_UseWorkflowBuildIdInfo) ProtoMessage() {} func (x *ActivityInfo_UseWorkflowBuildIdInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4289,7 +4361,7 @@ func (x *ActivityInfo_UseWorkflowBuildIdInfo) ProtoReflect() protoreflect.Messag // Deprecated: Use ActivityInfo_UseWorkflowBuildIdInfo.ProtoReflect.Descriptor instead. func (*ActivityInfo_UseWorkflowBuildIdInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15, 0} } func (x *ActivityInfo_UseWorkflowBuildIdInfo) GetLastUsedBuildId() string { @@ -4321,7 +4393,7 @@ type ActivityInfo_PauseInfo struct { func (x *ActivityInfo_PauseInfo) Reset() { *x = ActivityInfo_PauseInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4333,7 +4405,7 @@ func (x *ActivityInfo_PauseInfo) String() string { func (*ActivityInfo_PauseInfo) ProtoMessage() {} func (x *ActivityInfo_PauseInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4346,7 +4418,7 @@ func (x *ActivityInfo_PauseInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityInfo_PauseInfo.ProtoReflect.Descriptor instead. func (*ActivityInfo_PauseInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15, 1} } func (x *ActivityInfo_PauseInfo) GetPauseTime() *timestamppb.Timestamp { @@ -4411,7 +4483,7 @@ type ActivityInfo_PauseInfo_Manual struct { func (x *ActivityInfo_PauseInfo_Manual) Reset() { *x = ActivityInfo_PauseInfo_Manual{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4423,7 +4495,7 @@ func (x *ActivityInfo_PauseInfo_Manual) String() string { func (*ActivityInfo_PauseInfo_Manual) ProtoMessage() {} func (x *ActivityInfo_PauseInfo_Manual) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4436,7 +4508,7 @@ func (x *ActivityInfo_PauseInfo_Manual) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityInfo_PauseInfo_Manual.ProtoReflect.Descriptor instead. func (*ActivityInfo_PauseInfo_Manual) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14, 1, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15, 1, 0} } func (x *ActivityInfo_PauseInfo_Manual) GetIdentity() string { @@ -4468,7 +4540,7 @@ type Callback_Nexus struct { func (x *Callback_Nexus) Reset() { *x = Callback_Nexus{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4480,7 +4552,7 @@ func (x *Callback_Nexus) String() string { func (*Callback_Nexus) ProtoMessage() {} func (x *Callback_Nexus) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4493,7 +4565,7 @@ func (x *Callback_Nexus) ProtoReflect() protoreflect.Message { // Deprecated: Use Callback_Nexus.ProtoReflect.Descriptor instead. func (*Callback_Nexus) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21, 0} } func (x *Callback_Nexus) GetUrl() string { @@ -4530,7 +4602,7 @@ type Callback_HSM struct { func (x *Callback_HSM) Reset() { *x = Callback_HSM{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4542,7 +4614,7 @@ func (x *Callback_HSM) String() string { func (*Callback_HSM) ProtoMessage() {} func (x *Callback_HSM) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4555,7 +4627,7 @@ func (x *Callback_HSM) ProtoReflect() protoreflect.Message { // Deprecated: Use Callback_HSM.ProtoReflect.Descriptor instead. func (*Callback_HSM) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21, 1} } func (x *Callback_HSM) GetNamespaceId() string { @@ -4602,7 +4674,7 @@ type CallbackInfo_WorkflowClosed struct { func (x *CallbackInfo_WorkflowClosed) Reset() { *x = CallbackInfo_WorkflowClosed{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[42] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4614,7 +4686,7 @@ func (x *CallbackInfo_WorkflowClosed) String() string { func (*CallbackInfo_WorkflowClosed) ProtoMessage() {} func (x *CallbackInfo_WorkflowClosed) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[42] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4627,7 +4699,7 @@ func (x *CallbackInfo_WorkflowClosed) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackInfo_WorkflowClosed.ProtoReflect.Descriptor instead. func (*CallbackInfo_WorkflowClosed) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23, 0} } type CallbackInfo_Trigger struct { @@ -4642,7 +4714,7 @@ type CallbackInfo_Trigger struct { func (x *CallbackInfo_Trigger) Reset() { *x = CallbackInfo_Trigger{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4654,7 +4726,7 @@ func (x *CallbackInfo_Trigger) String() string { func (*CallbackInfo_Trigger) ProtoMessage() {} func (x *CallbackInfo_Trigger) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4667,7 +4739,7 @@ func (x *CallbackInfo_Trigger) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackInfo_Trigger.ProtoReflect.Descriptor instead. func (*CallbackInfo_Trigger) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23, 1} } func (x *CallbackInfo_Trigger) GetVariant() isCallbackInfo_Trigger_Variant { @@ -4854,6 +4926,7 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "&ChildrenInitializedPostResetPointEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12H\n" + "\x05value\x18\x02 \x01(\v22.temporal.server.api.persistence.v1.ResetChildInfoR\x05value:\x028\x01B\x1c\n" + +<<<<<<< HEAD <<<<<<< HEAD "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"\x7f\n" + "\x19LastNotifiedTargetVersion\x12b\n" + @@ -4864,6 +4937,17 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\aenabled\x18\x01 \x01(\bR\aenabled\x12L\n" + "\x14skipped_time_offsets\x18\x04 \x03(\v2\x1a.google.protobuf.TimestampR\x12skippedTimeOffsets\"\x9d\x01\n" + >>>>>>> 286ac49dc (timeskipping-poc: control plane) +======= + "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"\x96\x01\n" + + "\x10TimeSkippingInfo\x12\x18\n" + + "\aenabled\x18\x01 \x01(\bR\aenabled\x12h\n" + + "\x14time_skipped_details\x18\x02 \x03(\v26.temporal.server.api.persistence.v1.TimeSkippedDetailsR\x12timeSkippedDetails\"\xef\x02\n" + + "\x12TimeSkippedDetails\x12Z\n" + + "\x1creal_time_point_when_skipped\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x18realTimePointWhenSkipped\x12`\n" + + "\x1fvirtual_time_point_when_skipped\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x1bvirtualTimePointWhenSkipped\x12D\n" + + "\x10duration_to_skip\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0edurationToSkip\x12U\n" + + "\x19target_virtual_time_point\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x16targetVirtualTimePoint\"\x9d\x01\n" + +>>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) "\x0eExecutionStats\x12!\n" + "\fhistory_size\x18\x01 \x01(\x03R\vhistorySize\x122\n" + "\x15external_payload_size\x18\x02 \x01(\x03R\x13externalPayloadSize\x124\n" + @@ -5198,7 +5282,7 @@ func file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP() []by return file_temporal_server_api_persistence_v1_executions_proto_rawDescData } -var file_temporal_server_api_persistence_v1_executions_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_temporal_server_api_persistence_v1_executions_proto_msgTypes = make([]protoimpl.MessageInfo, 45) var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*ShardInfo)(nil), // 0: temporal.server.api.persistence.v1.ShardInfo (*WorkflowExecutionInfo)(nil), // 1: temporal.server.api.persistence.v1.WorkflowExecutionInfo @@ -5206,6 +5290,7 @@ var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*LastNotifiedTargetVersion)(nil), // 2: temporal.server.api.persistence.v1.LastNotifiedTargetVersion ======= (*TimeSkippingInfo)(nil), // 2: temporal.server.api.persistence.v1.TimeSkippingInfo +<<<<<<< HEAD >>>>>>> 286ac49dc (timeskipping-poc: control plane) (*ExecutionStats)(nil), // 3: temporal.server.api.persistence.v1.ExecutionStats (*WorkflowExecutionState)(nil), // 4: temporal.server.api.persistence.v1.WorkflowExecutionState @@ -5284,6 +5369,84 @@ var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (v1.ChecksumFlavor)(0), // 76: temporal.server.api.enums.v1.ChecksumFlavor (*v13.Link)(nil), // 77: temporal.api.common.v1.Link (*v17.HistoryEvent)(nil), // 78: temporal.api.history.v1.HistoryEvent +======= + (*TimeSkippedDetails)(nil), // 3: temporal.server.api.persistence.v1.TimeSkippedDetails + (*ExecutionStats)(nil), // 4: temporal.server.api.persistence.v1.ExecutionStats + (*WorkflowExecutionState)(nil), // 5: temporal.server.api.persistence.v1.WorkflowExecutionState + (*RequestIDInfo)(nil), // 6: temporal.server.api.persistence.v1.RequestIDInfo + (*TransferTaskInfo)(nil), // 7: temporal.server.api.persistence.v1.TransferTaskInfo + (*ReplicationTaskInfo)(nil), // 8: temporal.server.api.persistence.v1.ReplicationTaskInfo + (*VisibilityTaskInfo)(nil), // 9: temporal.server.api.persistence.v1.VisibilityTaskInfo + (*TimerTaskInfo)(nil), // 10: temporal.server.api.persistence.v1.TimerTaskInfo + (*ArchivalTaskInfo)(nil), // 11: temporal.server.api.persistence.v1.ArchivalTaskInfo + (*OutboundTaskInfo)(nil), // 12: temporal.server.api.persistence.v1.OutboundTaskInfo + (*NexusInvocationTaskInfo)(nil), // 13: temporal.server.api.persistence.v1.NexusInvocationTaskInfo + (*NexusCancelationTaskInfo)(nil), // 14: temporal.server.api.persistence.v1.NexusCancelationTaskInfo + (*ActivityInfo)(nil), // 15: temporal.server.api.persistence.v1.ActivityInfo + (*TimerInfo)(nil), // 16: temporal.server.api.persistence.v1.TimerInfo + (*ChildExecutionInfo)(nil), // 17: temporal.server.api.persistence.v1.ChildExecutionInfo + (*RequestCancelInfo)(nil), // 18: temporal.server.api.persistence.v1.RequestCancelInfo + (*SignalInfo)(nil), // 19: temporal.server.api.persistence.v1.SignalInfo + (*Checksum)(nil), // 20: temporal.server.api.persistence.v1.Checksum + (*Callback)(nil), // 21: temporal.server.api.persistence.v1.Callback + (*HSMCompletionCallbackArg)(nil), // 22: temporal.server.api.persistence.v1.HSMCompletionCallbackArg + (*CallbackInfo)(nil), // 23: temporal.server.api.persistence.v1.CallbackInfo + (*NexusOperationInfo)(nil), // 24: temporal.server.api.persistence.v1.NexusOperationInfo + (*NexusOperationCancellationInfo)(nil), // 25: temporal.server.api.persistence.v1.NexusOperationCancellationInfo + (*ResetChildInfo)(nil), // 26: temporal.server.api.persistence.v1.ResetChildInfo + (*WorkflowPauseInfo)(nil), // 27: temporal.server.api.persistence.v1.WorkflowPauseInfo + nil, // 28: temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry + nil, // 29: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry + nil, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry + nil, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry + nil, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry + nil, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry + nil, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry + nil, // 35: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + (*TransferTaskInfo_CloseExecutionTaskDetails)(nil), // 36: temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + (*ActivityInfo_UseWorkflowBuildIdInfo)(nil), // 37: temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo + (*ActivityInfo_PauseInfo)(nil), // 38: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo + (*ActivityInfo_PauseInfo_Manual)(nil), // 39: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual + (*Callback_Nexus)(nil), // 40: temporal.server.api.persistence.v1.Callback.Nexus + (*Callback_HSM)(nil), // 41: temporal.server.api.persistence.v1.Callback.HSM + nil, // 42: temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry + (*CallbackInfo_WorkflowClosed)(nil), // 43: temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed + (*CallbackInfo_Trigger)(nil), // 44: temporal.server.api.persistence.v1.CallbackInfo.Trigger + (*timestamppb.Timestamp)(nil), // 45: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 46: google.protobuf.Duration + (v1.WorkflowTaskType)(0), // 47: temporal.server.api.enums.v1.WorkflowTaskType + (v11.SuggestContinueAsNewReason)(0), // 48: temporal.api.enums.v1.SuggestContinueAsNewReason + (*v12.ResetPoints)(nil), // 49: temporal.api.workflow.v1.ResetPoints + (*v14.VersionHistories)(nil), // 50: temporal.server.api.history.v1.VersionHistories + (*v15.VectorClock)(nil), // 51: temporal.server.api.clock.v1.VectorClock + (*v16.BaseExecutionInfo)(nil), // 52: temporal.server.api.workflow.v1.BaseExecutionInfo + (*v13.WorkerVersionStamp)(nil), // 53: temporal.api.common.v1.WorkerVersionStamp + (*VersionedTransition)(nil), // 54: temporal.server.api.persistence.v1.VersionedTransition + (*StateMachineTimerGroup)(nil), // 55: temporal.server.api.persistence.v1.StateMachineTimerGroup + (*StateMachineTombstoneBatch)(nil), // 56: temporal.server.api.persistence.v1.StateMachineTombstoneBatch + (*v12.WorkflowExecutionVersioningInfo)(nil), // 57: temporal.api.workflow.v1.WorkflowExecutionVersioningInfo + (*v13.Priority)(nil), // 58: temporal.api.common.v1.Priority + (v11.WorkflowTaskFailedCause)(0), // 59: temporal.api.enums.v1.WorkflowTaskFailedCause + (v11.TimeoutType)(0), // 60: temporal.api.enums.v1.TimeoutType + (v1.WorkflowExecutionState)(0), // 61: temporal.server.api.enums.v1.WorkflowExecutionState + (v11.WorkflowExecutionStatus)(0), // 62: temporal.api.enums.v1.WorkflowExecutionStatus + (v11.EventType)(0), // 63: temporal.api.enums.v1.EventType + (v1.TaskType)(0), // 64: temporal.server.api.enums.v1.TaskType + (*ChasmTaskInfo)(nil), // 65: temporal.server.api.persistence.v1.ChasmTaskInfo + (v1.TaskPriority)(0), // 66: temporal.server.api.enums.v1.TaskPriority + (*v14.VersionHistoryItem)(nil), // 67: temporal.server.api.history.v1.VersionHistoryItem + (v1.WorkflowBackoffType)(0), // 68: temporal.server.api.enums.v1.WorkflowBackoffType + (*StateMachineTaskInfo)(nil), // 69: temporal.server.api.persistence.v1.StateMachineTaskInfo + (*v17.Failure)(nil), // 70: temporal.api.failure.v1.Failure + (*v13.Payloads)(nil), // 71: temporal.api.common.v1.Payloads + (*v13.ActivityType)(nil), // 72: temporal.api.common.v1.ActivityType + (*v18.Deployment)(nil), // 73: temporal.api.deployment.v1.Deployment + (*v18.WorkerDeploymentVersion)(nil), // 74: temporal.api.deployment.v1.WorkerDeploymentVersion + (v11.ParentClosePolicy)(0), // 75: temporal.api.enums.v1.ParentClosePolicy + (v1.ChecksumFlavor)(0), // 76: temporal.server.api.enums.v1.ChecksumFlavor + (*v13.Link)(nil), // 77: temporal.api.common.v1.Link + (*v19.HistoryEvent)(nil), // 78: temporal.api.history.v1.HistoryEvent +>>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) (v1.CallbackState)(0), // 79: temporal.server.api.enums.v1.CallbackState (v1.NexusOperationState)(0), // 80: temporal.server.api.enums.v1.NexusOperationState (v11.NexusOperationCancellationState)(0), // 81: temporal.api.enums.v1.NexusOperationCancellationState @@ -5292,6 +5455,7 @@ var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*UpdateInfo)(nil), // 84: temporal.server.api.persistence.v1.UpdateInfo (*StateMachineMap)(nil), // 85: temporal.server.api.persistence.v1.StateMachineMap (*StateMachineRef)(nil), // 86: temporal.server.api.persistence.v1.StateMachineRef +<<<<<<< HEAD ======= (v1.WorkflowExecutionState)(0), // 60: temporal.server.api.enums.v1.WorkflowExecutionState (v11.WorkflowExecutionStatus)(0), // 61: temporal.api.enums.v1.WorkflowExecutionStatus @@ -5585,6 +5749,166 @@ var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ 147, // [147:147] is the sub-list for extension extendee 0, // [0:147] is the sub-list for field type_name >>>>>>> 286ac49dc (timeskipping-poc: control plane) +======= +} +var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ + 45, // 0: temporal.server.api.persistence.v1.ShardInfo.update_time:type_name -> google.protobuf.Timestamp + 28, // 1: temporal.server.api.persistence.v1.ShardInfo.replication_dlq_ack_level:type_name -> temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry + 29, // 2: temporal.server.api.persistence.v1.ShardInfo.queue_states:type_name -> temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry + 46, // 3: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_timeout:type_name -> google.protobuf.Duration + 46, // 4: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_timeout:type_name -> google.protobuf.Duration + 46, // 5: temporal.server.api.persistence.v1.WorkflowExecutionInfo.default_workflow_task_timeout:type_name -> google.protobuf.Duration + 45, // 6: temporal.server.api.persistence.v1.WorkflowExecutionInfo.start_time:type_name -> google.protobuf.Timestamp + 45, // 7: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_update_time:type_name -> google.protobuf.Timestamp + 46, // 8: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_timeout:type_name -> google.protobuf.Duration + 45, // 9: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_started_time:type_name -> google.protobuf.Timestamp + 45, // 10: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_scheduled_time:type_name -> google.protobuf.Timestamp + 45, // 11: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_original_scheduled_time:type_name -> google.protobuf.Timestamp + 47, // 12: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_type:type_name -> temporal.server.api.enums.v1.WorkflowTaskType + 48, // 13: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_suggest_continue_as_new_reasons:type_name -> temporal.api.enums.v1.SuggestContinueAsNewReason + 46, // 14: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sticky_schedule_to_start_timeout:type_name -> google.protobuf.Duration + 46, // 15: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_initial_interval:type_name -> google.protobuf.Duration + 46, // 16: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_maximum_interval:type_name -> google.protobuf.Duration + 45, // 17: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_expiration_time:type_name -> google.protobuf.Timestamp + 49, // 18: temporal.server.api.persistence.v1.WorkflowExecutionInfo.auto_reset_points:type_name -> temporal.api.workflow.v1.ResetPoints + 30, // 19: temporal.server.api.persistence.v1.WorkflowExecutionInfo.search_attributes:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry + 31, // 20: temporal.server.api.persistence.v1.WorkflowExecutionInfo.memo:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry + 50, // 21: temporal.server.api.persistence.v1.WorkflowExecutionInfo.version_histories:type_name -> temporal.server.api.history.v1.VersionHistories + 4, // 22: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_stats:type_name -> temporal.server.api.persistence.v1.ExecutionStats + 45, // 23: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_expiration_time:type_name -> google.protobuf.Timestamp + 45, // 24: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_time:type_name -> google.protobuf.Timestamp + 51, // 25: temporal.server.api.persistence.v1.WorkflowExecutionInfo.parent_clock:type_name -> temporal.server.api.clock.v1.VectorClock + 45, // 26: temporal.server.api.persistence.v1.WorkflowExecutionInfo.close_time:type_name -> google.protobuf.Timestamp + 52, // 27: temporal.server.api.persistence.v1.WorkflowExecutionInfo.base_execution_info:type_name -> temporal.server.api.workflow.v1.BaseExecutionInfo + 53, // 28: temporal.server.api.persistence.v1.WorkflowExecutionInfo.most_recent_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp + 32, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.update_infos:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry + 54, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 33, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machines_by_type:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry + 55, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.state_machine_timers:type_name -> temporal.server.api.persistence.v1.StateMachineTimerGroup + 54, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 54, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.visibility_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 54, // 35: temporal.server.api.persistence.v1.WorkflowExecutionInfo.signal_request_ids_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 56, // 36: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machine_tombstone_batches:type_name -> temporal.server.api.persistence.v1.StateMachineTombstoneBatch + 57, // 37: temporal.server.api.persistence.v1.WorkflowExecutionInfo.versioning_info:type_name -> temporal.api.workflow.v1.WorkflowExecutionVersioningInfo + 54, // 38: temporal.server.api.persistence.v1.WorkflowExecutionInfo.previous_transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 54, // 39: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_transition_history_break_point:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 34, // 40: temporal.server.api.persistence.v1.WorkflowExecutionInfo.children_initialized_post_reset_point:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry + 58, // 41: temporal.server.api.persistence.v1.WorkflowExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority + 27, // 42: temporal.server.api.persistence.v1.WorkflowExecutionInfo.pause_info:type_name -> temporal.server.api.persistence.v1.WorkflowPauseInfo + 59, // 43: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_failure_cause:type_name -> temporal.api.enums.v1.WorkflowTaskFailedCause + 60, // 44: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_timed_out_type:type_name -> temporal.api.enums.v1.TimeoutType + 2, // 45: temporal.server.api.persistence.v1.WorkflowExecutionInfo.time_skipping_info:type_name -> temporal.server.api.persistence.v1.TimeSkippingInfo + 3, // 46: temporal.server.api.persistence.v1.TimeSkippingInfo.time_skipped_details:type_name -> temporal.server.api.persistence.v1.TimeSkippedDetails + 45, // 47: temporal.server.api.persistence.v1.TimeSkippedDetails.real_time_point_when_skipped:type_name -> google.protobuf.Timestamp + 45, // 48: temporal.server.api.persistence.v1.TimeSkippedDetails.virtual_time_point_when_skipped:type_name -> google.protobuf.Timestamp + 45, // 49: temporal.server.api.persistence.v1.TimeSkippedDetails.duration_to_skip:type_name -> google.protobuf.Timestamp + 45, // 50: temporal.server.api.persistence.v1.TimeSkippedDetails.target_virtual_time_point:type_name -> google.protobuf.Timestamp + 61, // 51: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState + 62, // 52: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus + 54, // 53: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 45, // 54: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp + 35, // 55: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + 63, // 56: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType + 64, // 57: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 45, // 58: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 36, // 59: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + 65, // 60: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 64, // 61: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 45, // 62: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 66, // 63: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority + 54, // 64: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 8, // 65: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo + 67, // 66: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem + 64, // 67: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 45, // 68: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 45, // 69: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp + 65, // 70: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 64, // 71: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 60, // 72: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType + 68, // 73: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType + 45, // 74: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 65, // 75: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 64, // 76: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 45, // 77: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 64, // 78: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 45, // 79: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 69, // 80: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo + 65, // 81: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 45, // 82: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 45, // 83: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp + 46, // 84: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 46, // 85: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 46, // 86: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 46, // 87: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration + 46, // 88: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration + 46, // 89: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration + 45, // 90: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp + 70, // 91: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure + 71, // 92: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads + 45, // 93: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp + 72, // 94: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType + 37, // 95: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo + 53, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp + 54, // 97: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 45, // 98: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp + 45, // 99: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 100: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment + 74, // 101: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion + 58, // 102: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority + 38, // 103: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo + 45, // 104: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp + 54, // 105: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 75, // 106: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy + 51, // 107: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock + 54, // 108: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 58, // 109: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority + 54, // 110: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 54, // 111: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 76, // 112: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor + 40, // 113: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus + 41, // 114: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM + 77, // 115: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link + 78, // 116: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent + 21, // 117: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback + 44, // 118: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger + 45, // 119: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp + 79, // 120: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState + 45, // 121: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 70, // 122: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 45, // 123: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 46, // 124: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 45, // 125: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 80, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState + 45, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 70, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 45, // 129: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 46, // 130: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 46, // 131: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 45, // 132: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp + 45, // 133: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp + 81, // 134: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState + 45, // 135: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 70, // 136: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 45, // 137: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 45, // 138: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 82, // 139: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState + 83, // 140: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload + 83, // 141: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload + 84, // 142: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo + 85, // 143: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap + 26, // 144: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo + 6, // 145: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo + 45, // 146: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 39, // 147: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual + 42, // 148: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry + 86, // 149: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef + 43, // 150: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed + 151, // [151:151] is the sub-list for method output_type + 151, // [151:151] is the sub-list for method input_type + 151, // [151:151] is the sub-list for extension type_name + 151, // [151:151] is the sub-list for extension extendee + 0, // [0:151] is the sub-list for field type_name +>>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) } func init() { file_temporal_server_api_persistence_v1_executions_proto_init() } @@ -5600,33 +5924,33 @@ func file_temporal_server_api_persistence_v1_executions_proto_init() { (*WorkflowExecutionInfo_LastWorkflowTaskFailureCause)(nil), (*WorkflowExecutionInfo_LastWorkflowTaskTimedOutType)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7].OneofWrappers = []any{ (*TransferTaskInfo_CloseExecutionTaskDetails_)(nil), (*TransferTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9].OneofWrappers = []any{ (*VisibilityTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10].OneofWrappers = []any{ (*TimerTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12].OneofWrappers = []any{ (*OutboundTaskInfo_StateMachineInfo)(nil), (*OutboundTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15].OneofWrappers = []any{ (*ActivityInfo_UseWorkflowBuildIdInfo_)(nil), (*ActivityInfo_LastIndependentlyAssignedBuildId)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21].OneofWrappers = []any{ (*Callback_Nexus_)(nil), (*Callback_Hsm)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38].OneofWrappers = []any{ (*ActivityInfo_PauseInfo_Manual_)(nil), (*ActivityInfo_PauseInfo_RuleId)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44].OneofWrappers = []any{ (*CallbackInfo_Trigger_WorkflowClosed)(nil), } type x struct{} @@ -5635,7 +5959,7 @@ func file_temporal_server_api_persistence_v1_executions_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_api_persistence_v1_executions_proto_rawDesc), len(file_temporal_server_api_persistence_v1_executions_proto_rawDesc)), NumEnums: 0, - NumMessages: 44, + NumMessages: 45, NumExtensions: 0, NumServices: 0, }, diff --git a/chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go b/chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go deleted file mode 100644 index a765e20868..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go +++ /dev/null @@ -1,292 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package activitypb - -import ( - "fmt" - - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type ActivityState to the protobuf v3 wire format -func (val *ActivityState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityState from the protobuf v3 wire format -func (val *ActivityState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityState - switch t := that.(type) { - case *ActivityState: - that1 = t - case ActivityState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ActivityCancelState to the protobuf v3 wire format -func (val *ActivityCancelState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityCancelState from the protobuf v3 wire format -func (val *ActivityCancelState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityCancelState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityCancelState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityCancelState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityCancelState - switch t := that.(type) { - case *ActivityCancelState: - that1 = t - case ActivityCancelState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ActivityTerminateState to the protobuf v3 wire format -func (val *ActivityTerminateState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityTerminateState from the protobuf v3 wire format -func (val *ActivityTerminateState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityTerminateState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityTerminateState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityTerminateState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityTerminateState - switch t := that.(type) { - case *ActivityTerminateState: - that1 = t - case ActivityTerminateState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ActivityAttemptState to the protobuf v3 wire format -func (val *ActivityAttemptState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityAttemptState from the protobuf v3 wire format -func (val *ActivityAttemptState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityAttemptState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityAttemptState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityAttemptState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityAttemptState - switch t := that.(type) { - case *ActivityAttemptState: - that1 = t - case ActivityAttemptState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ActivityHeartbeatState to the protobuf v3 wire format -func (val *ActivityHeartbeatState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityHeartbeatState from the protobuf v3 wire format -func (val *ActivityHeartbeatState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityHeartbeatState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityHeartbeatState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityHeartbeatState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityHeartbeatState - switch t := that.(type) { - case *ActivityHeartbeatState: - that1 = t - case ActivityHeartbeatState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ActivityRequestData to the protobuf v3 wire format -func (val *ActivityRequestData) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityRequestData from the protobuf v3 wire format -func (val *ActivityRequestData) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityRequestData) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityRequestData values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityRequestData) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityRequestData - switch t := that.(type) { - case *ActivityRequestData: - that1 = t - case ActivityRequestData: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ActivityOutcome to the protobuf v3 wire format -func (val *ActivityOutcome) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityOutcome from the protobuf v3 wire format -func (val *ActivityOutcome) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityOutcome) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityOutcome values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityOutcome) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityOutcome - switch t := that.(type) { - case *ActivityOutcome: - that1 = t - case ActivityOutcome: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -var ( - ActivityExecutionStatus_shorthandValue = map[string]int32{ - "Unspecified": 0, - "Scheduled": 1, - "Started": 2, - "CancelRequested": 3, - "Completed": 4, - "Failed": 5, - "Canceled": 6, - "Terminated": 7, - "TimedOut": 8, - } -) - -// ActivityExecutionStatusFromString parses a ActivityExecutionStatus value from either the protojson -// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to ActivityExecutionStatus -func ActivityExecutionStatusFromString(s string) (ActivityExecutionStatus, error) { - if v, ok := ActivityExecutionStatus_value[s]; ok { - return ActivityExecutionStatus(v), nil - } else if v, ok := ActivityExecutionStatus_shorthandValue[s]; ok { - return ActivityExecutionStatus(v), nil - } - return ActivityExecutionStatus(0), fmt.Errorf("%s is not a valid ActivityExecutionStatus", s) -} diff --git a/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go b/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go deleted file mode 100644 index 4b0d3ea9e6..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go +++ /dev/null @@ -1,1061 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/activity/proto/v1/activity_state.proto - -package activitypb - -import ( - reflect "reflect" - "strconv" - sync "sync" - unsafe "unsafe" - - v1 "go.temporal.io/api/common/v1" - v12 "go.temporal.io/api/deployment/v1" - v14 "go.temporal.io/api/failure/v1" - v13 "go.temporal.io/api/sdk/v1" - v11 "go.temporal.io/api/taskqueue/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ActivityExecutionStatus int32 - -const ( - ACTIVITY_EXECUTION_STATUS_UNSPECIFIED ActivityExecutionStatus = 0 - // The activity has been scheduled, but a worker has not accepted the task for the current - // attempt. The activity may be backing off between attempts or waiting for a worker to pick it - // up. - ACTIVITY_EXECUTION_STATUS_SCHEDULED ActivityExecutionStatus = 1 - // A worker has accepted a task for the current attempt. - ACTIVITY_EXECUTION_STATUS_STARTED ActivityExecutionStatus = 2 - // A caller has requested cancellation of the activity. - ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED ActivityExecutionStatus = 3 - // The activity completed successfully. - ACTIVITY_EXECUTION_STATUS_COMPLETED ActivityExecutionStatus = 4 - // The activity completed with failure. - ACTIVITY_EXECUTION_STATUS_FAILED ActivityExecutionStatus = 5 - // The activity completed as canceled. - // Requesting to cancel an activity does not automatically transition the activity to canceled status. If the worker - // responds to cancel the activity after requesting cancellation, the status will transition to cancelled. If the - // activity completes, fails, times out or terminates after cancel is requested and before the worker responds with - // cancelled. The activity will be stay in the terminal non-cancelled status. - ACTIVITY_EXECUTION_STATUS_CANCELED ActivityExecutionStatus = 6 - // The activity was terminated. Termination does not reach the worker and the activity code cannot react to it. - // A terminated activity may have a running attempt and will be requested to be canceled by the server when it - // heartbeats. - ACTIVITY_EXECUTION_STATUS_TERMINATED ActivityExecutionStatus = 7 - // The activity has timed out by reaching the specified schedule-to-start or schedule-to-close timeouts. - // Additionally, after all retries are exhausted for start-to-close or heartbeat timeouts, the activity will also - // transition to timed out status. - ACTIVITY_EXECUTION_STATUS_TIMED_OUT ActivityExecutionStatus = 8 -) - -// Enum value maps for ActivityExecutionStatus. -var ( - ActivityExecutionStatus_name = map[int32]string{ - 0: "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED", - 1: "ACTIVITY_EXECUTION_STATUS_SCHEDULED", - 2: "ACTIVITY_EXECUTION_STATUS_STARTED", - 3: "ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED", - 4: "ACTIVITY_EXECUTION_STATUS_COMPLETED", - 5: "ACTIVITY_EXECUTION_STATUS_FAILED", - 6: "ACTIVITY_EXECUTION_STATUS_CANCELED", - 7: "ACTIVITY_EXECUTION_STATUS_TERMINATED", - 8: "ACTIVITY_EXECUTION_STATUS_TIMED_OUT", - } - ActivityExecutionStatus_value = map[string]int32{ - "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED": 0, - "ACTIVITY_EXECUTION_STATUS_SCHEDULED": 1, - "ACTIVITY_EXECUTION_STATUS_STARTED": 2, - "ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED": 3, - "ACTIVITY_EXECUTION_STATUS_COMPLETED": 4, - "ACTIVITY_EXECUTION_STATUS_FAILED": 5, - "ACTIVITY_EXECUTION_STATUS_CANCELED": 6, - "ACTIVITY_EXECUTION_STATUS_TERMINATED": 7, - "ACTIVITY_EXECUTION_STATUS_TIMED_OUT": 8, - } -) - -func (x ActivityExecutionStatus) Enum() *ActivityExecutionStatus { - p := new(ActivityExecutionStatus) - *p = x - return p -} - -func (x ActivityExecutionStatus) String() string { - switch x { - case ACTIVITY_EXECUTION_STATUS_UNSPECIFIED: - return "Unspecified" - case ACTIVITY_EXECUTION_STATUS_SCHEDULED: - return "Scheduled" - case ACTIVITY_EXECUTION_STATUS_STARTED: - return "Started" - case ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED: - return "CancelRequested" - case ACTIVITY_EXECUTION_STATUS_COMPLETED: - return "Completed" - case ACTIVITY_EXECUTION_STATUS_FAILED: - return "Failed" - case ACTIVITY_EXECUTION_STATUS_CANCELED: - return "Canceled" - case ACTIVITY_EXECUTION_STATUS_TERMINATED: - return "Terminated" - case ACTIVITY_EXECUTION_STATUS_TIMED_OUT: - return "TimedOut" - - // Deprecated: Use ActivityExecutionStatus.Descriptor instead. - default: - return strconv.Itoa(int(x)) - } - -} - -func (ActivityExecutionStatus) Descriptor() protoreflect.EnumDescriptor { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes[0].Descriptor() -} - -func (ActivityExecutionStatus) Type() protoreflect.EnumType { - return &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes[0] -} - -func (x ActivityExecutionStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -func (ActivityExecutionStatus) EnumDescriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{0} -} - -type ActivityState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The type of the activity, a string that maps to a registered activity on a worker. - ActivityType *v1.ActivityType `protobuf:"bytes,1,opt,name=activity_type,json=activityType,proto3" json:"activity_type,omitempty"` - TaskQueue *v11.TaskQueue `protobuf:"bytes,2,opt,name=task_queue,json=taskQueue,proto3" json:"task_queue,omitempty"` - // Indicates how long the caller is willing to wait for an activity completion. Limits how long - // retries will be attempted. Either this or `start_to_close_timeout` must be specified. - // - // (-- api-linter: core::0140::prepositions=disabled - // - // aip.dev/not-precedent: "to" is used to indicate interval. --) - ScheduleToCloseTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=schedule_to_close_timeout,json=scheduleToCloseTimeout,proto3" json:"schedule_to_close_timeout,omitempty"` - // Limits time an activity task can stay in a task queue before a worker picks it up. This - // timeout is always non retryable, as all a retry would achieve is to put it back into the same - // queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not - // specified. - // - // (-- api-linter: core::0140::prepositions=disabled - // - // aip.dev/not-precedent: "to" is used to indicate interval. --) - ScheduleToStartTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=schedule_to_start_timeout,json=scheduleToStartTimeout,proto3" json:"schedule_to_start_timeout,omitempty"` - // Maximum time an activity is allowed to execute after being picked up by a worker. This - // timeout is always retryable. Either this or `schedule_to_close_timeout` must be - // specified. - // - // (-- api-linter: core::0140::prepositions=disabled - // - // aip.dev/not-precedent: "to" is used to indicate interval. --) - StartToCloseTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=start_to_close_timeout,json=startToCloseTimeout,proto3" json:"start_to_close_timeout,omitempty"` - // Maximum permitted time between successful worker heartbeats. - HeartbeatTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=heartbeat_timeout,json=heartbeatTimeout,proto3" json:"heartbeat_timeout,omitempty"` - // The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. - RetryPolicy *v1.RetryPolicy `protobuf:"bytes,7,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` - // All of the possible activity statuses (covers both the public ActivityExecutionStatus and PendingActivityState). - // TODO: consider moving this into ActivityAttemptState and renaming that message. This could save mutating two - // components on each attempt transition. - Status ActivityExecutionStatus `protobuf:"varint,8,opt,name=status,proto3,enum=temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatus" json:"status,omitempty"` - // Time the activity was originally scheduled via a StartActivityExecution request. - ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` - // Priority metadata. - Priority *v1.Priority `protobuf:"bytes,10,opt,name=priority,proto3" json:"priority,omitempty"` - // Set if activity cancellation was requested. - CancelState *ActivityCancelState `protobuf:"bytes,11,opt,name=cancel_state,json=cancelState,proto3" json:"cancel_state,omitempty"` - // Set if the activity was terminated - TerminateState *ActivityTerminateState `protobuf:"bytes,12,opt,name=terminate_state,json=terminateState,proto3" json:"terminate_state,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityState) Reset() { - *x = ActivityState{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityState) ProtoMessage() {} - -func (x *ActivityState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityState.ProtoReflect.Descriptor instead. -func (*ActivityState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{0} -} - -func (x *ActivityState) GetActivityType() *v1.ActivityType { - if x != nil { - return x.ActivityType - } - return nil -} - -func (x *ActivityState) GetTaskQueue() *v11.TaskQueue { - if x != nil { - return x.TaskQueue - } - return nil -} - -func (x *ActivityState) GetScheduleToCloseTimeout() *durationpb.Duration { - if x != nil { - return x.ScheduleToCloseTimeout - } - return nil -} - -func (x *ActivityState) GetScheduleToStartTimeout() *durationpb.Duration { - if x != nil { - return x.ScheduleToStartTimeout - } - return nil -} - -func (x *ActivityState) GetStartToCloseTimeout() *durationpb.Duration { - if x != nil { - return x.StartToCloseTimeout - } - return nil -} - -func (x *ActivityState) GetHeartbeatTimeout() *durationpb.Duration { - if x != nil { - return x.HeartbeatTimeout - } - return nil -} - -func (x *ActivityState) GetRetryPolicy() *v1.RetryPolicy { - if x != nil { - return x.RetryPolicy - } - return nil -} - -func (x *ActivityState) GetStatus() ActivityExecutionStatus { - if x != nil { - return x.Status - } - return ACTIVITY_EXECUTION_STATUS_UNSPECIFIED -} - -func (x *ActivityState) GetScheduleTime() *timestamppb.Timestamp { - if x != nil { - return x.ScheduleTime - } - return nil -} - -func (x *ActivityState) GetPriority() *v1.Priority { - if x != nil { - return x.Priority - } - return nil -} - -func (x *ActivityState) GetCancelState() *ActivityCancelState { - if x != nil { - return x.CancelState - } - return nil -} - -func (x *ActivityState) GetTerminateState() *ActivityTerminateState { - if x != nil { - return x.TerminateState - } - return nil -} - -type ActivityCancelState struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - RequestTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=request_time,json=requestTime,proto3" json:"request_time,omitempty"` - Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` - Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityCancelState) Reset() { - *x = ActivityCancelState{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityCancelState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityCancelState) ProtoMessage() {} - -func (x *ActivityCancelState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityCancelState.ProtoReflect.Descriptor instead. -func (*ActivityCancelState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{1} -} - -func (x *ActivityCancelState) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *ActivityCancelState) GetRequestTime() *timestamppb.Timestamp { - if x != nil { - return x.RequestTime - } - return nil -} - -func (x *ActivityCancelState) GetIdentity() string { - if x != nil { - return x.Identity - } - return "" -} - -func (x *ActivityCancelState) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -type ActivityTerminateState struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityTerminateState) Reset() { - *x = ActivityTerminateState{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityTerminateState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityTerminateState) ProtoMessage() {} - -func (x *ActivityTerminateState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityTerminateState.ProtoReflect.Descriptor instead. -func (*ActivityTerminateState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{2} -} - -func (x *ActivityTerminateState) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -type ActivityAttemptState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The attempt this activity is currently on. - // Incremented each time a new attempt is scheduled. A newly created activity will immediately be scheduled, and - // the count is set to 1. - Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` - // Time from the last attempt failure to the next activity retry. - // If the activity is currently running, this represents the next retry interval in case the attempt fails. - // If activity is currently backing off between attempt, this represents the current retry interval. - // If there is no next retry allowed, this field will be null. - // This interval is typically calculated from the specified retry policy, but may be modified if an activity fails - // with a retryable application failure specifying a retry delay. - CurrentRetryInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=current_retry_interval,json=currentRetryInterval,proto3" json:"current_retry_interval,omitempty"` - // Time the last attempt was started. - StartedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_time,json=startedTime,proto3" json:"started_time,omitempty"` - // The time when the last activity attempt completed. If activity has not been completed yet, it will be null. - CompleteTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=complete_time,json=completeTime,proto3" json:"complete_time,omitempty"` - // Details about the last failure. This will only be updated when an activity attempt fails, - // including start-to-close timeout. Activity success, termination, schedule-to-start and schedule-to-close timeouts - // will not reset it. - LastFailureDetails *ActivityAttemptState_LastFailureDetails `protobuf:"bytes,5,opt,name=last_failure_details,json=lastFailureDetails,proto3" json:"last_failure_details,omitempty"` - // An incremental version number used to validate tasks. - // Initially this only verifies that a task belong to the current attempt. - // Later on this stamp will be used to also invalidate tasks when the activity is paused, reset, or has its options - // updated. - Stamp int32 `protobuf:"varint,6,opt,name=stamp,proto3" json:"stamp,omitempty"` - LastWorkerIdentity string `protobuf:"bytes,7,opt,name=last_worker_identity,json=lastWorkerIdentity,proto3" json:"last_worker_identity,omitempty"` - // The Worker Deployment Version this activity was dispatched to most recently. - // If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. - LastDeploymentVersion *v12.WorkerDeploymentVersion `protobuf:"bytes,8,opt,name=last_deployment_version,json=lastDeploymentVersion,proto3" json:"last_deployment_version,omitempty"` - // The request ID that came from matching's RecordActivityTaskStarted API call. Used to make this API idempotent in - // case of implicit retries. - StartRequestId string `protobuf:"bytes,9,opt,name=start_request_id,json=startRequestId,proto3" json:"start_request_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityAttemptState) Reset() { - *x = ActivityAttemptState{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityAttemptState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityAttemptState) ProtoMessage() {} - -func (x *ActivityAttemptState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityAttemptState.ProtoReflect.Descriptor instead. -func (*ActivityAttemptState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{3} -} - -func (x *ActivityAttemptState) GetCount() int32 { - if x != nil { - return x.Count - } - return 0 -} - -func (x *ActivityAttemptState) GetCurrentRetryInterval() *durationpb.Duration { - if x != nil { - return x.CurrentRetryInterval - } - return nil -} - -func (x *ActivityAttemptState) GetStartedTime() *timestamppb.Timestamp { - if x != nil { - return x.StartedTime - } - return nil -} - -func (x *ActivityAttemptState) GetCompleteTime() *timestamppb.Timestamp { - if x != nil { - return x.CompleteTime - } - return nil -} - -func (x *ActivityAttemptState) GetLastFailureDetails() *ActivityAttemptState_LastFailureDetails { - if x != nil { - return x.LastFailureDetails - } - return nil -} - -func (x *ActivityAttemptState) GetStamp() int32 { - if x != nil { - return x.Stamp - } - return 0 -} - -func (x *ActivityAttemptState) GetLastWorkerIdentity() string { - if x != nil { - return x.LastWorkerIdentity - } - return "" -} - -func (x *ActivityAttemptState) GetLastDeploymentVersion() *v12.WorkerDeploymentVersion { - if x != nil { - return x.LastDeploymentVersion - } - return nil -} - -func (x *ActivityAttemptState) GetStartRequestId() string { - if x != nil { - return x.StartRequestId - } - return "" -} - -type ActivityHeartbeatState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Details provided in the last recorded activity heartbeat. - Details *v1.Payloads `protobuf:"bytes,1,opt,name=details,proto3" json:"details,omitempty"` - // Time the last heartbeat was recorded. - RecordedTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=recorded_time,json=recordedTime,proto3" json:"recorded_time,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityHeartbeatState) Reset() { - *x = ActivityHeartbeatState{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityHeartbeatState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityHeartbeatState) ProtoMessage() {} - -func (x *ActivityHeartbeatState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityHeartbeatState.ProtoReflect.Descriptor instead. -func (*ActivityHeartbeatState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{4} -} - -func (x *ActivityHeartbeatState) GetDetails() *v1.Payloads { - if x != nil { - return x.Details - } - return nil -} - -func (x *ActivityHeartbeatState) GetRecordedTime() *timestamppb.Timestamp { - if x != nil { - return x.RecordedTime - } - return nil -} - -type ActivityRequestData struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Serialized activity input, passed as arguments to the activity function. - Input *v1.Payloads `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` - Header *v1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` - // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. - UserMetadata *v13.UserMetadata `protobuf:"bytes,3,opt,name=user_metadata,json=userMetadata,proto3" json:"user_metadata,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityRequestData) Reset() { - *x = ActivityRequestData{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityRequestData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityRequestData) ProtoMessage() {} - -func (x *ActivityRequestData) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityRequestData.ProtoReflect.Descriptor instead. -func (*ActivityRequestData) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{5} -} - -func (x *ActivityRequestData) GetInput() *v1.Payloads { - if x != nil { - return x.Input - } - return nil -} - -func (x *ActivityRequestData) GetHeader() *v1.Header { - if x != nil { - return x.Header - } - return nil -} - -func (x *ActivityRequestData) GetUserMetadata() *v13.UserMetadata { - if x != nil { - return x.UserMetadata - } - return nil -} - -type ActivityOutcome struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Variant: - // - // *ActivityOutcome_Successful_ - // *ActivityOutcome_Failed_ - Variant isActivityOutcome_Variant `protobuf_oneof:"variant"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityOutcome) Reset() { - *x = ActivityOutcome{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityOutcome) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityOutcome) ProtoMessage() {} - -func (x *ActivityOutcome) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityOutcome.ProtoReflect.Descriptor instead. -func (*ActivityOutcome) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{6} -} - -func (x *ActivityOutcome) GetVariant() isActivityOutcome_Variant { - if x != nil { - return x.Variant - } - return nil -} - -func (x *ActivityOutcome) GetSuccessful() *ActivityOutcome_Successful { - if x != nil { - if x, ok := x.Variant.(*ActivityOutcome_Successful_); ok { - return x.Successful - } - } - return nil -} - -func (x *ActivityOutcome) GetFailed() *ActivityOutcome_Failed { - if x != nil { - if x, ok := x.Variant.(*ActivityOutcome_Failed_); ok { - return x.Failed - } - } - return nil -} - -type isActivityOutcome_Variant interface { - isActivityOutcome_Variant() -} - -type ActivityOutcome_Successful_ struct { - Successful *ActivityOutcome_Successful `protobuf:"bytes,1,opt,name=successful,proto3,oneof"` -} - -type ActivityOutcome_Failed_ struct { - Failed *ActivityOutcome_Failed `protobuf:"bytes,2,opt,name=failed,proto3,oneof"` -} - -func (*ActivityOutcome_Successful_) isActivityOutcome_Variant() {} - -func (*ActivityOutcome_Failed_) isActivityOutcome_Variant() {} - -type ActivityAttemptState_LastFailureDetails struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The last time the activity attempt failed. - Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` - // Failure details from the last failed attempt. - Failure *v14.Failure `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityAttemptState_LastFailureDetails) Reset() { - *x = ActivityAttemptState_LastFailureDetails{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityAttemptState_LastFailureDetails) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityAttemptState_LastFailureDetails) ProtoMessage() {} - -func (x *ActivityAttemptState_LastFailureDetails) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityAttemptState_LastFailureDetails.ProtoReflect.Descriptor instead. -func (*ActivityAttemptState_LastFailureDetails) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *ActivityAttemptState_LastFailureDetails) GetTime() *timestamppb.Timestamp { - if x != nil { - return x.Time - } - return nil -} - -func (x *ActivityAttemptState_LastFailureDetails) GetFailure() *v14.Failure { - if x != nil { - return x.Failure - } - return nil -} - -type ActivityOutcome_Successful struct { - state protoimpl.MessageState `protogen:"open.v1"` - Output *v1.Payloads `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityOutcome_Successful) Reset() { - *x = ActivityOutcome_Successful{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityOutcome_Successful) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityOutcome_Successful) ProtoMessage() {} - -func (x *ActivityOutcome_Successful) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityOutcome_Successful.ProtoReflect.Descriptor instead. -func (*ActivityOutcome_Successful) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{6, 0} -} - -func (x *ActivityOutcome_Successful) GetOutput() *v1.Payloads { - if x != nil { - return x.Output - } - return nil -} - -type ActivityOutcome_Failed struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Only filled on schedule-to-start timeouts, schedule-to-close timeouts or terminations. All other attempt - // failures will be recorded in ActivityAttemptState.last_failure_details. - Failure *v14.Failure `protobuf:"bytes,1,opt,name=failure,proto3" json:"failure,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityOutcome_Failed) Reset() { - *x = ActivityOutcome_Failed{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityOutcome_Failed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityOutcome_Failed) ProtoMessage() {} - -func (x *ActivityOutcome_Failed) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityOutcome_Failed.ProtoReflect.Descriptor instead. -func (*ActivityOutcome_Failed) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{6, 1} -} - -func (x *ActivityOutcome_Failed) GetFailure() *v14.Failure { - if x != nil { - return x.Failure - } - return nil -} - -var File_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc = "" + - "\n" + - "@temporal/server/chasm/lib/activity/proto/v1/activity_state.proto\x12+temporal.server.chasm.lib.activity.proto.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a'temporal/api/sdk/v1/user_metadata.proto\x1a'temporal/api/taskqueue/v1/message.proto\"\xdb\a\n" + - "\rActivityState\x12I\n" + - "\ractivity_type\x18\x01 \x01(\v2$.temporal.api.common.v1.ActivityTypeR\factivityType\x12C\n" + - "\n" + - "task_queue\x18\x02 \x01(\v2$.temporal.api.taskqueue.v1.TaskQueueR\ttaskQueue\x12T\n" + - "\x19schedule_to_close_timeout\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x16scheduleToCloseTimeout\x12T\n" + - "\x19schedule_to_start_timeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x16scheduleToStartTimeout\x12N\n" + - "\x16start_to_close_timeout\x18\x05 \x01(\v2\x19.google.protobuf.DurationR\x13startToCloseTimeout\x12F\n" + - "\x11heartbeat_timeout\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x10heartbeatTimeout\x12F\n" + - "\fretry_policy\x18\a \x01(\v2#.temporal.api.common.v1.RetryPolicyR\vretryPolicy\x12\\\n" + - "\x06status\x18\b \x01(\x0e2D.temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatusR\x06status\x12?\n" + - "\rschedule_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\fscheduleTime\x12<\n" + - "\bpriority\x18\n" + - " \x01(\v2 .temporal.api.common.v1.PriorityR\bpriority\x12c\n" + - "\fcancel_state\x18\v \x01(\v2@.temporal.server.chasm.lib.activity.proto.v1.ActivityCancelStateR\vcancelState\x12l\n" + - "\x0fterminate_state\x18\f \x01(\v2C.temporal.server.chasm.lib.activity.proto.v1.ActivityTerminateStateR\x0eterminateState\"\xa7\x01\n" + - "\x13ActivityCancelState\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\tR\trequestId\x12=\n" + - "\frequest_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\vrequestTime\x12\x1a\n" + - "\bidentity\x18\x03 \x01(\tR\bidentity\x12\x16\n" + - "\x06reason\x18\x04 \x01(\tR\x06reason\"7\n" + - "\x16ActivityTerminateState\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\tR\trequestId\"\xe8\x05\n" + - "\x14ActivityAttemptState\x12\x14\n" + - "\x05count\x18\x01 \x01(\x05R\x05count\x12O\n" + - "\x16current_retry_interval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x14currentRetryInterval\x12=\n" + - "\fstarted_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\vstartedTime\x12?\n" + - "\rcomplete_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\fcompleteTime\x12\x86\x01\n" + - "\x14last_failure_details\x18\x05 \x01(\v2T.temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetailsR\x12lastFailureDetails\x12\x14\n" + - "\x05stamp\x18\x06 \x01(\x05R\x05stamp\x120\n" + - "\x14last_worker_identity\x18\a \x01(\tR\x12lastWorkerIdentity\x12k\n" + - "\x17last_deployment_version\x18\b \x01(\v23.temporal.api.deployment.v1.WorkerDeploymentVersionR\x15lastDeploymentVersion\x12(\n" + - "\x10start_request_id\x18\t \x01(\tR\x0estartRequestId\x1a\x80\x01\n" + - "\x12LastFailureDetails\x12.\n" + - "\x04time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\x12:\n" + - "\afailure\x18\x02 \x01(\v2 .temporal.api.failure.v1.FailureR\afailure\"\x95\x01\n" + - "\x16ActivityHeartbeatState\x12:\n" + - "\adetails\x18\x01 \x01(\v2 .temporal.api.common.v1.PayloadsR\adetails\x12?\n" + - "\rrecorded_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\frecordedTime\"\xcd\x01\n" + - "\x13ActivityRequestData\x126\n" + - "\x05input\x18\x01 \x01(\v2 .temporal.api.common.v1.PayloadsR\x05input\x126\n" + - "\x06header\x18\x02 \x01(\v2\x1e.temporal.api.common.v1.HeaderR\x06header\x12F\n" + - "\ruser_metadata\x18\x03 \x01(\v2!.temporal.api.sdk.v1.UserMetadataR\fuserMetadata\"\xf4\x02\n" + - "\x0fActivityOutcome\x12i\n" + - "\n" + - "successful\x18\x01 \x01(\v2G.temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.SuccessfulH\x00R\n" + - "successful\x12]\n" + - "\x06failed\x18\x02 \x01(\v2C.temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.FailedH\x00R\x06failed\x1aF\n" + - "\n" + - "Successful\x128\n" + - "\x06output\x18\x01 \x01(\v2 .temporal.api.common.v1.PayloadsR\x06output\x1aD\n" + - "\x06Failed\x12:\n" + - "\afailure\x18\x01 \x01(\v2 .temporal.api.failure.v1.FailureR\afailureB\t\n" + - "\avariant*\x8e\x03\n" + - "\x17ActivityExecutionStatus\x12)\n" + - "%ACTIVITY_EXECUTION_STATUS_UNSPECIFIED\x10\x00\x12'\n" + - "#ACTIVITY_EXECUTION_STATUS_SCHEDULED\x10\x01\x12%\n" + - "!ACTIVITY_EXECUTION_STATUS_STARTED\x10\x02\x12.\n" + - "*ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED\x10\x03\x12'\n" + - "#ACTIVITY_EXECUTION_STATUS_COMPLETED\x10\x04\x12$\n" + - " ACTIVITY_EXECUTION_STATUS_FAILED\x10\x05\x12&\n" + - "\"ACTIVITY_EXECUTION_STATUS_CANCELED\x10\x06\x12(\n" + - "$ACTIVITY_EXECUTION_STATUS_TERMINATED\x10\a\x12'\n" + - "#ACTIVITY_EXECUTION_STATUS_TIMED_OUT\x10\bBDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescData -} - -var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_goTypes = []any{ - (ActivityExecutionStatus)(0), // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatus - (*ActivityState)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.ActivityState - (*ActivityCancelState)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.ActivityCancelState - (*ActivityTerminateState)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.ActivityTerminateState - (*ActivityAttemptState)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState - (*ActivityHeartbeatState)(nil), // 5: temporal.server.chasm.lib.activity.proto.v1.ActivityHeartbeatState - (*ActivityRequestData)(nil), // 6: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData - (*ActivityOutcome)(nil), // 7: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome - (*ActivityAttemptState_LastFailureDetails)(nil), // 8: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails - (*ActivityOutcome_Successful)(nil), // 9: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Successful - (*ActivityOutcome_Failed)(nil), // 10: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Failed - (*v1.ActivityType)(nil), // 11: temporal.api.common.v1.ActivityType - (*v11.TaskQueue)(nil), // 12: temporal.api.taskqueue.v1.TaskQueue - (*durationpb.Duration)(nil), // 13: google.protobuf.Duration - (*v1.RetryPolicy)(nil), // 14: temporal.api.common.v1.RetryPolicy - (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp - (*v1.Priority)(nil), // 16: temporal.api.common.v1.Priority - (*v12.WorkerDeploymentVersion)(nil), // 17: temporal.api.deployment.v1.WorkerDeploymentVersion - (*v1.Payloads)(nil), // 18: temporal.api.common.v1.Payloads - (*v1.Header)(nil), // 19: temporal.api.common.v1.Header - (*v13.UserMetadata)(nil), // 20: temporal.api.sdk.v1.UserMetadata - (*v14.Failure)(nil), // 21: temporal.api.failure.v1.Failure -} -var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_depIdxs = []int32{ - 11, // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityState.activity_type:type_name -> temporal.api.common.v1.ActivityType - 12, // 1: temporal.server.chasm.lib.activity.proto.v1.ActivityState.task_queue:type_name -> temporal.api.taskqueue.v1.TaskQueue - 13, // 2: temporal.server.chasm.lib.activity.proto.v1.ActivityState.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 13, // 3: temporal.server.chasm.lib.activity.proto.v1.ActivityState.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 13, // 4: temporal.server.chasm.lib.activity.proto.v1.ActivityState.start_to_close_timeout:type_name -> google.protobuf.Duration - 13, // 5: temporal.server.chasm.lib.activity.proto.v1.ActivityState.heartbeat_timeout:type_name -> google.protobuf.Duration - 14, // 6: temporal.server.chasm.lib.activity.proto.v1.ActivityState.retry_policy:type_name -> temporal.api.common.v1.RetryPolicy - 0, // 7: temporal.server.chasm.lib.activity.proto.v1.ActivityState.status:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatus - 15, // 8: temporal.server.chasm.lib.activity.proto.v1.ActivityState.schedule_time:type_name -> google.protobuf.Timestamp - 16, // 9: temporal.server.chasm.lib.activity.proto.v1.ActivityState.priority:type_name -> temporal.api.common.v1.Priority - 2, // 10: temporal.server.chasm.lib.activity.proto.v1.ActivityState.cancel_state:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityCancelState - 3, // 11: temporal.server.chasm.lib.activity.proto.v1.ActivityState.terminate_state:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityTerminateState - 15, // 12: temporal.server.chasm.lib.activity.proto.v1.ActivityCancelState.request_time:type_name -> google.protobuf.Timestamp - 13, // 13: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.current_retry_interval:type_name -> google.protobuf.Duration - 15, // 14: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.started_time:type_name -> google.protobuf.Timestamp - 15, // 15: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.complete_time:type_name -> google.protobuf.Timestamp - 8, // 16: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.last_failure_details:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails - 17, // 17: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 18, // 18: temporal.server.chasm.lib.activity.proto.v1.ActivityHeartbeatState.details:type_name -> temporal.api.common.v1.Payloads - 15, // 19: temporal.server.chasm.lib.activity.proto.v1.ActivityHeartbeatState.recorded_time:type_name -> google.protobuf.Timestamp - 18, // 20: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData.input:type_name -> temporal.api.common.v1.Payloads - 19, // 21: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData.header:type_name -> temporal.api.common.v1.Header - 20, // 22: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData.user_metadata:type_name -> temporal.api.sdk.v1.UserMetadata - 9, // 23: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.successful:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Successful - 10, // 24: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.failed:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Failed - 15, // 25: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails.time:type_name -> google.protobuf.Timestamp - 21, // 26: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails.failure:type_name -> temporal.api.failure.v1.Failure - 18, // 27: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Successful.output:type_name -> temporal.api.common.v1.Payloads - 21, // 28: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Failed.failure:type_name -> temporal.api.failure.v1.Failure - 29, // [29:29] is the sub-list for method output_type - 29, // [29:29] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_init() } -func file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_init() { - if File_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto != nil { - return - } - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[6].OneofWrappers = []any{ - (*ActivityOutcome_Successful_)(nil), - (*ActivityOutcome_Failed_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc)), - NumEnums: 1, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_depIdxs, - EnumInfos: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes, - MessageInfos: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto = out.File - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_goTypes = nil - file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_depIdxs = nil -} diff --git a/chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go b/chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go deleted file mode 100644 index 517287dc3e..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go +++ /dev/null @@ -1,450 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package activitypb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type StartActivityExecutionRequest to the protobuf v3 wire format -func (val *StartActivityExecutionRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type StartActivityExecutionRequest from the protobuf v3 wire format -func (val *StartActivityExecutionRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *StartActivityExecutionRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two StartActivityExecutionRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *StartActivityExecutionRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *StartActivityExecutionRequest - switch t := that.(type) { - case *StartActivityExecutionRequest: - that1 = t - case StartActivityExecutionRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type StartActivityExecutionResponse to the protobuf v3 wire format -func (val *StartActivityExecutionResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type StartActivityExecutionResponse from the protobuf v3 wire format -func (val *StartActivityExecutionResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *StartActivityExecutionResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two StartActivityExecutionResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *StartActivityExecutionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *StartActivityExecutionResponse - switch t := that.(type) { - case *StartActivityExecutionResponse: - that1 = t - case StartActivityExecutionResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type DescribeActivityExecutionRequest to the protobuf v3 wire format -func (val *DescribeActivityExecutionRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type DescribeActivityExecutionRequest from the protobuf v3 wire format -func (val *DescribeActivityExecutionRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *DescribeActivityExecutionRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two DescribeActivityExecutionRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *DescribeActivityExecutionRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *DescribeActivityExecutionRequest - switch t := that.(type) { - case *DescribeActivityExecutionRequest: - that1 = t - case DescribeActivityExecutionRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type DescribeActivityExecutionResponse to the protobuf v3 wire format -func (val *DescribeActivityExecutionResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type DescribeActivityExecutionResponse from the protobuf v3 wire format -func (val *DescribeActivityExecutionResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *DescribeActivityExecutionResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two DescribeActivityExecutionResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *DescribeActivityExecutionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *DescribeActivityExecutionResponse - switch t := that.(type) { - case *DescribeActivityExecutionResponse: - that1 = t - case DescribeActivityExecutionResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type PollActivityExecutionRequest to the protobuf v3 wire format -func (val *PollActivityExecutionRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type PollActivityExecutionRequest from the protobuf v3 wire format -func (val *PollActivityExecutionRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *PollActivityExecutionRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two PollActivityExecutionRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *PollActivityExecutionRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *PollActivityExecutionRequest - switch t := that.(type) { - case *PollActivityExecutionRequest: - that1 = t - case PollActivityExecutionRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type PollActivityExecutionResponse to the protobuf v3 wire format -func (val *PollActivityExecutionResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type PollActivityExecutionResponse from the protobuf v3 wire format -func (val *PollActivityExecutionResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *PollActivityExecutionResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two PollActivityExecutionResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *PollActivityExecutionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *PollActivityExecutionResponse - switch t := that.(type) { - case *PollActivityExecutionResponse: - that1 = t - case PollActivityExecutionResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type TerminateActivityExecutionRequest to the protobuf v3 wire format -func (val *TerminateActivityExecutionRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TerminateActivityExecutionRequest from the protobuf v3 wire format -func (val *TerminateActivityExecutionRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TerminateActivityExecutionRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TerminateActivityExecutionRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TerminateActivityExecutionRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TerminateActivityExecutionRequest - switch t := that.(type) { - case *TerminateActivityExecutionRequest: - that1 = t - case TerminateActivityExecutionRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type TerminateActivityExecutionResponse to the protobuf v3 wire format -func (val *TerminateActivityExecutionResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TerminateActivityExecutionResponse from the protobuf v3 wire format -func (val *TerminateActivityExecutionResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TerminateActivityExecutionResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TerminateActivityExecutionResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TerminateActivityExecutionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TerminateActivityExecutionResponse - switch t := that.(type) { - case *TerminateActivityExecutionResponse: - that1 = t - case TerminateActivityExecutionResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type RequestCancelActivityExecutionRequest to the protobuf v3 wire format -func (val *RequestCancelActivityExecutionRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type RequestCancelActivityExecutionRequest from the protobuf v3 wire format -func (val *RequestCancelActivityExecutionRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *RequestCancelActivityExecutionRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two RequestCancelActivityExecutionRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *RequestCancelActivityExecutionRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *RequestCancelActivityExecutionRequest - switch t := that.(type) { - case *RequestCancelActivityExecutionRequest: - that1 = t - case RequestCancelActivityExecutionRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type RequestCancelActivityExecutionResponse to the protobuf v3 wire format -func (val *RequestCancelActivityExecutionResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type RequestCancelActivityExecutionResponse from the protobuf v3 wire format -func (val *RequestCancelActivityExecutionResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *RequestCancelActivityExecutionResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two RequestCancelActivityExecutionResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *RequestCancelActivityExecutionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *RequestCancelActivityExecutionResponse - switch t := that.(type) { - case *RequestCancelActivityExecutionResponse: - that1 = t - case RequestCancelActivityExecutionResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type DeleteActivityExecutionRequest to the protobuf v3 wire format -func (val *DeleteActivityExecutionRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type DeleteActivityExecutionRequest from the protobuf v3 wire format -func (val *DeleteActivityExecutionRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *DeleteActivityExecutionRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two DeleteActivityExecutionRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *DeleteActivityExecutionRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *DeleteActivityExecutionRequest - switch t := that.(type) { - case *DeleteActivityExecutionRequest: - that1 = t - case DeleteActivityExecutionRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type DeleteActivityExecutionResponse to the protobuf v3 wire format -func (val *DeleteActivityExecutionResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type DeleteActivityExecutionResponse from the protobuf v3 wire format -func (val *DeleteActivityExecutionResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *DeleteActivityExecutionResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two DeleteActivityExecutionResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *DeleteActivityExecutionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *DeleteActivityExecutionResponse - switch t := that.(type) { - case *DeleteActivityExecutionResponse: - that1 = t - case DeleteActivityExecutionResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/activity/gen/activitypb/v1/request_response.pb.go b/chasm/lib/activity/gen/activitypb/v1/request_response.pb.go deleted file mode 100644 index 0407199486..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/request_response.pb.go +++ /dev/null @@ -1,686 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/activity/proto/v1/request_response.proto - -package activitypb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - v1 "go.temporal.io/api/workflowservice/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type StartActivityExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - FrontendRequest *v1.StartActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartActivityExecutionRequest) Reset() { - *x = StartActivityExecutionRequest{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartActivityExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartActivityExecutionRequest) ProtoMessage() {} - -func (x *StartActivityExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartActivityExecutionRequest.ProtoReflect.Descriptor instead. -func (*StartActivityExecutionRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{0} -} - -func (x *StartActivityExecutionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *StartActivityExecutionRequest) GetFrontendRequest() *v1.StartActivityExecutionRequest { - if x != nil { - return x.FrontendRequest - } - return nil -} - -type StartActivityExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - FrontendResponse *v1.StartActivityExecutionResponse `protobuf:"bytes,1,opt,name=frontend_response,json=frontendResponse,proto3" json:"frontend_response,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartActivityExecutionResponse) Reset() { - *x = StartActivityExecutionResponse{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartActivityExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartActivityExecutionResponse) ProtoMessage() {} - -func (x *StartActivityExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartActivityExecutionResponse.ProtoReflect.Descriptor instead. -func (*StartActivityExecutionResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{1} -} - -func (x *StartActivityExecutionResponse) GetFrontendResponse() *v1.StartActivityExecutionResponse { - if x != nil { - return x.FrontendResponse - } - return nil -} - -type DescribeActivityExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - FrontendRequest *v1.DescribeActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DescribeActivityExecutionRequest) Reset() { - *x = DescribeActivityExecutionRequest{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DescribeActivityExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DescribeActivityExecutionRequest) ProtoMessage() {} - -func (x *DescribeActivityExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DescribeActivityExecutionRequest.ProtoReflect.Descriptor instead. -func (*DescribeActivityExecutionRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{2} -} - -func (x *DescribeActivityExecutionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *DescribeActivityExecutionRequest) GetFrontendRequest() *v1.DescribeActivityExecutionRequest { - if x != nil { - return x.FrontendRequest - } - return nil -} - -type DescribeActivityExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - FrontendResponse *v1.DescribeActivityExecutionResponse `protobuf:"bytes,1,opt,name=frontend_response,json=frontendResponse,proto3" json:"frontend_response,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DescribeActivityExecutionResponse) Reset() { - *x = DescribeActivityExecutionResponse{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DescribeActivityExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DescribeActivityExecutionResponse) ProtoMessage() {} - -func (x *DescribeActivityExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DescribeActivityExecutionResponse.ProtoReflect.Descriptor instead. -func (*DescribeActivityExecutionResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{3} -} - -func (x *DescribeActivityExecutionResponse) GetFrontendResponse() *v1.DescribeActivityExecutionResponse { - if x != nil { - return x.FrontendResponse - } - return nil -} - -type PollActivityExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - FrontendRequest *v1.PollActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PollActivityExecutionRequest) Reset() { - *x = PollActivityExecutionRequest{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PollActivityExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PollActivityExecutionRequest) ProtoMessage() {} - -func (x *PollActivityExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PollActivityExecutionRequest.ProtoReflect.Descriptor instead. -func (*PollActivityExecutionRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{4} -} - -func (x *PollActivityExecutionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *PollActivityExecutionRequest) GetFrontendRequest() *v1.PollActivityExecutionRequest { - if x != nil { - return x.FrontendRequest - } - return nil -} - -type PollActivityExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - FrontendResponse *v1.PollActivityExecutionResponse `protobuf:"bytes,1,opt,name=frontend_response,json=frontendResponse,proto3" json:"frontend_response,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PollActivityExecutionResponse) Reset() { - *x = PollActivityExecutionResponse{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PollActivityExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PollActivityExecutionResponse) ProtoMessage() {} - -func (x *PollActivityExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PollActivityExecutionResponse.ProtoReflect.Descriptor instead. -func (*PollActivityExecutionResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{5} -} - -func (x *PollActivityExecutionResponse) GetFrontendResponse() *v1.PollActivityExecutionResponse { - if x != nil { - return x.FrontendResponse - } - return nil -} - -type TerminateActivityExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - FrontendRequest *v1.TerminateActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TerminateActivityExecutionRequest) Reset() { - *x = TerminateActivityExecutionRequest{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TerminateActivityExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TerminateActivityExecutionRequest) ProtoMessage() {} - -func (x *TerminateActivityExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TerminateActivityExecutionRequest.ProtoReflect.Descriptor instead. -func (*TerminateActivityExecutionRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{6} -} - -func (x *TerminateActivityExecutionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *TerminateActivityExecutionRequest) GetFrontendRequest() *v1.TerminateActivityExecutionRequest { - if x != nil { - return x.FrontendRequest - } - return nil -} - -type TerminateActivityExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TerminateActivityExecutionResponse) Reset() { - *x = TerminateActivityExecutionResponse{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TerminateActivityExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TerminateActivityExecutionResponse) ProtoMessage() {} - -func (x *TerminateActivityExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TerminateActivityExecutionResponse.ProtoReflect.Descriptor instead. -func (*TerminateActivityExecutionResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{7} -} - -type RequestCancelActivityExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - FrontendRequest *v1.RequestCancelActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RequestCancelActivityExecutionRequest) Reset() { - *x = RequestCancelActivityExecutionRequest{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RequestCancelActivityExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestCancelActivityExecutionRequest) ProtoMessage() {} - -func (x *RequestCancelActivityExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequestCancelActivityExecutionRequest.ProtoReflect.Descriptor instead. -func (*RequestCancelActivityExecutionRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{8} -} - -func (x *RequestCancelActivityExecutionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *RequestCancelActivityExecutionRequest) GetFrontendRequest() *v1.RequestCancelActivityExecutionRequest { - if x != nil { - return x.FrontendRequest - } - return nil -} - -type RequestCancelActivityExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RequestCancelActivityExecutionResponse) Reset() { - *x = RequestCancelActivityExecutionResponse{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RequestCancelActivityExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RequestCancelActivityExecutionResponse) ProtoMessage() {} - -func (x *RequestCancelActivityExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RequestCancelActivityExecutionResponse.ProtoReflect.Descriptor instead. -func (*RequestCancelActivityExecutionResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{9} -} - -type DeleteActivityExecutionRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - FrontendRequest *v1.DeleteActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteActivityExecutionRequest) Reset() { - *x = DeleteActivityExecutionRequest{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteActivityExecutionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteActivityExecutionRequest) ProtoMessage() {} - -func (x *DeleteActivityExecutionRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteActivityExecutionRequest.ProtoReflect.Descriptor instead. -func (*DeleteActivityExecutionRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteActivityExecutionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *DeleteActivityExecutionRequest) GetFrontendRequest() *v1.DeleteActivityExecutionRequest { - if x != nil { - return x.FrontendRequest - } - return nil -} - -type DeleteActivityExecutionResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DeleteActivityExecutionResponse) Reset() { - *x = DeleteActivityExecutionResponse{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DeleteActivityExecutionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteActivityExecutionResponse) ProtoMessage() {} - -func (x *DeleteActivityExecutionResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteActivityExecutionResponse.ProtoReflect.Descriptor instead. -func (*DeleteActivityExecutionResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{11} -} - -var File_temporal_server_chasm_lib_activity_proto_v1_request_response_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc = "" + - "\n" + - "Btemporal/server/chasm/lib/activity/proto/v1/request_response.proto\x12+temporal.server.chasm.lib.activity.proto.v1\x1a6temporal/api/workflowservice/v1/request_response.proto\"\xad\x01\n" + - "\x1dStartActivityExecutionRequest\x12!\n" + - "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12i\n" + - "\x10frontend_request\x18\x02 \x01(\v2>.temporal.api.workflowservice.v1.StartActivityExecutionRequestR\x0ffrontendRequest\"\x8e\x01\n" + - "\x1eStartActivityExecutionResponse\x12l\n" + - "\x11frontend_response\x18\x01 \x01(\v2?.temporal.api.workflowservice.v1.StartActivityExecutionResponseR\x10frontendResponse\"\xb3\x01\n" + - " DescribeActivityExecutionRequest\x12!\n" + - "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12l\n" + - "\x10frontend_request\x18\x02 \x01(\v2A.temporal.api.workflowservice.v1.DescribeActivityExecutionRequestR\x0ffrontendRequest\"\x94\x01\n" + - "!DescribeActivityExecutionResponse\x12o\n" + - "\x11frontend_response\x18\x01 \x01(\v2B.temporal.api.workflowservice.v1.DescribeActivityExecutionResponseR\x10frontendResponse\"\xab\x01\n" + - "\x1cPollActivityExecutionRequest\x12!\n" + - "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12h\n" + - "\x10frontend_request\x18\x02 \x01(\v2=.temporal.api.workflowservice.v1.PollActivityExecutionRequestR\x0ffrontendRequest\"\x8c\x01\n" + - "\x1dPollActivityExecutionResponse\x12k\n" + - "\x11frontend_response\x18\x01 \x01(\v2>.temporal.api.workflowservice.v1.PollActivityExecutionResponseR\x10frontendResponse\"\xb5\x01\n" + - "!TerminateActivityExecutionRequest\x12!\n" + - "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12m\n" + - "\x10frontend_request\x18\x02 \x01(\v2B.temporal.api.workflowservice.v1.TerminateActivityExecutionRequestR\x0ffrontendRequest\"$\n" + - "\"TerminateActivityExecutionResponse\"\xbd\x01\n" + - "%RequestCancelActivityExecutionRequest\x12!\n" + - "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12q\n" + - "\x10frontend_request\x18\x02 \x01(\v2F.temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequestR\x0ffrontendRequest\"(\n" + - "&RequestCancelActivityExecutionResponse\"\xaf\x01\n" + - "\x1eDeleteActivityExecutionRequest\x12!\n" + - "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12j\n" + - "\x10frontend_request\x18\x02 \x01(\v2?.temporal.api.workflowservice.v1.DeleteActivityExecutionRequestR\x0ffrontendRequest\"!\n" + - "\x1fDeleteActivityExecutionResponseBDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescData -} - -var file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_goTypes = []any{ - (*StartActivityExecutionRequest)(nil), // 0: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest - (*StartActivityExecutionResponse)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse - (*DescribeActivityExecutionRequest)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest - (*DescribeActivityExecutionResponse)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse - (*PollActivityExecutionRequest)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest - (*PollActivityExecutionResponse)(nil), // 5: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse - (*TerminateActivityExecutionRequest)(nil), // 6: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest - (*TerminateActivityExecutionResponse)(nil), // 7: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse - (*RequestCancelActivityExecutionRequest)(nil), // 8: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest - (*RequestCancelActivityExecutionResponse)(nil), // 9: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse - (*DeleteActivityExecutionRequest)(nil), // 10: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest - (*DeleteActivityExecutionResponse)(nil), // 11: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse - (*v1.StartActivityExecutionRequest)(nil), // 12: temporal.api.workflowservice.v1.StartActivityExecutionRequest - (*v1.StartActivityExecutionResponse)(nil), // 13: temporal.api.workflowservice.v1.StartActivityExecutionResponse - (*v1.DescribeActivityExecutionRequest)(nil), // 14: temporal.api.workflowservice.v1.DescribeActivityExecutionRequest - (*v1.DescribeActivityExecutionResponse)(nil), // 15: temporal.api.workflowservice.v1.DescribeActivityExecutionResponse - (*v1.PollActivityExecutionRequest)(nil), // 16: temporal.api.workflowservice.v1.PollActivityExecutionRequest - (*v1.PollActivityExecutionResponse)(nil), // 17: temporal.api.workflowservice.v1.PollActivityExecutionResponse - (*v1.TerminateActivityExecutionRequest)(nil), // 18: temporal.api.workflowservice.v1.TerminateActivityExecutionRequest - (*v1.RequestCancelActivityExecutionRequest)(nil), // 19: temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest - (*v1.DeleteActivityExecutionRequest)(nil), // 20: temporal.api.workflowservice.v1.DeleteActivityExecutionRequest -} -var file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_depIdxs = []int32{ - 12, // 0: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.StartActivityExecutionRequest - 13, // 1: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse.frontend_response:type_name -> temporal.api.workflowservice.v1.StartActivityExecutionResponse - 14, // 2: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.DescribeActivityExecutionRequest - 15, // 3: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse.frontend_response:type_name -> temporal.api.workflowservice.v1.DescribeActivityExecutionResponse - 16, // 4: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.PollActivityExecutionRequest - 17, // 5: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse.frontend_response:type_name -> temporal.api.workflowservice.v1.PollActivityExecutionResponse - 18, // 6: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.TerminateActivityExecutionRequest - 19, // 7: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest - 20, // 8: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.DeleteActivityExecutionRequest - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_init() } -func file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_init() { - if File_temporal_server_chasm_lib_activity_proto_v1_request_response_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc)), - NumEnums: 0, - NumMessages: 12, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_activity_proto_v1_request_response_proto = out.File - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_goTypes = nil - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_depIdxs = nil -} diff --git a/chasm/lib/activity/gen/activitypb/v1/service.pb.go b/chasm/lib/activity/gen/activitypb/v1/service.pb.go deleted file mode 100644 index 06e80b0010..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/service.pb.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/activity/proto/v1/service.proto - -package activitypb - -import ( - reflect "reflect" - unsafe "unsafe" - - _ "go.temporal.io/server/api/common/v1" - _ "go.temporal.io/server/api/routing/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_temporal_server_chasm_lib_activity_proto_v1_service_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_activity_proto_v1_service_proto_rawDesc = "" + - "\n" + - "9temporal/server/chasm/lib/activity/proto/v1/service.proto\x12+temporal.server.chasm.lib.activity.proto.v1\x1aBtemporal/server/chasm/lib/activity/proto/v1/request_response.proto\x1a.temporal/server/api/routing/v1/extension.proto\x1a0temporal/server/api/common/v1/api_category.proto2\xf2\n" + - "\n" + - "\x0fActivityService\x12\xdb\x01\n" + - "\x16StartActivityExecution\x12J.temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest\x1aK.temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xe4\x01\n" + - "\x19DescribeActivityExecution\x12M.temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest\x1aN.temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xd8\x01\n" + - "\x15PollActivityExecution\x12I.temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest\x1aJ.temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x02\x12\xe7\x01\n" + - "\x1aTerminateActivityExecution\x12N.temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest\x1aO.temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xf3\x01\n" + - "\x1eRequestCancelActivityExecution\x12R.temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest\x1aS.temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xde\x01\n" + - "\x17DeleteActivityExecution\x12K.temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest\x1aL.temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01BDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" - -var file_temporal_server_chasm_lib_activity_proto_v1_service_proto_goTypes = []any{ - (*StartActivityExecutionRequest)(nil), // 0: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest - (*DescribeActivityExecutionRequest)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest - (*PollActivityExecutionRequest)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest - (*TerminateActivityExecutionRequest)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest - (*RequestCancelActivityExecutionRequest)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest - (*DeleteActivityExecutionRequest)(nil), // 5: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest - (*StartActivityExecutionResponse)(nil), // 6: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse - (*DescribeActivityExecutionResponse)(nil), // 7: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse - (*PollActivityExecutionResponse)(nil), // 8: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse - (*TerminateActivityExecutionResponse)(nil), // 9: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse - (*RequestCancelActivityExecutionResponse)(nil), // 10: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse - (*DeleteActivityExecutionResponse)(nil), // 11: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse -} -var file_temporal_server_chasm_lib_activity_proto_v1_service_proto_depIdxs = []int32{ - 0, // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityService.StartActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest - 1, // 1: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DescribeActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest - 2, // 2: temporal.server.chasm.lib.activity.proto.v1.ActivityService.PollActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest - 3, // 3: temporal.server.chasm.lib.activity.proto.v1.ActivityService.TerminateActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest - 4, // 4: temporal.server.chasm.lib.activity.proto.v1.ActivityService.RequestCancelActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest - 5, // 5: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DeleteActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest - 6, // 6: temporal.server.chasm.lib.activity.proto.v1.ActivityService.StartActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse - 7, // 7: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DescribeActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse - 8, // 8: temporal.server.chasm.lib.activity.proto.v1.ActivityService.PollActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse - 9, // 9: temporal.server.chasm.lib.activity.proto.v1.ActivityService.TerminateActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse - 10, // 10: temporal.server.chasm.lib.activity.proto.v1.ActivityService.RequestCancelActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse - 11, // 11: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DeleteActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse - 6, // [6:12] is the sub-list for method output_type - 0, // [0:6] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_activity_proto_v1_service_proto_init() } -func file_temporal_server_chasm_lib_activity_proto_v1_service_proto_init() { - if File_temporal_server_chasm_lib_activity_proto_v1_service_proto != nil { - return - } - file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_service_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_service_proto_rawDesc)), - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_service_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_service_proto_depIdxs, - }.Build() - File_temporal_server_chasm_lib_activity_proto_v1_service_proto = out.File - file_temporal_server_chasm_lib_activity_proto_v1_service_proto_goTypes = nil - file_temporal_server_chasm_lib_activity_proto_v1_service_proto_depIdxs = nil -} diff --git a/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go b/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go deleted file mode 100644 index b1d80f018f..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by protoc-gen-go-chasm. DO NOT EDIT. -package activitypb - -import ( - "context" - "time" - - "go.temporal.io/server/client/history" - "go.temporal.io/server/common" - "go.temporal.io/server/common/backoff" - "go.temporal.io/server/common/config" - "go.temporal.io/server/common/dynamicconfig" - "go.temporal.io/server/common/headers" - "go.temporal.io/server/common/log" - "go.temporal.io/server/common/membership" - "go.temporal.io/server/common/metrics" - "go.temporal.io/server/common/primitives" - "google.golang.org/grpc" -) - -// ActivityServiceLayeredClient is a client for ActivityService. -type ActivityServiceLayeredClient struct { - metricsHandler metrics.Handler - numShards int32 - redirector history.Redirector[ActivityServiceClient] - retryPolicy backoff.RetryPolicy -} - -// NewActivityServiceLayeredClient initializes a new ActivityServiceLayeredClient. -func NewActivityServiceLayeredClient( - dc *dynamicconfig.Collection, - rpcFactory common.RPCFactory, - monitor membership.Monitor, - config *config.Persistence, - logger log.Logger, - metricsHandler metrics.Handler, -) (ActivityServiceClient, error) { - resolver, err := monitor.GetResolver(primitives.HistoryService) - if err != nil { - return nil, err - } - connections := history.NewConnectionPool(resolver, rpcFactory, NewActivityServiceClient) - var redirector history.Redirector[ActivityServiceClient] - if dynamicconfig.HistoryClientOwnershipCachingEnabled.Get(dc)() { - redirector = history.NewCachingRedirector( - connections, - resolver, - logger, - dynamicconfig.HistoryClientOwnershipCachingStaleTTL.Get(dc), - ) - } else { - redirector = history.NewBasicRedirector(connections, resolver) - } - return &ActivityServiceLayeredClient{ - metricsHandler: metricsHandler, - redirector: redirector, - numShards: config.NumHistoryShards, - retryPolicy: common.CreateHistoryClientRetryPolicy(), - }, nil -} -func (c *ActivityServiceLayeredClient) callStartActivityExecutionNoRetry( - ctx context.Context, - request *StartActivityExecutionRequest, - opts ...grpc.CallOption, -) (*StartActivityExecutionResponse, error) { - var response *StartActivityExecutionResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("ActivityService.StartActivityExecution"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) - op := func(ctx context.Context, client ActivityServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.StartActivityExecution(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *ActivityServiceLayeredClient) StartActivityExecution( - ctx context.Context, - request *StartActivityExecutionRequest, - opts ...grpc.CallOption, -) (*StartActivityExecutionResponse, error) { - call := func(ctx context.Context) (*StartActivityExecutionResponse, error) { - return c.callStartActivityExecutionNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} -func (c *ActivityServiceLayeredClient) callDescribeActivityExecutionNoRetry( - ctx context.Context, - request *DescribeActivityExecutionRequest, - opts ...grpc.CallOption, -) (*DescribeActivityExecutionResponse, error) { - var response *DescribeActivityExecutionResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("ActivityService.DescribeActivityExecution"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) - op := func(ctx context.Context, client ActivityServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.DescribeActivityExecution(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *ActivityServiceLayeredClient) DescribeActivityExecution( - ctx context.Context, - request *DescribeActivityExecutionRequest, - opts ...grpc.CallOption, -) (*DescribeActivityExecutionResponse, error) { - call := func(ctx context.Context) (*DescribeActivityExecutionResponse, error) { - return c.callDescribeActivityExecutionNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} -func (c *ActivityServiceLayeredClient) callPollActivityExecutionNoRetry( - ctx context.Context, - request *PollActivityExecutionRequest, - opts ...grpc.CallOption, -) (*PollActivityExecutionResponse, error) { - var response *PollActivityExecutionResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("ActivityService.PollActivityExecution"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) - op := func(ctx context.Context, client ActivityServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.PollActivityExecution(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *ActivityServiceLayeredClient) PollActivityExecution( - ctx context.Context, - request *PollActivityExecutionRequest, - opts ...grpc.CallOption, -) (*PollActivityExecutionResponse, error) { - call := func(ctx context.Context) (*PollActivityExecutionResponse, error) { - return c.callPollActivityExecutionNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} -func (c *ActivityServiceLayeredClient) callTerminateActivityExecutionNoRetry( - ctx context.Context, - request *TerminateActivityExecutionRequest, - opts ...grpc.CallOption, -) (*TerminateActivityExecutionResponse, error) { - var response *TerminateActivityExecutionResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("ActivityService.TerminateActivityExecution"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) - op := func(ctx context.Context, client ActivityServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.TerminateActivityExecution(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *ActivityServiceLayeredClient) TerminateActivityExecution( - ctx context.Context, - request *TerminateActivityExecutionRequest, - opts ...grpc.CallOption, -) (*TerminateActivityExecutionResponse, error) { - call := func(ctx context.Context) (*TerminateActivityExecutionResponse, error) { - return c.callTerminateActivityExecutionNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} -func (c *ActivityServiceLayeredClient) callRequestCancelActivityExecutionNoRetry( - ctx context.Context, - request *RequestCancelActivityExecutionRequest, - opts ...grpc.CallOption, -) (*RequestCancelActivityExecutionResponse, error) { - var response *RequestCancelActivityExecutionResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("ActivityService.RequestCancelActivityExecution"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) - op := func(ctx context.Context, client ActivityServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.RequestCancelActivityExecution(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *ActivityServiceLayeredClient) RequestCancelActivityExecution( - ctx context.Context, - request *RequestCancelActivityExecutionRequest, - opts ...grpc.CallOption, -) (*RequestCancelActivityExecutionResponse, error) { - call := func(ctx context.Context) (*RequestCancelActivityExecutionResponse, error) { - return c.callRequestCancelActivityExecutionNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} -func (c *ActivityServiceLayeredClient) callDeleteActivityExecutionNoRetry( - ctx context.Context, - request *DeleteActivityExecutionRequest, - opts ...grpc.CallOption, -) (*DeleteActivityExecutionResponse, error) { - var response *DeleteActivityExecutionResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("ActivityService.DeleteActivityExecution"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) - op := func(ctx context.Context, client ActivityServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.DeleteActivityExecution(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *ActivityServiceLayeredClient) DeleteActivityExecution( - ctx context.Context, - request *DeleteActivityExecutionRequest, - opts ...grpc.CallOption, -) (*DeleteActivityExecutionResponse, error) { - call := func(ctx context.Context) (*DeleteActivityExecutionResponse, error) { - return c.callDeleteActivityExecutionNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} diff --git a/chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go b/chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go deleted file mode 100644 index f02184fbd4..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// plugins: -// - protoc-gen-go-grpc -// - protoc -// source: temporal/server/chasm/lib/activity/proto/v1/service.proto - -package activitypb - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - ActivityService_StartActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/StartActivityExecution" - ActivityService_DescribeActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/DescribeActivityExecution" - ActivityService_PollActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/PollActivityExecution" - ActivityService_TerminateActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/TerminateActivityExecution" - ActivityService_RequestCancelActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/RequestCancelActivityExecution" - ActivityService_DeleteActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/DeleteActivityExecution" -) - -// ActivityServiceClient is the client API for ActivityService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ActivityServiceClient interface { - StartActivityExecution(ctx context.Context, in *StartActivityExecutionRequest, opts ...grpc.CallOption) (*StartActivityExecutionResponse, error) - DescribeActivityExecution(ctx context.Context, in *DescribeActivityExecutionRequest, opts ...grpc.CallOption) (*DescribeActivityExecutionResponse, error) - PollActivityExecution(ctx context.Context, in *PollActivityExecutionRequest, opts ...grpc.CallOption) (*PollActivityExecutionResponse, error) - TerminateActivityExecution(ctx context.Context, in *TerminateActivityExecutionRequest, opts ...grpc.CallOption) (*TerminateActivityExecutionResponse, error) - RequestCancelActivityExecution(ctx context.Context, in *RequestCancelActivityExecutionRequest, opts ...grpc.CallOption) (*RequestCancelActivityExecutionResponse, error) - DeleteActivityExecution(ctx context.Context, in *DeleteActivityExecutionRequest, opts ...grpc.CallOption) (*DeleteActivityExecutionResponse, error) -} - -type activityServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewActivityServiceClient(cc grpc.ClientConnInterface) ActivityServiceClient { - return &activityServiceClient{cc} -} - -func (c *activityServiceClient) StartActivityExecution(ctx context.Context, in *StartActivityExecutionRequest, opts ...grpc.CallOption) (*StartActivityExecutionResponse, error) { - out := new(StartActivityExecutionResponse) - err := c.cc.Invoke(ctx, ActivityService_StartActivityExecution_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *activityServiceClient) DescribeActivityExecution(ctx context.Context, in *DescribeActivityExecutionRequest, opts ...grpc.CallOption) (*DescribeActivityExecutionResponse, error) { - out := new(DescribeActivityExecutionResponse) - err := c.cc.Invoke(ctx, ActivityService_DescribeActivityExecution_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *activityServiceClient) PollActivityExecution(ctx context.Context, in *PollActivityExecutionRequest, opts ...grpc.CallOption) (*PollActivityExecutionResponse, error) { - out := new(PollActivityExecutionResponse) - err := c.cc.Invoke(ctx, ActivityService_PollActivityExecution_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *activityServiceClient) TerminateActivityExecution(ctx context.Context, in *TerminateActivityExecutionRequest, opts ...grpc.CallOption) (*TerminateActivityExecutionResponse, error) { - out := new(TerminateActivityExecutionResponse) - err := c.cc.Invoke(ctx, ActivityService_TerminateActivityExecution_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *activityServiceClient) RequestCancelActivityExecution(ctx context.Context, in *RequestCancelActivityExecutionRequest, opts ...grpc.CallOption) (*RequestCancelActivityExecutionResponse, error) { - out := new(RequestCancelActivityExecutionResponse) - err := c.cc.Invoke(ctx, ActivityService_RequestCancelActivityExecution_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *activityServiceClient) DeleteActivityExecution(ctx context.Context, in *DeleteActivityExecutionRequest, opts ...grpc.CallOption) (*DeleteActivityExecutionResponse, error) { - out := new(DeleteActivityExecutionResponse) - err := c.cc.Invoke(ctx, ActivityService_DeleteActivityExecution_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ActivityServiceServer is the server API for ActivityService service. -// All implementations must embed UnimplementedActivityServiceServer -// for forward compatibility -type ActivityServiceServer interface { - StartActivityExecution(context.Context, *StartActivityExecutionRequest) (*StartActivityExecutionResponse, error) - DescribeActivityExecution(context.Context, *DescribeActivityExecutionRequest) (*DescribeActivityExecutionResponse, error) - PollActivityExecution(context.Context, *PollActivityExecutionRequest) (*PollActivityExecutionResponse, error) - TerminateActivityExecution(context.Context, *TerminateActivityExecutionRequest) (*TerminateActivityExecutionResponse, error) - RequestCancelActivityExecution(context.Context, *RequestCancelActivityExecutionRequest) (*RequestCancelActivityExecutionResponse, error) - DeleteActivityExecution(context.Context, *DeleteActivityExecutionRequest) (*DeleteActivityExecutionResponse, error) - mustEmbedUnimplementedActivityServiceServer() -} - -// UnimplementedActivityServiceServer must be embedded to have forward compatible implementations. -type UnimplementedActivityServiceServer struct { -} - -func (UnimplementedActivityServiceServer) StartActivityExecution(context.Context, *StartActivityExecutionRequest) (*StartActivityExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method StartActivityExecution not implemented") -} -func (UnimplementedActivityServiceServer) DescribeActivityExecution(context.Context, *DescribeActivityExecutionRequest) (*DescribeActivityExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DescribeActivityExecution not implemented") -} -func (UnimplementedActivityServiceServer) PollActivityExecution(context.Context, *PollActivityExecutionRequest) (*PollActivityExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PollActivityExecution not implemented") -} -func (UnimplementedActivityServiceServer) TerminateActivityExecution(context.Context, *TerminateActivityExecutionRequest) (*TerminateActivityExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TerminateActivityExecution not implemented") -} -func (UnimplementedActivityServiceServer) RequestCancelActivityExecution(context.Context, *RequestCancelActivityExecutionRequest) (*RequestCancelActivityExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RequestCancelActivityExecution not implemented") -} -func (UnimplementedActivityServiceServer) DeleteActivityExecution(context.Context, *DeleteActivityExecutionRequest) (*DeleteActivityExecutionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteActivityExecution not implemented") -} -func (UnimplementedActivityServiceServer) mustEmbedUnimplementedActivityServiceServer() {} - -// UnsafeActivityServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ActivityServiceServer will -// result in compilation errors. -type UnsafeActivityServiceServer interface { - mustEmbedUnimplementedActivityServiceServer() -} - -func RegisterActivityServiceServer(s grpc.ServiceRegistrar, srv ActivityServiceServer) { - s.RegisterService(&ActivityService_ServiceDesc, srv) -} - -func _ActivityService_StartActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(StartActivityExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityServiceServer).StartActivityExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ActivityService_StartActivityExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityServiceServer).StartActivityExecution(ctx, req.(*StartActivityExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ActivityService_DescribeActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DescribeActivityExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityServiceServer).DescribeActivityExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ActivityService_DescribeActivityExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityServiceServer).DescribeActivityExecution(ctx, req.(*DescribeActivityExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ActivityService_PollActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PollActivityExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityServiceServer).PollActivityExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ActivityService_PollActivityExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityServiceServer).PollActivityExecution(ctx, req.(*PollActivityExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ActivityService_TerminateActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TerminateActivityExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityServiceServer).TerminateActivityExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ActivityService_TerminateActivityExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityServiceServer).TerminateActivityExecution(ctx, req.(*TerminateActivityExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ActivityService_RequestCancelActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RequestCancelActivityExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityServiceServer).RequestCancelActivityExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ActivityService_RequestCancelActivityExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityServiceServer).RequestCancelActivityExecution(ctx, req.(*RequestCancelActivityExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ActivityService_DeleteActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteActivityExecutionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ActivityServiceServer).DeleteActivityExecution(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ActivityService_DeleteActivityExecution_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ActivityServiceServer).DeleteActivityExecution(ctx, req.(*DeleteActivityExecutionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ActivityService_ServiceDesc is the grpc.ServiceDesc for ActivityService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ActivityService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "temporal.server.chasm.lib.activity.proto.v1.ActivityService", - HandlerType: (*ActivityServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "StartActivityExecution", - Handler: _ActivityService_StartActivityExecution_Handler, - }, - { - MethodName: "DescribeActivityExecution", - Handler: _ActivityService_DescribeActivityExecution_Handler, - }, - { - MethodName: "PollActivityExecution", - Handler: _ActivityService_PollActivityExecution_Handler, - }, - { - MethodName: "TerminateActivityExecution", - Handler: _ActivityService_TerminateActivityExecution_Handler, - }, - { - MethodName: "RequestCancelActivityExecution", - Handler: _ActivityService_RequestCancelActivityExecution_Handler, - }, - { - MethodName: "DeleteActivityExecution", - Handler: _ActivityService_DeleteActivityExecution_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "temporal/server/chasm/lib/activity/proto/v1/service.proto", -} diff --git a/chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go b/chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go deleted file mode 100644 index d7628a6e9e..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package activitypb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type ActivityDispatchTask to the protobuf v3 wire format -func (val *ActivityDispatchTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ActivityDispatchTask from the protobuf v3 wire format -func (val *ActivityDispatchTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ActivityDispatchTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ActivityDispatchTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ActivityDispatchTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ActivityDispatchTask - switch t := that.(type) { - case *ActivityDispatchTask: - that1 = t - case ActivityDispatchTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ScheduleToStartTimeoutTask to the protobuf v3 wire format -func (val *ScheduleToStartTimeoutTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ScheduleToStartTimeoutTask from the protobuf v3 wire format -func (val *ScheduleToStartTimeoutTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ScheduleToStartTimeoutTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ScheduleToStartTimeoutTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ScheduleToStartTimeoutTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ScheduleToStartTimeoutTask - switch t := that.(type) { - case *ScheduleToStartTimeoutTask: - that1 = t - case ScheduleToStartTimeoutTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type ScheduleToCloseTimeoutTask to the protobuf v3 wire format -func (val *ScheduleToCloseTimeoutTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type ScheduleToCloseTimeoutTask from the protobuf v3 wire format -func (val *ScheduleToCloseTimeoutTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *ScheduleToCloseTimeoutTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two ScheduleToCloseTimeoutTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *ScheduleToCloseTimeoutTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *ScheduleToCloseTimeoutTask - switch t := that.(type) { - case *ScheduleToCloseTimeoutTask: - that1 = t - case ScheduleToCloseTimeoutTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type StartToCloseTimeoutTask to the protobuf v3 wire format -func (val *StartToCloseTimeoutTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type StartToCloseTimeoutTask from the protobuf v3 wire format -func (val *StartToCloseTimeoutTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *StartToCloseTimeoutTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two StartToCloseTimeoutTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *StartToCloseTimeoutTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *StartToCloseTimeoutTask - switch t := that.(type) { - case *StartToCloseTimeoutTask: - that1 = t - case StartToCloseTimeoutTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type HeartbeatTimeoutTask to the protobuf v3 wire format -func (val *HeartbeatTimeoutTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type HeartbeatTimeoutTask from the protobuf v3 wire format -func (val *HeartbeatTimeoutTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *HeartbeatTimeoutTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two HeartbeatTimeoutTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *HeartbeatTimeoutTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *HeartbeatTimeoutTask - switch t := that.(type) { - case *HeartbeatTimeoutTask: - that1 = t - case HeartbeatTimeoutTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/activity/gen/activitypb/v1/tasks.pb.go b/chasm/lib/activity/gen/activitypb/v1/tasks.pb.go deleted file mode 100644 index 796574e7db..0000000000 --- a/chasm/lib/activity/gen/activitypb/v1/tasks.pb.go +++ /dev/null @@ -1,307 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/activity/proto/v1/tasks.proto - -package activitypb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type ActivityDispatchTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. - Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ActivityDispatchTask) Reset() { - *x = ActivityDispatchTask{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ActivityDispatchTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ActivityDispatchTask) ProtoMessage() {} - -func (x *ActivityDispatchTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ActivityDispatchTask.ProtoReflect.Descriptor instead. -func (*ActivityDispatchTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{0} -} - -func (x *ActivityDispatchTask) GetStamp() int32 { - if x != nil { - return x.Stamp - } - return 0 -} - -type ScheduleToStartTimeoutTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. - Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ScheduleToStartTimeoutTask) Reset() { - *x = ScheduleToStartTimeoutTask{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ScheduleToStartTimeoutTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScheduleToStartTimeoutTask) ProtoMessage() {} - -func (x *ScheduleToStartTimeoutTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScheduleToStartTimeoutTask.ProtoReflect.Descriptor instead. -func (*ScheduleToStartTimeoutTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{1} -} - -func (x *ScheduleToStartTimeoutTask) GetStamp() int32 { - if x != nil { - return x.Stamp - } - return 0 -} - -type ScheduleToCloseTimeoutTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ScheduleToCloseTimeoutTask) Reset() { - *x = ScheduleToCloseTimeoutTask{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ScheduleToCloseTimeoutTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ScheduleToCloseTimeoutTask) ProtoMessage() {} - -func (x *ScheduleToCloseTimeoutTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ScheduleToCloseTimeoutTask.ProtoReflect.Descriptor instead. -func (*ScheduleToCloseTimeoutTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{2} -} - -type StartToCloseTimeoutTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. - Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StartToCloseTimeoutTask) Reset() { - *x = StartToCloseTimeoutTask{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StartToCloseTimeoutTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StartToCloseTimeoutTask) ProtoMessage() {} - -func (x *StartToCloseTimeoutTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StartToCloseTimeoutTask.ProtoReflect.Descriptor instead. -func (*StartToCloseTimeoutTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{3} -} - -func (x *StartToCloseTimeoutTask) GetStamp() int32 { - if x != nil { - return x.Stamp - } - return 0 -} - -// HeartbeatTimeoutTask is a pure task that enforces heartbeat timeouts. -type HeartbeatTimeoutTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. - Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *HeartbeatTimeoutTask) Reset() { - *x = HeartbeatTimeoutTask{} - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *HeartbeatTimeoutTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*HeartbeatTimeoutTask) ProtoMessage() {} - -func (x *HeartbeatTimeoutTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use HeartbeatTimeoutTask.ProtoReflect.Descriptor instead. -func (*HeartbeatTimeoutTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{4} -} - -func (x *HeartbeatTimeoutTask) GetStamp() int32 { - if x != nil { - return x.Stamp - } - return 0 -} - -var File_temporal_server_chasm_lib_activity_proto_v1_tasks_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc = "" + - "\n" + - "7temporal/server/chasm/lib/activity/proto/v1/tasks.proto\x12+temporal.server.chasm.lib.activity.proto.v1\",\n" + - "\x14ActivityDispatchTask\x12\x14\n" + - "\x05stamp\x18\x01 \x01(\x05R\x05stamp\"2\n" + - "\x1aScheduleToStartTimeoutTask\x12\x14\n" + - "\x05stamp\x18\x01 \x01(\x05R\x05stamp\"\x1c\n" + - "\x1aScheduleToCloseTimeoutTask\"/\n" + - "\x17StartToCloseTimeoutTask\x12\x14\n" + - "\x05stamp\x18\x01 \x01(\x05R\x05stamp\",\n" + - "\x14HeartbeatTimeoutTask\x12\x14\n" + - "\x05stamp\x18\x01 \x01(\x05R\x05stampBDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescData -} - -var file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_goTypes = []any{ - (*ActivityDispatchTask)(nil), // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityDispatchTask - (*ScheduleToStartTimeoutTask)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.ScheduleToStartTimeoutTask - (*ScheduleToCloseTimeoutTask)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.ScheduleToCloseTimeoutTask - (*StartToCloseTimeoutTask)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.StartToCloseTimeoutTask - (*HeartbeatTimeoutTask)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.HeartbeatTimeoutTask -} -var file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_init() } -func file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_init() { - if File_temporal_server_chasm_lib_activity_proto_v1_tasks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_activity_proto_v1_tasks_proto = out.File - file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_goTypes = nil - file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_depIdxs = nil -} diff --git a/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go b/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go deleted file mode 100644 index 4e8000266a..0000000000 --- a/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package callbackspb - -import ( - "fmt" - - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type CallbackState to the protobuf v3 wire format -func (val *CallbackState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type CallbackState from the protobuf v3 wire format -func (val *CallbackState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *CallbackState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two CallbackState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *CallbackState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *CallbackState - switch t := that.(type) { - case *CallbackState: - that1 = t - case CallbackState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type Callback to the protobuf v3 wire format -func (val *Callback) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type Callback from the protobuf v3 wire format -func (val *Callback) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *Callback) Size() int { - return proto.Size(val) -} - -// Equal returns whether two Callback values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *Callback) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *Callback - switch t := that.(type) { - case *Callback: - that1 = t - case Callback: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -var ( - CallbackStatus_shorthandValue = map[string]int32{ - "Unspecified": 0, - "Standby": 1, - "Scheduled": 2, - "BackingOff": 3, - "Failed": 4, - "Succeeded": 5, - } -) - -// CallbackStatusFromString parses a CallbackStatus value from either the protojson -// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to CallbackStatus -func CallbackStatusFromString(s string) (CallbackStatus, error) { - if v, ok := CallbackStatus_value[s]; ok { - return CallbackStatus(v), nil - } else if v, ok := CallbackStatus_shorthandValue[s]; ok { - return CallbackStatus(v), nil - } - return CallbackStatus(0), fmt.Errorf("%s is not a valid CallbackStatus", s) -} diff --git a/chasm/lib/callback/gen/callbackpb/v1/message.pb.go b/chasm/lib/callback/gen/callbackpb/v1/message.pb.go deleted file mode 100644 index d998ef3fc8..0000000000 --- a/chasm/lib/callback/gen/callbackpb/v1/message.pb.go +++ /dev/null @@ -1,490 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/callback/proto/v1/message.proto - -package callbackspb - -import ( - reflect "reflect" - "strconv" - sync "sync" - unsafe "unsafe" - - v11 "go.temporal.io/api/common/v1" - v1 "go.temporal.io/api/failure/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Status of a callback. -type CallbackStatus int32 - -const ( - // Default value, unspecified state. - CALLBACK_STATUS_UNSPECIFIED CallbackStatus = 0 - // Callback is standing by, waiting to be triggered. - CALLBACK_STATUS_STANDBY CallbackStatus = 1 - // Callback is in the queue waiting to be executed or is currently executing. - CALLBACK_STATUS_SCHEDULED CallbackStatus = 2 - // Callback has failed with a retryable error and is backing off before the next attempt. - CALLBACK_STATUS_BACKING_OFF CallbackStatus = 3 - // Callback has failed. - CALLBACK_STATUS_FAILED CallbackStatus = 4 - // Callback has succeeded. - CALLBACK_STATUS_SUCCEEDED CallbackStatus = 5 -) - -// Enum value maps for CallbackStatus. -var ( - CallbackStatus_name = map[int32]string{ - 0: "CALLBACK_STATUS_UNSPECIFIED", - 1: "CALLBACK_STATUS_STANDBY", - 2: "CALLBACK_STATUS_SCHEDULED", - 3: "CALLBACK_STATUS_BACKING_OFF", - 4: "CALLBACK_STATUS_FAILED", - 5: "CALLBACK_STATUS_SUCCEEDED", - } - CallbackStatus_value = map[string]int32{ - "CALLBACK_STATUS_UNSPECIFIED": 0, - "CALLBACK_STATUS_STANDBY": 1, - "CALLBACK_STATUS_SCHEDULED": 2, - "CALLBACK_STATUS_BACKING_OFF": 3, - "CALLBACK_STATUS_FAILED": 4, - "CALLBACK_STATUS_SUCCEEDED": 5, - } -) - -func (x CallbackStatus) Enum() *CallbackStatus { - p := new(CallbackStatus) - *p = x - return p -} - -func (x CallbackStatus) String() string { - switch x { - case CALLBACK_STATUS_UNSPECIFIED: - return "Unspecified" - case CALLBACK_STATUS_STANDBY: - return "Standby" - case CALLBACK_STATUS_SCHEDULED: - return "Scheduled" - case CALLBACK_STATUS_BACKING_OFF: - return "BackingOff" - case CALLBACK_STATUS_FAILED: - return "Failed" - case CALLBACK_STATUS_SUCCEEDED: - return "Succeeded" - default: - return strconv.Itoa(int(x)) - } - -} - -func (CallbackStatus) Descriptor() protoreflect.EnumDescriptor { - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes[0].Descriptor() -} - -func (CallbackStatus) Type() protoreflect.EnumType { - return &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes[0] -} - -func (x CallbackStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CallbackStatus.Descriptor instead. -func (CallbackStatus) EnumDescriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{0} -} - -type CallbackState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Information on how this callback should be invoked (e.g. its URL and type). - Callback *Callback `protobuf:"bytes,1,opt,name=callback,proto3" json:"callback,omitempty"` - // The time when the callback was registered. - RegistrationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=registration_time,json=registrationTime,proto3" json:"registration_time,omitempty"` - Status CallbackStatus `protobuf:"varint,4,opt,name=status,proto3,enum=temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatus" json:"status,omitempty"` - // The number of attempts made to deliver the callback. - // This number represents a minimum bound since the attempt is incremented after the callback request completes. - Attempt int32 `protobuf:"varint,5,opt,name=attempt,proto3" json:"attempt,omitempty"` - // The time when the last attempt completed. - LastAttemptCompleteTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_attempt_complete_time,json=lastAttemptCompleteTime,proto3" json:"last_attempt_complete_time,omitempty"` - // The last attempt's failure, if any. - LastAttemptFailure *v1.Failure `protobuf:"bytes,7,opt,name=last_attempt_failure,json=lastAttemptFailure,proto3" json:"last_attempt_failure,omitempty"` - // The time when the next attempt is scheduled. - // NOTE (seankane): this field might go away in the future, discussion: - // https://github.com/temporalio/temporal/pull/8473#discussion_r2427348436 - NextAttemptScheduleTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=next_attempt_schedule_time,json=nextAttemptScheduleTime,proto3" json:"next_attempt_schedule_time,omitempty"` - // Request ID that added the callback. - RequestId string `protobuf:"bytes,9,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CallbackState) Reset() { - *x = CallbackState{} - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CallbackState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CallbackState) ProtoMessage() {} - -func (x *CallbackState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CallbackState.ProtoReflect.Descriptor instead. -func (*CallbackState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{0} -} - -func (x *CallbackState) GetCallback() *Callback { - if x != nil { - return x.Callback - } - return nil -} - -func (x *CallbackState) GetRegistrationTime() *timestamppb.Timestamp { - if x != nil { - return x.RegistrationTime - } - return nil -} - -func (x *CallbackState) GetStatus() CallbackStatus { - if x != nil { - return x.Status - } - return CALLBACK_STATUS_UNSPECIFIED -} - -func (x *CallbackState) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -func (x *CallbackState) GetLastAttemptCompleteTime() *timestamppb.Timestamp { - if x != nil { - return x.LastAttemptCompleteTime - } - return nil -} - -func (x *CallbackState) GetLastAttemptFailure() *v1.Failure { - if x != nil { - return x.LastAttemptFailure - } - return nil -} - -func (x *CallbackState) GetNextAttemptScheduleTime() *timestamppb.Timestamp { - if x != nil { - return x.NextAttemptScheduleTime - } - return nil -} - -func (x *CallbackState) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -type Callback struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Variant: - // - // *Callback_Nexus_ - Variant isCallback_Variant `protobuf_oneof:"variant"` - Links []*v11.Link `protobuf:"bytes,100,rep,name=links,proto3" json:"links,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Callback) Reset() { - *x = Callback{} - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Callback) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Callback) ProtoMessage() {} - -func (x *Callback) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Callback.ProtoReflect.Descriptor instead. -func (*Callback) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{1} -} - -func (x *Callback) GetVariant() isCallback_Variant { - if x != nil { - return x.Variant - } - return nil -} - -func (x *Callback) GetNexus() *Callback_Nexus { - if x != nil { - if x, ok := x.Variant.(*Callback_Nexus_); ok { - return x.Nexus - } - } - return nil -} - -func (x *Callback) GetLinks() []*v11.Link { - if x != nil { - return x.Links - } - return nil -} - -type isCallback_Variant interface { - isCallback_Variant() -} - -type Callback_Nexus_ struct { - Nexus *Callback_Nexus `protobuf:"bytes,2,opt,name=nexus,proto3,oneof"` -} - -func (*Callback_Nexus_) isCallback_Variant() {} - -// Trigger for when the workflow is closed. -type CallbackState_WorkflowClosed struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CallbackState_WorkflowClosed) Reset() { - *x = CallbackState_WorkflowClosed{} - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CallbackState_WorkflowClosed) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CallbackState_WorkflowClosed) ProtoMessage() {} - -func (x *CallbackState_WorkflowClosed) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CallbackState_WorkflowClosed.ProtoReflect.Descriptor instead. -func (*CallbackState_WorkflowClosed) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{0, 0} -} - -type Callback_Nexus struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Callback URL. - // (-- api-linter: core::0140::uri=disabled - // - // aip.dev/not-precedent: Not respecting aip here. --) - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - // Header to attach to callback request. - Header map[string]string `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Callback_Nexus) Reset() { - *x = Callback_Nexus{} - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Callback_Nexus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Callback_Nexus) ProtoMessage() {} - -func (x *Callback_Nexus) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Callback_Nexus.ProtoReflect.Descriptor instead. -func (*Callback_Nexus) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{1, 0} -} - -func (x *Callback_Nexus) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *Callback_Nexus) GetHeader() map[string]string { - if x != nil { - return x.Header - } - return nil -} - -var File_temporal_server_chasm_lib_callback_proto_v1_message_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc = "" + - "\n" + - "9temporal/server/chasm/lib/callback/proto/v1/message.proto\x12,temporal.server.chasm.lib.callbacks.proto.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\"\xd3\x04\n" + - "\rCallbackState\x12R\n" + - "\bcallback\x18\x01 \x01(\v26.temporal.server.chasm.lib.callbacks.proto.v1.CallbackR\bcallback\x12G\n" + - "\x11registration_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x10registrationTime\x12T\n" + - "\x06status\x18\x04 \x01(\x0e2<.temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatusR\x06status\x12\x18\n" + - "\aattempt\x18\x05 \x01(\x05R\aattempt\x12W\n" + - "\x1alast_attempt_complete_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x17lastAttemptCompleteTime\x12R\n" + - "\x14last_attempt_failure\x18\a \x01(\v2 .temporal.api.failure.v1.FailureR\x12lastAttemptFailure\x12W\n" + - "\x1anext_attempt_schedule_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x17nextAttemptScheduleTime\x12\x1d\n" + - "\n" + - "request_id\x18\t \x01(\tR\trequestId\x1a\x10\n" + - "\x0eWorkflowClosed\"\xde\x02\n" + - "\bCallback\x12T\n" + - "\x05nexus\x18\x02 \x01(\v2<.temporal.server.chasm.lib.callbacks.proto.v1.Callback.NexusH\x00R\x05nexus\x122\n" + - "\x05links\x18d \x03(\v2\x1c.temporal.api.common.v1.LinkR\x05links\x1a\xb6\x01\n" + - "\x05Nexus\x12\x10\n" + - "\x03url\x18\x01 \x01(\tR\x03url\x12`\n" + - "\x06header\x18\x02 \x03(\v2H.temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.HeaderEntryR\x06header\x1a9\n" + - "\vHeaderEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\t\n" + - "\avariantJ\x04\b\x01\x10\x02*\xc9\x01\n" + - "\x0eCallbackStatus\x12\x1f\n" + - "\x1bCALLBACK_STATUS_UNSPECIFIED\x10\x00\x12\x1b\n" + - "\x17CALLBACK_STATUS_STANDBY\x10\x01\x12\x1d\n" + - "\x19CALLBACK_STATUS_SCHEDULED\x10\x02\x12\x1f\n" + - "\x1bCALLBACK_STATUS_BACKING_OFF\x10\x03\x12\x1a\n" + - "\x16CALLBACK_STATUS_FAILED\x10\x04\x12\x1d\n" + - "\x19CALLBACK_STATUS_SUCCEEDED\x10\x05BGZEgo.temporal.io/server/chasm/lib/callbacks/gen/callbackspb;callbackspbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescData -} - -var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_goTypes = []any{ - (CallbackStatus)(0), // 0: temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatus - (*CallbackState)(nil), // 1: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState - (*Callback)(nil), // 2: temporal.server.chasm.lib.callbacks.proto.v1.Callback - (*CallbackState_WorkflowClosed)(nil), // 3: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.WorkflowClosed - (*Callback_Nexus)(nil), // 4: temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus - nil, // 5: temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.HeaderEntry - (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp - (*v1.Failure)(nil), // 7: temporal.api.failure.v1.Failure - (*v11.Link)(nil), // 8: temporal.api.common.v1.Link -} -var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_depIdxs = []int32{ - 2, // 0: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.callback:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.Callback - 6, // 1: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.registration_time:type_name -> google.protobuf.Timestamp - 0, // 2: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.status:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatus - 6, // 3: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 7, // 4: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 6, // 5: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 4, // 6: temporal.server.chasm.lib.callbacks.proto.v1.Callback.nexus:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus - 8, // 7: temporal.server.chasm.lib.callbacks.proto.v1.Callback.links:type_name -> temporal.api.common.v1.Link - 5, // 8: temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.header:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.HeaderEntry - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_callback_proto_v1_message_proto_init() } -func file_temporal_server_chasm_lib_callback_proto_v1_message_proto_init() { - if File_temporal_server_chasm_lib_callback_proto_v1_message_proto != nil { - return - } - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[1].OneofWrappers = []any{ - (*Callback_Nexus_)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc)), - NumEnums: 1, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_depIdxs, - EnumInfos: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes, - MessageInfos: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_callback_proto_v1_message_proto = out.File - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_goTypes = nil - file_temporal_server_chasm_lib_callback_proto_v1_message_proto_depIdxs = nil -} diff --git a/chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go b/chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go deleted file mode 100644 index a0181447c6..0000000000 --- a/chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package callbackspb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type InvocationTask to the protobuf v3 wire format -func (val *InvocationTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvocationTask from the protobuf v3 wire format -func (val *InvocationTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvocationTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvocationTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvocationTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvocationTask - switch t := that.(type) { - case *InvocationTask: - that1 = t - case InvocationTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type BackoffTask to the protobuf v3 wire format -func (val *BackoffTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type BackoffTask from the protobuf v3 wire format -func (val *BackoffTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *BackoffTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two BackoffTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *BackoffTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *BackoffTask - switch t := that.(type) { - case *BackoffTask: - that1 = t - case BackoffTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go b/chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go deleted file mode 100644 index 7354a359c8..0000000000 --- a/chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/callback/proto/v1/tasks.proto - -package callbackspb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type InvocationTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The attempt number for this invocation. - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvocationTask) Reset() { - *x = InvocationTask{} - mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvocationTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvocationTask) ProtoMessage() {} - -func (x *InvocationTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvocationTask.ProtoReflect.Descriptor instead. -func (*InvocationTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescGZIP(), []int{0} -} - -func (x *InvocationTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -type BackoffTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The attempt number for this invocation. - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BackoffTask) Reset() { - *x = BackoffTask{} - mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BackoffTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackoffTask) ProtoMessage() {} - -func (x *BackoffTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackoffTask.ProtoReflect.Descriptor instead. -func (*BackoffTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescGZIP(), []int{1} -} - -func (x *BackoffTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -var File_temporal_server_chasm_lib_callback_proto_v1_tasks_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc = "" + - "\n" + - "7temporal/server/chasm/lib/callback/proto/v1/tasks.proto\x12,temporal.server.chasm.lib.callbacks.proto.v1\"*\n" + - "\x0eInvocationTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattempt\"'\n" + - "\vBackoffTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattemptBGZEgo.temporal.io/server/chasm/lib/callbacks/gen/callbackspb;callbackspbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescData -} - -var file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_goTypes = []any{ - (*InvocationTask)(nil), // 0: temporal.server.chasm.lib.callbacks.proto.v1.InvocationTask - (*BackoffTask)(nil), // 1: temporal.server.chasm.lib.callbacks.proto.v1.BackoffTask -} -var file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_init() } -func file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_init() { - if File_temporal_server_chasm_lib_callback_proto_v1_tasks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_callback_proto_v1_tasks_proto = out.File - file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_goTypes = nil - file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_depIdxs = nil -} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go deleted file mode 100644 index ea15136ec8..0000000000 --- a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package nexusoperationpb - -import ( - "fmt" - - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type OperationState to the protobuf v3 wire format -func (val *OperationState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type OperationState from the protobuf v3 wire format -func (val *OperationState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *OperationState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two OperationState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *OperationState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *OperationState - switch t := that.(type) { - case *OperationState: - that1 = t - case OperationState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type CancellationState to the protobuf v3 wire format -func (val *CancellationState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type CancellationState from the protobuf v3 wire format -func (val *CancellationState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *CancellationState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two CancellationState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *CancellationState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *CancellationState - switch t := that.(type) { - case *CancellationState: - that1 = t - case CancellationState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -var ( - OperationStatus_shorthandValue = map[string]int32{ - "Unspecified": 0, - "Scheduled": 1, - "BackingOff": 2, - "Started": 3, - "Succeeded": 4, - "Failed": 5, - "Canceled": 6, - "TimedOut": 7, - } -) - -// OperationStatusFromString parses a OperationStatus value from either the protojson -// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to OperationStatus -func OperationStatusFromString(s string) (OperationStatus, error) { - if v, ok := OperationStatus_value[s]; ok { - return OperationStatus(v), nil - } else if v, ok := OperationStatus_shorthandValue[s]; ok { - return OperationStatus(v), nil - } - return OperationStatus(0), fmt.Errorf("%s is not a valid OperationStatus", s) -} - -var ( - CancellationStatus_shorthandValue = map[string]int32{ - "Unspecified": 0, - "Scheduled": 1, - "BackingOff": 2, - "Succeeded": 3, - "Failed": 4, - "TimedOut": 5, - "Blocked": 6, - } -) - -// CancellationStatusFromString parses a CancellationStatus value from either the protojson -// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to CancellationStatus -func CancellationStatusFromString(s string) (CancellationStatus, error) { - if v, ok := CancellationStatus_value[s]; ok { - return CancellationStatus(v), nil - } else if v, ok := CancellationStatus_shorthandValue[s]; ok { - return CancellationStatus(v), nil - } - return CancellationStatus(0), fmt.Errorf("%s is not a valid CancellationStatus", s) -} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go deleted file mode 100644 index 4b6f8fd371..0000000000 --- a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go +++ /dev/null @@ -1,375 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/nexusoperation/proto/v1/operation.proto - -package nexusoperationpb - -import ( - reflect "reflect" - "strconv" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type OperationStatus int32 - -const ( - // Default value, unspecified status. - OPERATION_STATUS_UNSPECIFIED OperationStatus = 0 - // Operation is in the queue waiting to be executed or is currently executing. - OPERATION_STATUS_SCHEDULED OperationStatus = 1 - // Operation has failed with a retryable error and is backing off before the next attempt. - OPERATION_STATUS_BACKING_OFF OperationStatus = 2 - // Operation was started and will complete asynchronously. - OPERATION_STATUS_STARTED OperationStatus = 3 - // Operation succeeded. - // This may happen either as a response to a start request or as reported via callback. - OPERATION_STATUS_SUCCEEDED OperationStatus = 4 - // Operation failed either when a start request encounters a non-retryable error or as reported via callback. - OPERATION_STATUS_FAILED OperationStatus = 5 - // Operation completed as canceled (may have not ever been delivered). - // This may happen either as a response to a start request or as reported via callback. - OPERATION_STATUS_CANCELED OperationStatus = 6 - // Operation timed out - exceeded the user supplied schedule-to-close timeout. - // Any attempts to complete the operation in this status will be ignored. - OPERATION_STATUS_TIMED_OUT OperationStatus = 7 -) - -// Enum value maps for OperationStatus. -var ( - OperationStatus_name = map[int32]string{ - 0: "OPERATION_STATUS_UNSPECIFIED", - 1: "OPERATION_STATUS_SCHEDULED", - 2: "OPERATION_STATUS_BACKING_OFF", - 3: "OPERATION_STATUS_STARTED", - 4: "OPERATION_STATUS_SUCCEEDED", - 5: "OPERATION_STATUS_FAILED", - 6: "OPERATION_STATUS_CANCELED", - 7: "OPERATION_STATUS_TIMED_OUT", - } - OperationStatus_value = map[string]int32{ - "OPERATION_STATUS_UNSPECIFIED": 0, - "OPERATION_STATUS_SCHEDULED": 1, - "OPERATION_STATUS_BACKING_OFF": 2, - "OPERATION_STATUS_STARTED": 3, - "OPERATION_STATUS_SUCCEEDED": 4, - "OPERATION_STATUS_FAILED": 5, - "OPERATION_STATUS_CANCELED": 6, - "OPERATION_STATUS_TIMED_OUT": 7, - } -) - -func (x OperationStatus) Enum() *OperationStatus { - p := new(OperationStatus) - *p = x - return p -} - -func (x OperationStatus) String() string { - switch x { - case OPERATION_STATUS_UNSPECIFIED: - return "Unspecified" - case OPERATION_STATUS_SCHEDULED: - return "Scheduled" - case OPERATION_STATUS_BACKING_OFF: - return "BackingOff" - case OPERATION_STATUS_STARTED: - return "Started" - case OPERATION_STATUS_SUCCEEDED: - return "Succeeded" - case OPERATION_STATUS_FAILED: - return "Failed" - case OPERATION_STATUS_CANCELED: - return "Canceled" - case OPERATION_STATUS_TIMED_OUT: - return "TimedOut" - default: - return strconv.Itoa(int(x)) - } - -} - -func (OperationStatus) Descriptor() protoreflect.EnumDescriptor { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[0].Descriptor() -} - -func (OperationStatus) Type() protoreflect.EnumType { - return &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[0] -} - -func (x OperationStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OperationStatus.Descriptor instead. -func (OperationStatus) EnumDescriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{0} -} - -type CancellationStatus int32 - -const ( - // Default value, unspecified status. - CANCELLATION_STATUS_UNSPECIFIED CancellationStatus = 0 - // Cancellation request is in the queue waiting to be executed or is currently executing. - CANCELLATION_STATUS_SCHEDULED CancellationStatus = 1 - // Cancellation request has failed with a retryable error and is backing off before the next attempt. - CANCELLATION_STATUS_BACKING_OFF CancellationStatus = 2 - // Cancellation request succeeded. - CANCELLATION_STATUS_SUCCEEDED CancellationStatus = 3 - // Cancellation request failed with a non-retryable error. - CANCELLATION_STATUS_FAILED CancellationStatus = 4 - // The associated operation timed out - exceeded the user supplied schedule-to-close timeout. - CANCELLATION_STATUS_TIMED_OUT CancellationStatus = 5 - // Cancellation request is blocked (eg: by circuit breaker). - CANCELLATION_STATUS_BLOCKED CancellationStatus = 6 -) - -// Enum value maps for CancellationStatus. -var ( - CancellationStatus_name = map[int32]string{ - 0: "CANCELLATION_STATUS_UNSPECIFIED", - 1: "CANCELLATION_STATUS_SCHEDULED", - 2: "CANCELLATION_STATUS_BACKING_OFF", - 3: "CANCELLATION_STATUS_SUCCEEDED", - 4: "CANCELLATION_STATUS_FAILED", - 5: "CANCELLATION_STATUS_TIMED_OUT", - 6: "CANCELLATION_STATUS_BLOCKED", - } - CancellationStatus_value = map[string]int32{ - "CANCELLATION_STATUS_UNSPECIFIED": 0, - "CANCELLATION_STATUS_SCHEDULED": 1, - "CANCELLATION_STATUS_BACKING_OFF": 2, - "CANCELLATION_STATUS_SUCCEEDED": 3, - "CANCELLATION_STATUS_FAILED": 4, - "CANCELLATION_STATUS_TIMED_OUT": 5, - "CANCELLATION_STATUS_BLOCKED": 6, - } -) - -func (x CancellationStatus) Enum() *CancellationStatus { - p := new(CancellationStatus) - *p = x - return p -} - -func (x CancellationStatus) String() string { - switch x { - case CANCELLATION_STATUS_UNSPECIFIED: - return "Unspecified" - case CANCELLATION_STATUS_SCHEDULED: - return "Scheduled" - case CANCELLATION_STATUS_BACKING_OFF: - return "BackingOff" - case CANCELLATION_STATUS_SUCCEEDED: - return "Succeeded" - case CANCELLATION_STATUS_FAILED: - return "Failed" - case CANCELLATION_STATUS_TIMED_OUT: - return "TimedOut" - case CANCELLATION_STATUS_BLOCKED: - return "Blocked" - default: - return strconv.Itoa(int(x)) - } - -} - -func (CancellationStatus) Descriptor() protoreflect.EnumDescriptor { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[1].Descriptor() -} - -func (CancellationStatus) Type() protoreflect.EnumType { - return &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[1] -} - -func (x CancellationStatus) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CancellationStatus.Descriptor instead. -func (CancellationStatus) EnumDescriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{1} -} - -type OperationState struct { - state protoimpl.MessageState `protogen:"open.v1"` - Status OperationStatus `protobuf:"varint,1,opt,name=status,proto3,enum=temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatus" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OperationState) Reset() { - *x = OperationState{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OperationState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OperationState) ProtoMessage() {} - -func (x *OperationState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OperationState.ProtoReflect.Descriptor instead. -func (*OperationState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{0} -} - -func (x *OperationState) GetStatus() OperationStatus { - if x != nil { - return x.Status - } - return OPERATION_STATUS_UNSPECIFIED -} - -type CancellationState struct { - state protoimpl.MessageState `protogen:"open.v1"` - Status CancellationStatus `protobuf:"varint,1,opt,name=status,proto3,enum=temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatus" json:"status,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancellationState) Reset() { - *x = CancellationState{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancellationState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancellationState) ProtoMessage() {} - -func (x *CancellationState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancellationState.ProtoReflect.Descriptor instead. -func (*CancellationState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{1} -} - -func (x *CancellationState) GetStatus() CancellationStatus { - if x != nil { - return x.Status - } - return CANCELLATION_STATUS_UNSPECIFIED -} - -var File_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc = "" + - "\n" + - "Atemporal/server/chasm/lib/nexusoperation/proto/v1/operation.proto\x121temporal.server.chasm.lib.nexusoperation.proto.v1\"l\n" + - "\x0eOperationState\x12Z\n" + - "\x06status\x18\x01 \x01(\x0e2B.temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatusR\x06status\"r\n" + - "\x11CancellationState\x12]\n" + - "\x06status\x18\x01 \x01(\x0e2E.temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatusR\x06status*\x8f\x02\n" + - "\x0fOperationStatus\x12 \n" + - "\x1cOPERATION_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n" + - "\x1aOPERATION_STATUS_SCHEDULED\x10\x01\x12 \n" + - "\x1cOPERATION_STATUS_BACKING_OFF\x10\x02\x12\x1c\n" + - "\x18OPERATION_STATUS_STARTED\x10\x03\x12\x1e\n" + - "\x1aOPERATION_STATUS_SUCCEEDED\x10\x04\x12\x1b\n" + - "\x17OPERATION_STATUS_FAILED\x10\x05\x12\x1d\n" + - "\x19OPERATION_STATUS_CANCELED\x10\x06\x12\x1e\n" + - "\x1aOPERATION_STATUS_TIMED_OUT\x10\a*\x88\x02\n" + - "\x12CancellationStatus\x12#\n" + - "\x1fCANCELLATION_STATUS_UNSPECIFIED\x10\x00\x12!\n" + - "\x1dCANCELLATION_STATUS_SCHEDULED\x10\x01\x12#\n" + - "\x1fCANCELLATION_STATUS_BACKING_OFF\x10\x02\x12!\n" + - "\x1dCANCELLATION_STATUS_SUCCEEDED\x10\x03\x12\x1e\n" + - "\x1aCANCELLATION_STATUS_FAILED\x10\x04\x12!\n" + - "\x1dCANCELLATION_STATUS_TIMED_OUT\x10\x05\x12\x1f\n" + - "\x1bCANCELLATION_STATUS_BLOCKED\x10\x06BVZTgo.temporal.io/server/chasm/lib/nexusoperation/gen/nexusoperationpb;nexusoperationpbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescData -} - -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_goTypes = []any{ - (OperationStatus)(0), // 0: temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatus - (CancellationStatus)(0), // 1: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatus - (*OperationState)(nil), // 2: temporal.server.chasm.lib.nexusoperation.proto.v1.OperationState - (*CancellationState)(nil), // 3: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationState -} -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_depIdxs = []int32{ - 0, // 0: temporal.server.chasm.lib.nexusoperation.proto.v1.OperationState.status:type_name -> temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatus - 1, // 1: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationState.status:type_name -> temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatus - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_init() } -func file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_init() { - if File_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc)), - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_depIdxs, - EnumInfos: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes, - MessageInfos: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto = out.File - file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_goTypes = nil - file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_depIdxs = nil -} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go deleted file mode 100644 index 7538ebde64..0000000000 --- a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package nexusoperationpb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type InvocationTask to the protobuf v3 wire format -func (val *InvocationTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvocationTask from the protobuf v3 wire format -func (val *InvocationTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvocationTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvocationTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvocationTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvocationTask - switch t := that.(type) { - case *InvocationTask: - that1 = t - case InvocationTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type InvocationTimeoutTask to the protobuf v3 wire format -func (val *InvocationTimeoutTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvocationTimeoutTask from the protobuf v3 wire format -func (val *InvocationTimeoutTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvocationTimeoutTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvocationTimeoutTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvocationTimeoutTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvocationTimeoutTask - switch t := that.(type) { - case *InvocationTimeoutTask: - that1 = t - case InvocationTimeoutTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type InvocationBackoffTask to the protobuf v3 wire format -func (val *InvocationBackoffTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvocationBackoffTask from the protobuf v3 wire format -func (val *InvocationBackoffTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvocationBackoffTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvocationBackoffTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvocationBackoffTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvocationBackoffTask - switch t := that.(type) { - case *InvocationBackoffTask: - that1 = t - case InvocationBackoffTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type CancellationTask to the protobuf v3 wire format -func (val *CancellationTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type CancellationTask from the protobuf v3 wire format -func (val *CancellationTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *CancellationTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two CancellationTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *CancellationTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *CancellationTask - switch t := that.(type) { - case *CancellationTask: - that1 = t - case CancellationTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type CancellationBackoffTask to the protobuf v3 wire format -func (val *CancellationBackoffTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type CancellationBackoffTask from the protobuf v3 wire format -func (val *CancellationBackoffTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *CancellationBackoffTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two CancellationBackoffTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *CancellationBackoffTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *CancellationBackoffTask - switch t := that.(type) { - case *CancellationBackoffTask: - that1 = t - case CancellationBackoffTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go deleted file mode 100644 index 77b2d7b70d..0000000000 --- a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/nexusoperation/proto/v1/tasks.proto - -package nexusoperationpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type InvocationTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvocationTask) Reset() { - *x = InvocationTask{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvocationTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvocationTask) ProtoMessage() {} - -func (x *InvocationTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvocationTask.ProtoReflect.Descriptor instead. -func (*InvocationTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{0} -} - -func (x *InvocationTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -type InvocationTimeoutTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvocationTimeoutTask) Reset() { - *x = InvocationTimeoutTask{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvocationTimeoutTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvocationTimeoutTask) ProtoMessage() {} - -func (x *InvocationTimeoutTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvocationTimeoutTask.ProtoReflect.Descriptor instead. -func (*InvocationTimeoutTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{1} -} - -func (x *InvocationTimeoutTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -type InvocationBackoffTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvocationBackoffTask) Reset() { - *x = InvocationBackoffTask{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvocationBackoffTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvocationBackoffTask) ProtoMessage() {} - -func (x *InvocationBackoffTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvocationBackoffTask.ProtoReflect.Descriptor instead. -func (*InvocationBackoffTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{2} -} - -func (x *InvocationBackoffTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -type CancellationTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancellationTask) Reset() { - *x = CancellationTask{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancellationTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancellationTask) ProtoMessage() {} - -func (x *CancellationTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancellationTask.ProtoReflect.Descriptor instead. -func (*CancellationTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{3} -} - -func (x *CancellationTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -type CancellationBackoffTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *CancellationBackoffTask) Reset() { - *x = CancellationBackoffTask{} - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *CancellationBackoffTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CancellationBackoffTask) ProtoMessage() {} - -func (x *CancellationBackoffTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CancellationBackoffTask.ProtoReflect.Descriptor instead. -func (*CancellationBackoffTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{4} -} - -func (x *CancellationBackoffTask) GetAttempt() int32 { - if x != nil { - return x.Attempt - } - return 0 -} - -var File_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc = "" + - "\n" + - "=temporal/server/chasm/lib/nexusoperation/proto/v1/tasks.proto\x121temporal.server.chasm.lib.nexusoperation.proto.v1\"*\n" + - "\x0eInvocationTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattempt\"1\n" + - "\x15InvocationTimeoutTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattempt\"1\n" + - "\x15InvocationBackoffTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattempt\",\n" + - "\x10CancellationTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattempt\"3\n" + - "\x17CancellationBackoffTask\x12\x18\n" + - "\aattempt\x18\x01 \x01(\x05R\aattemptBVZTgo.temporal.io/server/chasm/lib/nexusoperation/gen/nexusoperationpb;nexusoperationpbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescData -} - -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 5) -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_goTypes = []any{ - (*InvocationTask)(nil), // 0: temporal.server.chasm.lib.nexusoperation.proto.v1.InvocationTask - (*InvocationTimeoutTask)(nil), // 1: temporal.server.chasm.lib.nexusoperation.proto.v1.InvocationTimeoutTask - (*InvocationBackoffTask)(nil), // 2: temporal.server.chasm.lib.nexusoperation.proto.v1.InvocationBackoffTask - (*CancellationTask)(nil), // 3: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationTask - (*CancellationBackoffTask)(nil), // 4: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationBackoffTask -} -var file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_init() } -func file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_init() { - if File_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 5, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto = out.File - file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_goTypes = nil - file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_depIdxs = nil -} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go deleted file mode 100644 index 202513f298..0000000000 --- a/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package schedulerpb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type SchedulerState to the protobuf v3 wire format -func (val *SchedulerState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type SchedulerState from the protobuf v3 wire format -func (val *SchedulerState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *SchedulerState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two SchedulerState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *SchedulerState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *SchedulerState - switch t := that.(type) { - case *SchedulerState: - that1 = t - case SchedulerState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type WorkflowMigrationState to the protobuf v3 wire format -func (val *WorkflowMigrationState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type WorkflowMigrationState from the protobuf v3 wire format -func (val *WorkflowMigrationState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *WorkflowMigrationState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two WorkflowMigrationState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *WorkflowMigrationState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *WorkflowMigrationState - switch t := that.(type) { - case *WorkflowMigrationState: - that1 = t - case WorkflowMigrationState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type GeneratorState to the protobuf v3 wire format -func (val *GeneratorState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type GeneratorState from the protobuf v3 wire format -func (val *GeneratorState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *GeneratorState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two GeneratorState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *GeneratorState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *GeneratorState - switch t := that.(type) { - case *GeneratorState: - that1 = t - case GeneratorState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type InvokerState to the protobuf v3 wire format -func (val *InvokerState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvokerState from the protobuf v3 wire format -func (val *InvokerState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvokerState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvokerState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvokerState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvokerState - switch t := that.(type) { - case *InvokerState: - that1 = t - case InvokerState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type BackfillerState to the protobuf v3 wire format -func (val *BackfillerState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type BackfillerState from the protobuf v3 wire format -func (val *BackfillerState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *BackfillerState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two BackfillerState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *BackfillerState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *BackfillerState - switch t := that.(type) { - case *BackfillerState: - that1 = t - case BackfillerState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type LastCompletionResult to the protobuf v3 wire format -func (val *LastCompletionResult) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type LastCompletionResult from the protobuf v3 wire format -func (val *LastCompletionResult) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *LastCompletionResult) Size() int { - return proto.Size(val) -} - -// Equal returns whether two LastCompletionResult values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *LastCompletionResult) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *LastCompletionResult - switch t := that.(type) { - case *LastCompletionResult: - that1 = t - case LastCompletionResult: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type SchedulerMigrationState to the protobuf v3 wire format -func (val *SchedulerMigrationState) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type SchedulerMigrationState from the protobuf v3 wire format -func (val *SchedulerMigrationState) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *SchedulerMigrationState) Size() int { - return proto.Size(val) -} - -// Equal returns whether two SchedulerMigrationState values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *SchedulerMigrationState) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *SchedulerMigrationState - switch t := that.(type) { - case *SchedulerMigrationState: - that1 = t - case SchedulerMigrationState: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go deleted file mode 100644 index dad02f948a..0000000000 --- a/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go +++ /dev/null @@ -1,749 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/scheduler/proto/v1/message.proto - -package schedulerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - v12 "go.temporal.io/api/common/v1" - v13 "go.temporal.io/api/failure/v1" - v1 "go.temporal.io/api/schedule/v1" - v11 "go.temporal.io/server/api/schedule/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// CHASM scheduler top-level state. -type SchedulerState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Scheduler request parameters and metadata. - Schedule *v1.Schedule `protobuf:"bytes,2,opt,name=schedule,proto3" json:"schedule,omitempty"` - Info *v1.ScheduleInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` - // State common to all generators is stored in the top-level machine. - Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` - NamespaceId string `protobuf:"bytes,6,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - ScheduleId string `protobuf:"bytes,7,opt,name=schedule_id,json=scheduleId,proto3" json:"schedule_id,omitempty"` - // Implemented as a sequence number. Used for optimistic locking against - // update requests. - ConflictToken int64 `protobuf:"varint,8,opt,name=conflict_token,json=conflictToken,proto3" json:"conflict_token,omitempty"` - // The closed flag is set true after a schedule completes, and the idle timer - // expires. - Closed bool `protobuf:"varint,9,opt,name=closed,proto3" json:"closed,omitempty"` - // When true, this scheduler is a sentinel that exists only to reserve the - // schedule ID. All API operations return NotFound. - Sentinel bool `protobuf:"varint,10,opt,name=sentinel,proto3" json:"sentinel,omitempty"` - // Set when a migration to workflow-backed scheduler (V1) is pending. - // Unpause operations are blocked while this is set. - WorkflowMigration *WorkflowMigrationState `protobuf:"bytes,11,opt,name=workflow_migration,json=workflowMigration,proto3" json:"workflow_migration,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SchedulerState) Reset() { - *x = SchedulerState{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SchedulerState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchedulerState) ProtoMessage() {} - -func (x *SchedulerState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SchedulerState.ProtoReflect.Descriptor instead. -func (*SchedulerState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{0} -} - -func (x *SchedulerState) GetSchedule() *v1.Schedule { - if x != nil { - return x.Schedule - } - return nil -} - -func (x *SchedulerState) GetInfo() *v1.ScheduleInfo { - if x != nil { - return x.Info - } - return nil -} - -func (x *SchedulerState) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *SchedulerState) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *SchedulerState) GetScheduleId() string { - if x != nil { - return x.ScheduleId - } - return "" -} - -func (x *SchedulerState) GetConflictToken() int64 { - if x != nil { - return x.ConflictToken - } - return 0 -} - -func (x *SchedulerState) GetClosed() bool { - if x != nil { - return x.Closed - } - return false -} - -func (x *SchedulerState) GetSentinel() bool { - if x != nil { - return x.Sentinel - } - return false -} - -func (x *SchedulerState) GetWorkflowMigration() *WorkflowMigrationState { - if x != nil { - return x.WorkflowMigration - } - return nil -} - -// WorkflowMigrationState tracks the state of an in-progress V2-to-V1 migration. -type WorkflowMigrationState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // The schedule's paused state before migration was initiated. Used to - // restore the correct paused state when passing state to the V1 workflow. - PreMigrationPaused bool `protobuf:"varint,1,opt,name=pre_migration_paused,json=preMigrationPaused,proto3" json:"pre_migration_paused,omitempty"` - // The schedule's notes before migration was initiated. - PreMigrationNotes string `protobuf:"bytes,2,opt,name=pre_migration_notes,json=preMigrationNotes,proto3" json:"pre_migration_notes,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *WorkflowMigrationState) Reset() { - *x = WorkflowMigrationState{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *WorkflowMigrationState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*WorkflowMigrationState) ProtoMessage() {} - -func (x *WorkflowMigrationState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use WorkflowMigrationState.ProtoReflect.Descriptor instead. -func (*WorkflowMigrationState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{1} -} - -func (x *WorkflowMigrationState) GetPreMigrationPaused() bool { - if x != nil { - return x.PreMigrationPaused - } - return false -} - -func (x *WorkflowMigrationState) GetPreMigrationNotes() string { - if x != nil { - return x.PreMigrationNotes - } - return "" -} - -// CHASM scheduler's Generator internal state. -type GeneratorState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // High water mark. - LastProcessedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_processed_time,json=lastProcessedTime,proto3" json:"last_processed_time,omitempty"` - // A list of upcoming times an action will be triggered. - FutureActionTimes []*timestamppb.Timestamp `protobuf:"bytes,4,rep,name=future_action_times,json=futureActionTimes,proto3" json:"future_action_times,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GeneratorState) Reset() { - *x = GeneratorState{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GeneratorState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GeneratorState) ProtoMessage() {} - -func (x *GeneratorState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GeneratorState.ProtoReflect.Descriptor instead. -func (*GeneratorState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{2} -} - -func (x *GeneratorState) GetLastProcessedTime() *timestamppb.Timestamp { - if x != nil { - return x.LastProcessedTime - } - return nil -} - -func (x *GeneratorState) GetFutureActionTimes() []*timestamppb.Timestamp { - if x != nil { - return x.FutureActionTimes - } - return nil -} - -// CHASM scheduler's Invoker internal state. -type InvokerState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Buffered starts that will be started by the Invoker. - BufferedStarts []*v11.BufferedStart `protobuf:"bytes,2,rep,name=buffered_starts,json=bufferedStarts,proto3" json:"buffered_starts,omitempty"` - // Workflow executions that will be cancelled due to overlap policy. - CancelWorkflows []*v12.WorkflowExecution `protobuf:"bytes,3,rep,name=cancel_workflows,json=cancelWorkflows,proto3" json:"cancel_workflows,omitempty"` - // Workflow executions that will be terminated due to overlap policy. - TerminateWorkflows []*v12.WorkflowExecution `protobuf:"bytes,4,rep,name=terminate_workflows,json=terminateWorkflows,proto3" json:"terminate_workflows,omitempty"` - // High water mark, used for evaluating when to fire tasks that are backing - // off from a retry. LastProcessedTime is stored as state so that task - // generation will be consistent, regardless of when generation occurs, such - // as after applying a replicated state (as opposed to evaluating based on - // present time). - LastProcessedTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_processed_time,json=lastProcessedTime,proto3" json:"last_processed_time,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvokerState) Reset() { - *x = InvokerState{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvokerState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokerState) ProtoMessage() {} - -func (x *InvokerState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvokerState.ProtoReflect.Descriptor instead. -func (*InvokerState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{3} -} - -func (x *InvokerState) GetBufferedStarts() []*v11.BufferedStart { - if x != nil { - return x.BufferedStarts - } - return nil -} - -func (x *InvokerState) GetCancelWorkflows() []*v12.WorkflowExecution { - if x != nil { - return x.CancelWorkflows - } - return nil -} - -func (x *InvokerState) GetTerminateWorkflows() []*v12.WorkflowExecution { - if x != nil { - return x.TerminateWorkflows - } - return nil -} - -func (x *InvokerState) GetLastProcessedTime() *timestamppb.Timestamp { - if x != nil { - return x.LastProcessedTime - } - return nil -} - -// CHASM scheduler's Backfiller internal state. Backfill requests are 1:1 -// with Backfiller nodes. Backfiller nodes also handle immediate trigger requests. -type BackfillerState struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Types that are valid to be assigned to Request: - // - // *BackfillerState_BackfillRequest - // *BackfillerState_TriggerRequest - Request isBackfillerState_Request `protobuf_oneof:"request"` - // Every Backfiller should be assigned a unique ID upon creation, used - // for deduplication. - BackfillId string `protobuf:"bytes,6,opt,name=backfill_id,json=backfillId,proto3" json:"backfill_id,omitempty"` - // High water mark. - LastProcessedTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_processed_time,json=lastProcessedTime,proto3" json:"last_processed_time,omitempty"` - // Attempt count, incremented when the buffer is full and the Backfiller - // needs to back off before retrying to fill. - Attempt int64 `protobuf:"varint,8,opt,name=attempt,proto3" json:"attempt,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BackfillerState) Reset() { - *x = BackfillerState{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BackfillerState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackfillerState) ProtoMessage() {} - -func (x *BackfillerState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackfillerState.ProtoReflect.Descriptor instead. -func (*BackfillerState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{4} -} - -func (x *BackfillerState) GetRequest() isBackfillerState_Request { - if x != nil { - return x.Request - } - return nil -} - -func (x *BackfillerState) GetBackfillRequest() *v1.BackfillRequest { - if x != nil { - if x, ok := x.Request.(*BackfillerState_BackfillRequest); ok { - return x.BackfillRequest - } - } - return nil -} - -func (x *BackfillerState) GetTriggerRequest() *v1.TriggerImmediatelyRequest { - if x != nil { - if x, ok := x.Request.(*BackfillerState_TriggerRequest); ok { - return x.TriggerRequest - } - } - return nil -} - -func (x *BackfillerState) GetBackfillId() string { - if x != nil { - return x.BackfillId - } - return "" -} - -func (x *BackfillerState) GetLastProcessedTime() *timestamppb.Timestamp { - if x != nil { - return x.LastProcessedTime - } - return nil -} - -func (x *BackfillerState) GetAttempt() int64 { - if x != nil { - return x.Attempt - } - return 0 -} - -type isBackfillerState_Request interface { - isBackfillerState_Request() -} - -type BackfillerState_BackfillRequest struct { - BackfillRequest *v1.BackfillRequest `protobuf:"bytes,1,opt,name=backfill_request,json=backfillRequest,proto3,oneof"` -} - -type BackfillerState_TriggerRequest struct { - // When set, immediately buffer a single manual action. - TriggerRequest *v1.TriggerImmediatelyRequest `protobuf:"bytes,2,opt,name=trigger_request,json=triggerRequest,proto3,oneof"` -} - -func (*BackfillerState_BackfillRequest) isBackfillerState_Request() {} - -func (*BackfillerState_TriggerRequest) isBackfillerState_Request() {} - -// CHASM scheduler retains the payload data for the last completed workflow. Both -// last success and failure are stored simultaneously. -type LastCompletionResult struct { - state protoimpl.MessageState `protogen:"open.v1"` - Success *v12.Payload `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` - Failure *v13.Failure `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *LastCompletionResult) Reset() { - *x = LastCompletionResult{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *LastCompletionResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LastCompletionResult) ProtoMessage() {} - -func (x *LastCompletionResult) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LastCompletionResult.ProtoReflect.Descriptor instead. -func (*LastCompletionResult) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{5} -} - -func (x *LastCompletionResult) GetSuccess() *v12.Payload { - if x != nil { - return x.Success - } - return nil -} - -func (x *LastCompletionResult) GetFailure() *v13.Failure { - if x != nil { - return x.Failure - } - return nil -} - -// SchedulerMigrationState is a stack-agnostic interchange format for migrating -// scheduler state between V1 (workflow-backed) and V2 (CHASM) implementations. -type SchedulerMigrationState struct { - state protoimpl.MessageState `protogen:"open.v1"` - SchedulerState *SchedulerState `protobuf:"bytes,1,opt,name=scheduler_state,json=schedulerState,proto3" json:"scheduler_state,omitempty"` - GeneratorState *GeneratorState `protobuf:"bytes,2,opt,name=generator_state,json=generatorState,proto3" json:"generator_state,omitempty"` - InvokerState *InvokerState `protobuf:"bytes,3,opt,name=invoker_state,json=invokerState,proto3" json:"invoker_state,omitempty"` - Backfillers map[string]*BackfillerState `protobuf:"bytes,4,rep,name=backfillers,proto3" json:"backfillers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - LastCompletionResult *LastCompletionResult `protobuf:"bytes,5,opt,name=last_completion_result,json=lastCompletionResult,proto3" json:"last_completion_result,omitempty"` - // Visibility data. - SearchAttributes map[string]*v12.Payload `protobuf:"bytes,6,rep,name=search_attributes,json=searchAttributes,proto3" json:"search_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Memo map[string]*v12.Payload `protobuf:"bytes,7,rep,name=memo,proto3" json:"memo,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SchedulerMigrationState) Reset() { - *x = SchedulerMigrationState{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SchedulerMigrationState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchedulerMigrationState) ProtoMessage() {} - -func (x *SchedulerMigrationState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SchedulerMigrationState.ProtoReflect.Descriptor instead. -func (*SchedulerMigrationState) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{6} -} - -func (x *SchedulerMigrationState) GetSchedulerState() *SchedulerState { - if x != nil { - return x.SchedulerState - } - return nil -} - -func (x *SchedulerMigrationState) GetGeneratorState() *GeneratorState { - if x != nil { - return x.GeneratorState - } - return nil -} - -func (x *SchedulerMigrationState) GetInvokerState() *InvokerState { - if x != nil { - return x.InvokerState - } - return nil -} - -func (x *SchedulerMigrationState) GetBackfillers() map[string]*BackfillerState { - if x != nil { - return x.Backfillers - } - return nil -} - -func (x *SchedulerMigrationState) GetLastCompletionResult() *LastCompletionResult { - if x != nil { - return x.LastCompletionResult - } - return nil -} - -func (x *SchedulerMigrationState) GetSearchAttributes() map[string]*v12.Payload { - if x != nil { - return x.SearchAttributes - } - return nil -} - -func (x *SchedulerMigrationState) GetMemo() map[string]*v12.Payload { - if x != nil { - return x.Memo - } - return nil -} - -var File_temporal_server_chasm_lib_scheduler_proto_v1_message_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc = "" + - "\n" + - ":temporal/server/chasm/lib/scheduler/proto/v1/message.proto\x12,temporal.server.chasm.lib.scheduler.proto.v1\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a&temporal/api/schedule/v1/message.proto\x1a-temporal/server/api/schedule/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x03\n" + - "\x0eSchedulerState\x12>\n" + - "\bschedule\x18\x02 \x01(\v2\".temporal.api.schedule.v1.ScheduleR\bschedule\x12:\n" + - "\x04info\x18\x03 \x01(\v2&.temporal.api.schedule.v1.ScheduleInfoR\x04info\x12\x1c\n" + - "\tnamespace\x18\x05 \x01(\tR\tnamespace\x12!\n" + - "\fnamespace_id\x18\x06 \x01(\tR\vnamespaceId\x12\x1f\n" + - "\vschedule_id\x18\a \x01(\tR\n" + - "scheduleId\x12%\n" + - "\x0econflict_token\x18\b \x01(\x03R\rconflictToken\x12\x16\n" + - "\x06closed\x18\t \x01(\bR\x06closed\x12\x1a\n" + - "\bsentinel\x18\n" + - " \x01(\bR\bsentinel\x12s\n" + - "\x12workflow_migration\x18\v \x01(\v2D.temporal.server.chasm.lib.scheduler.proto.v1.WorkflowMigrationStateR\x11workflowMigration\"z\n" + - "\x16WorkflowMigrationState\x120\n" + - "\x14pre_migration_paused\x18\x01 \x01(\bR\x12preMigrationPaused\x12.\n" + - "\x13pre_migration_notes\x18\x02 \x01(\tR\x11preMigrationNotes\"\xa8\x01\n" + - "\x0eGeneratorState\x12J\n" + - "\x13last_processed_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x11lastProcessedTime\x12J\n" + - "\x13future_action_times\x18\x04 \x03(\v2\x1a.google.protobuf.TimestampR\x11futureActionTimes\"\xeb\x02\n" + - "\fInvokerState\x12W\n" + - "\x0fbuffered_starts\x18\x02 \x03(\v2..temporal.server.api.schedule.v1.BufferedStartR\x0ebufferedStarts\x12T\n" + - "\x10cancel_workflows\x18\x03 \x03(\v2).temporal.api.common.v1.WorkflowExecutionR\x0fcancelWorkflows\x12Z\n" + - "\x13terminate_workflows\x18\x04 \x03(\v2).temporal.api.common.v1.WorkflowExecutionR\x12terminateWorkflows\x12J\n" + - "\x13last_processed_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x11lastProcessedTimeJ\x04\b\x06\x10\a\"\xdb\x02\n" + - "\x0fBackfillerState\x12V\n" + - "\x10backfill_request\x18\x01 \x01(\v2).temporal.api.schedule.v1.BackfillRequestH\x00R\x0fbackfillRequest\x12^\n" + - "\x0ftrigger_request\x18\x02 \x01(\v23.temporal.api.schedule.v1.TriggerImmediatelyRequestH\x00R\x0etriggerRequest\x12\x1f\n" + - "\vbackfill_id\x18\x06 \x01(\tR\n" + - "backfillId\x12J\n" + - "\x13last_processed_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x11lastProcessedTime\x12\x18\n" + - "\aattempt\x18\b \x01(\x03R\aattemptB\t\n" + - "\arequest\"\x8d\x01\n" + - "\x14LastCompletionResult\x129\n" + - "\asuccess\x18\x01 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\asuccess\x12:\n" + - "\afailure\x18\x02 \x01(\v2 .temporal.api.failure.v1.FailureR\afailure\"\xeb\b\n" + - "\x17SchedulerMigrationState\x12e\n" + - "\x0fscheduler_state\x18\x01 \x01(\v2<.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerStateR\x0eschedulerState\x12e\n" + - "\x0fgenerator_state\x18\x02 \x01(\v2<.temporal.server.chasm.lib.scheduler.proto.v1.GeneratorStateR\x0egeneratorState\x12_\n" + - "\rinvoker_state\x18\x03 \x01(\v2:.temporal.server.chasm.lib.scheduler.proto.v1.InvokerStateR\finvokerState\x12x\n" + - "\vbackfillers\x18\x04 \x03(\v2V.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntryR\vbackfillers\x12x\n" + - "\x16last_completion_result\x18\x05 \x01(\v2B.temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResultR\x14lastCompletionResult\x12\x88\x01\n" + - "\x11search_attributes\x18\x06 \x03(\v2[.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntryR\x10searchAttributes\x12c\n" + - "\x04memo\x18\a \x03(\v2O.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntryR\x04memo\x1a}\n" + - "\x10BackfillersEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12S\n" + - "\x05value\x18\x02 \x01(\v2=.temporal.server.chasm.lib.scheduler.proto.v1.BackfillerStateR\x05value:\x028\x01\x1ad\n" + - "\x15SearchAttributesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + - "\x05value\x18\x02 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\x05value:\x028\x01\x1aX\n" + - "\tMemoEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + - "\x05value\x18\x02 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\x05value:\x028\x01BGZEgo.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb;schedulerpbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescData -} - -var file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_goTypes = []any{ - (*SchedulerState)(nil), // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState - (*WorkflowMigrationState)(nil), // 1: temporal.server.chasm.lib.scheduler.proto.v1.WorkflowMigrationState - (*GeneratorState)(nil), // 2: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState - (*InvokerState)(nil), // 3: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState - (*BackfillerState)(nil), // 4: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState - (*LastCompletionResult)(nil), // 5: temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult - (*SchedulerMigrationState)(nil), // 6: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState - nil, // 7: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntry - nil, // 8: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntry - nil, // 9: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntry - (*v1.Schedule)(nil), // 10: temporal.api.schedule.v1.Schedule - (*v1.ScheduleInfo)(nil), // 11: temporal.api.schedule.v1.ScheduleInfo - (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp - (*v11.BufferedStart)(nil), // 13: temporal.server.api.schedule.v1.BufferedStart - (*v12.WorkflowExecution)(nil), // 14: temporal.api.common.v1.WorkflowExecution - (*v1.BackfillRequest)(nil), // 15: temporal.api.schedule.v1.BackfillRequest - (*v1.TriggerImmediatelyRequest)(nil), // 16: temporal.api.schedule.v1.TriggerImmediatelyRequest - (*v12.Payload)(nil), // 17: temporal.api.common.v1.Payload - (*v13.Failure)(nil), // 18: temporal.api.failure.v1.Failure -} -var file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_depIdxs = []int32{ - 10, // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState.schedule:type_name -> temporal.api.schedule.v1.Schedule - 11, // 1: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState.info:type_name -> temporal.api.schedule.v1.ScheduleInfo - 1, // 2: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState.workflow_migration:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.WorkflowMigrationState - 12, // 3: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState.last_processed_time:type_name -> google.protobuf.Timestamp - 12, // 4: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState.future_action_times:type_name -> google.protobuf.Timestamp - 13, // 5: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.buffered_starts:type_name -> temporal.server.api.schedule.v1.BufferedStart - 14, // 6: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.cancel_workflows:type_name -> temporal.api.common.v1.WorkflowExecution - 14, // 7: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.terminate_workflows:type_name -> temporal.api.common.v1.WorkflowExecution - 12, // 8: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.last_processed_time:type_name -> google.protobuf.Timestamp - 15, // 9: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState.backfill_request:type_name -> temporal.api.schedule.v1.BackfillRequest - 16, // 10: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState.trigger_request:type_name -> temporal.api.schedule.v1.TriggerImmediatelyRequest - 12, // 11: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState.last_processed_time:type_name -> google.protobuf.Timestamp - 17, // 12: temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult.success:type_name -> temporal.api.common.v1.Payload - 18, // 13: temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult.failure:type_name -> temporal.api.failure.v1.Failure - 0, // 14: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.scheduler_state:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState - 2, // 15: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.generator_state:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState - 3, // 16: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.invoker_state:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.InvokerState - 7, // 17: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.backfillers:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntry - 5, // 18: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.last_completion_result:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult - 8, // 19: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.search_attributes:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntry - 9, // 20: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.memo:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntry - 4, // 21: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntry.value:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState - 17, // 22: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload - 17, // 23: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntry.value:type_name -> temporal.api.common.v1.Payload - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_init() } -func file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_init() { - if File_temporal_server_chasm_lib_scheduler_proto_v1_message_proto != nil { - return - } - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[4].OneofWrappers = []any{ - (*BackfillerState_BackfillRequest)(nil), - (*BackfillerState_TriggerRequest)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc)), - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_scheduler_proto_v1_message_proto = out.File - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_goTypes = nil - file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_depIdxs = nil -} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go deleted file mode 100644 index 16df837180..0000000000 --- a/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package schedulerpb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type SchedulerIdleTask to the protobuf v3 wire format -func (val *SchedulerIdleTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type SchedulerIdleTask from the protobuf v3 wire format -func (val *SchedulerIdleTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *SchedulerIdleTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two SchedulerIdleTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *SchedulerIdleTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *SchedulerIdleTask - switch t := that.(type) { - case *SchedulerIdleTask: - that1 = t - case SchedulerIdleTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type SchedulerCallbacksTask to the protobuf v3 wire format -func (val *SchedulerCallbacksTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type SchedulerCallbacksTask from the protobuf v3 wire format -func (val *SchedulerCallbacksTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *SchedulerCallbacksTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two SchedulerCallbacksTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *SchedulerCallbacksTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *SchedulerCallbacksTask - switch t := that.(type) { - case *SchedulerCallbacksTask: - that1 = t - case SchedulerCallbacksTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type GeneratorTask to the protobuf v3 wire format -func (val *GeneratorTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type GeneratorTask from the protobuf v3 wire format -func (val *GeneratorTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *GeneratorTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two GeneratorTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *GeneratorTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *GeneratorTask - switch t := that.(type) { - case *GeneratorTask: - that1 = t - case GeneratorTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type InvokerProcessBufferTask to the protobuf v3 wire format -func (val *InvokerProcessBufferTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvokerProcessBufferTask from the protobuf v3 wire format -func (val *InvokerProcessBufferTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvokerProcessBufferTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvokerProcessBufferTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvokerProcessBufferTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvokerProcessBufferTask - switch t := that.(type) { - case *InvokerProcessBufferTask: - that1 = t - case InvokerProcessBufferTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type InvokerExecuteTask to the protobuf v3 wire format -func (val *InvokerExecuteTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type InvokerExecuteTask from the protobuf v3 wire format -func (val *InvokerExecuteTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *InvokerExecuteTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two InvokerExecuteTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *InvokerExecuteTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *InvokerExecuteTask - switch t := that.(type) { - case *InvokerExecuteTask: - that1 = t - case InvokerExecuteTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type BackfillerTask to the protobuf v3 wire format -func (val *BackfillerTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type BackfillerTask from the protobuf v3 wire format -func (val *BackfillerTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *BackfillerTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two BackfillerTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *BackfillerTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *BackfillerTask - switch t := that.(type) { - case *BackfillerTask: - that1 = t - case BackfillerTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type SchedulerMigrateToWorkflowTask to the protobuf v3 wire format -func (val *SchedulerMigrateToWorkflowTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type SchedulerMigrateToWorkflowTask from the protobuf v3 wire format -func (val *SchedulerMigrateToWorkflowTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *SchedulerMigrateToWorkflowTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two SchedulerMigrateToWorkflowTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *SchedulerMigrateToWorkflowTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *SchedulerMigrateToWorkflowTask - switch t := that.(type) { - case *SchedulerMigrateToWorkflowTask: - that1 = t - case SchedulerMigrateToWorkflowTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go deleted file mode 100644 index 3564a6aac3..0000000000 --- a/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go +++ /dev/null @@ -1,367 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/scheduler/proto/v1/tasks.proto - -package schedulerpb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Fires when the scheduler's idle period has lapsed, and the scheduler should -// be closed. -type SchedulerIdleTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Idle time total is set at time of task creation, so that if the dynamic config key - // controlling idle time changes, task validation will be aware. - IdleTimeTotal *durationpb.Duration `protobuf:"bytes,1,opt,name=idle_time_total,json=idleTimeTotal,proto3" json:"idle_time_total,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SchedulerIdleTask) Reset() { - *x = SchedulerIdleTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SchedulerIdleTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchedulerIdleTask) ProtoMessage() {} - -func (x *SchedulerIdleTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SchedulerIdleTask.ProtoReflect.Descriptor instead. -func (*SchedulerIdleTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{0} -} - -func (x *SchedulerIdleTask) GetIdleTimeTotal() *durationpb.Duration { - if x != nil { - return x.IdleTimeTotal - } - return nil -} - -// Ensures that callbacks for all running buffered starts are attached. Used only -// during migration from V1, as workflows started by CHASM scheduler are started -// with callbacks attached. -type SchedulerCallbacksTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SchedulerCallbacksTask) Reset() { - *x = SchedulerCallbacksTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SchedulerCallbacksTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchedulerCallbacksTask) ProtoMessage() {} - -func (x *SchedulerCallbacksTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SchedulerCallbacksTask.ProtoReflect.Descriptor instead. -func (*SchedulerCallbacksTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{1} -} - -// Buffers actions based on the schedule's specification. -type GeneratorTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *GeneratorTask) Reset() { - *x = GeneratorTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *GeneratorTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GeneratorTask) ProtoMessage() {} - -func (x *GeneratorTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GeneratorTask.ProtoReflect.Descriptor instead. -func (*GeneratorTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{2} -} - -// Processes buffered actions, deciding whether to execute, delay, or discard. -type InvokerProcessBufferTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvokerProcessBufferTask) Reset() { - *x = InvokerProcessBufferTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvokerProcessBufferTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokerProcessBufferTask) ProtoMessage() {} - -func (x *InvokerProcessBufferTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvokerProcessBufferTask.ProtoReflect.Descriptor instead. -func (*InvokerProcessBufferTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{3} -} - -// Drives execution of pending buffered actions to completion by starting, -// canceling, or terminating workflows. -type InvokerExecuteTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *InvokerExecuteTask) Reset() { - *x = InvokerExecuteTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *InvokerExecuteTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InvokerExecuteTask) ProtoMessage() {} - -func (x *InvokerExecuteTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use InvokerExecuteTask.ProtoReflect.Descriptor instead. -func (*InvokerExecuteTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{4} -} - -// Buffers actions based on a manually-requested backfill. -type BackfillerTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BackfillerTask) Reset() { - *x = BackfillerTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BackfillerTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BackfillerTask) ProtoMessage() {} - -func (x *BackfillerTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BackfillerTask.ProtoReflect.Descriptor instead. -func (*BackfillerTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{5} -} - -// Triggers migration from CHASM (V2) to workflow-backed (V1) scheduler. -type SchedulerMigrateToWorkflowTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SchedulerMigrateToWorkflowTask) Reset() { - *x = SchedulerMigrateToWorkflowTask{} - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SchedulerMigrateToWorkflowTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SchedulerMigrateToWorkflowTask) ProtoMessage() {} - -func (x *SchedulerMigrateToWorkflowTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SchedulerMigrateToWorkflowTask.ProtoReflect.Descriptor instead. -func (*SchedulerMigrateToWorkflowTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{6} -} - -var File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc = "" + - "\n" + - "8temporal/server/chasm/lib/scheduler/proto/v1/tasks.proto\x12,temporal.server.chasm.lib.scheduler.proto.v1\x1a\x1egoogle/protobuf/duration.proto\"V\n" + - "\x11SchedulerIdleTask\x12A\n" + - "\x0fidle_time_total\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\ridleTimeTotal\"\x18\n" + - "\x16SchedulerCallbacksTask\"\x0f\n" + - "\rGeneratorTask\"\x1a\n" + - "\x18InvokerProcessBufferTask\"\x14\n" + - "\x12InvokerExecuteTask\"\x10\n" + - "\x0eBackfillerTask\" \n" + - "\x1eSchedulerMigrateToWorkflowTaskBGZEgo.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb;schedulerpbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData -} - -var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes = []any{ - (*SchedulerIdleTask)(nil), // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerIdleTask - (*SchedulerCallbacksTask)(nil), // 1: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerCallbacksTask - (*GeneratorTask)(nil), // 2: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorTask - (*InvokerProcessBufferTask)(nil), // 3: temporal.server.chasm.lib.scheduler.proto.v1.InvokerProcessBufferTask - (*InvokerExecuteTask)(nil), // 4: temporal.server.chasm.lib.scheduler.proto.v1.InvokerExecuteTask - (*BackfillerTask)(nil), // 5: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerTask - (*SchedulerMigrateToWorkflowTask)(nil), // 6: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrateToWorkflowTask - (*durationpb.Duration)(nil), // 7: google.protobuf.Duration -} -var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs = []int32{ - 7, // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerIdleTask.idle_time_total:type_name -> google.protobuf.Duration - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_init() } -func file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_init() { - if File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc)), - NumEnums: 0, - NumMessages: 7, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto = out.File - file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes = nil - file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs = nil -} diff --git a/chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go b/chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go deleted file mode 100644 index 3320f0f27f..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package testspb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type TestPayloadStore to the protobuf v3 wire format -func (val *TestPayloadStore) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TestPayloadStore from the protobuf v3 wire format -func (val *TestPayloadStore) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TestPayloadStore) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TestPayloadStore values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TestPayloadStore) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TestPayloadStore - switch t := that.(type) { - case *TestPayloadStore: - that1 = t - case TestPayloadStore: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type TestPayloadTTLPureTask to the protobuf v3 wire format -func (val *TestPayloadTTLPureTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TestPayloadTTLPureTask from the protobuf v3 wire format -func (val *TestPayloadTTLPureTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TestPayloadTTLPureTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TestPayloadTTLPureTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TestPayloadTTLPureTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TestPayloadTTLPureTask - switch t := that.(type) { - case *TestPayloadTTLPureTask: - that1 = t - case TestPayloadTTLPureTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type TestPayloadTTLSideEffectTask to the protobuf v3 wire format -func (val *TestPayloadTTLSideEffectTask) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TestPayloadTTLSideEffectTask from the protobuf v3 wire format -func (val *TestPayloadTTLSideEffectTask) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TestPayloadTTLSideEffectTask) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TestPayloadTTLSideEffectTask values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TestPayloadTTLSideEffectTask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TestPayloadTTLSideEffectTask - switch t := that.(type) { - case *TestPayloadTTLSideEffectTask: - that1 = t - case TestPayloadTTLSideEffectTask: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/tests/gen/testspb/v1/message.pb.go b/chasm/lib/tests/gen/testspb/v1/message.pb.go deleted file mode 100644 index 9bd7f2b343..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/message.pb.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/tests/proto/v1/message.proto - -package testspb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TestPayloadStore struct { - state protoimpl.MessageState `protogen:"open.v1"` - TotalCount int64 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` - TotalSize int64 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` - // (-- api-linter: core::0142::time-field-type=disabled --) - ExpirationTimes map[string]*timestamppb.Timestamp `protobuf:"bytes,3,rep,name=expiration_times,json=expirationTimes,proto3" json:"expiration_times,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - Closed bool `protobuf:"varint,4,opt,name=closed,proto3" json:"closed,omitempty"` - Canceled bool `protobuf:"varint,5,opt,name=canceled,proto3" json:"canceled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TestPayloadStore) Reset() { - *x = TestPayloadStore{} - mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TestPayloadStore) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestPayloadStore) ProtoMessage() {} - -func (x *TestPayloadStore) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestPayloadStore.ProtoReflect.Descriptor instead. -func (*TestPayloadStore) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP(), []int{0} -} - -func (x *TestPayloadStore) GetTotalCount() int64 { - if x != nil { - return x.TotalCount - } - return 0 -} - -func (x *TestPayloadStore) GetTotalSize() int64 { - if x != nil { - return x.TotalSize - } - return 0 -} - -func (x *TestPayloadStore) GetExpirationTimes() map[string]*timestamppb.Timestamp { - if x != nil { - return x.ExpirationTimes - } - return nil -} - -func (x *TestPayloadStore) GetClosed() bool { - if x != nil { - return x.Closed - } - return false -} - -func (x *TestPayloadStore) GetCanceled() bool { - if x != nil { - return x.Canceled - } - return false -} - -type TestPayloadTTLPureTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - PayloadKey string `protobuf:"bytes,1,opt,name=payload_key,json=payloadKey,proto3" json:"payload_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TestPayloadTTLPureTask) Reset() { - *x = TestPayloadTTLPureTask{} - mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TestPayloadTTLPureTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestPayloadTTLPureTask) ProtoMessage() {} - -func (x *TestPayloadTTLPureTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestPayloadTTLPureTask.ProtoReflect.Descriptor instead. -func (*TestPayloadTTLPureTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP(), []int{1} -} - -func (x *TestPayloadTTLPureTask) GetPayloadKey() string { - if x != nil { - return x.PayloadKey - } - return "" -} - -type TestPayloadTTLSideEffectTask struct { - state protoimpl.MessageState `protogen:"open.v1"` - PayloadKey string `protobuf:"bytes,1,opt,name=payload_key,json=payloadKey,proto3" json:"payload_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TestPayloadTTLSideEffectTask) Reset() { - *x = TestPayloadTTLSideEffectTask{} - mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TestPayloadTTLSideEffectTask) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestPayloadTTLSideEffectTask) ProtoMessage() {} - -func (x *TestPayloadTTLSideEffectTask) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestPayloadTTLSideEffectTask.ProtoReflect.Descriptor instead. -func (*TestPayloadTTLSideEffectTask) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP(), []int{2} -} - -func (x *TestPayloadTTLSideEffectTask) GetPayloadKey() string { - if x != nil { - return x.PayloadKey - } - return "" -} - -var File_temporal_server_chasm_lib_tests_proto_v1_message_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc = "" + - "\n" + - "6temporal/server/chasm/lib/tests/proto/v1/message.proto\x12(temporal.server.chasm.lib.tests.proto.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x02\n" + - "\x10TestPayloadStore\x12\x1f\n" + - "\vtotal_count\x18\x01 \x01(\x03R\n" + - "totalCount\x12\x1d\n" + - "\n" + - "total_size\x18\x02 \x01(\x03R\ttotalSize\x12z\n" + - "\x10expiration_times\x18\x03 \x03(\v2O.temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntryR\x0fexpirationTimes\x12\x16\n" + - "\x06closed\x18\x04 \x01(\bR\x06closed\x12\x1a\n" + - "\bcanceled\x18\x05 \x01(\bR\bcanceled\x1a^\n" + - "\x14ExpirationTimesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + - "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\"9\n" + - "\x16TestPayloadTTLPureTask\x12\x1f\n" + - "\vpayload_key\x18\x01 \x01(\tR\n" + - "payloadKey\"?\n" + - "\x1cTestPayloadTTLSideEffectTask\x12\x1f\n" + - "\vpayload_key\x18\x01 \x01(\tR\n" + - "payloadKeyB;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescData -} - -var file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_temporal_server_chasm_lib_tests_proto_v1_message_proto_goTypes = []any{ - (*TestPayloadStore)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore - (*TestPayloadTTLPureTask)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestPayloadTTLPureTask - (*TestPayloadTTLSideEffectTask)(nil), // 2: temporal.server.chasm.lib.tests.proto.v1.TestPayloadTTLSideEffectTask - nil, // 3: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntry - (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp -} -var file_temporal_server_chasm_lib_tests_proto_v1_message_proto_depIdxs = []int32{ - 3, // 0: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.expiration_times:type_name -> temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntry - 4, // 1: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntry.value:type_name -> google.protobuf.Timestamp - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_tests_proto_v1_message_proto_init() } -func file_temporal_server_chasm_lib_tests_proto_v1_message_proto_init() { - if File_temporal_server_chasm_lib_tests_proto_v1_message_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_message_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_message_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_tests_proto_v1_message_proto = out.File - file_temporal_server_chasm_lib_tests_proto_v1_message_proto_goTypes = nil - file_temporal_server_chasm_lib_tests_proto_v1_message_proto_depIdxs = nil -} diff --git a/chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go b/chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go deleted file mode 100644 index c4da427ee6..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by protoc-gen-go-helpers. DO NOT EDIT. -package testspb - -import ( - "google.golang.org/protobuf/proto" -) - -// Marshal an object of type TestRequest to the protobuf v3 wire format -func (val *TestRequest) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TestRequest from the protobuf v3 wire format -func (val *TestRequest) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TestRequest) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TestRequest values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TestRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TestRequest - switch t := that.(type) { - case *TestRequest: - that1 = t - case TestRequest: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} - -// Marshal an object of type TestResponse to the protobuf v3 wire format -func (val *TestResponse) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TestResponse from the protobuf v3 wire format -func (val *TestResponse) Unmarshal(buf []byte) error { - return proto.Unmarshal(buf, val) -} - -// Size returns the size of the object, in bytes, once serialized -func (val *TestResponse) Size() int { - return proto.Size(val) -} - -// Equal returns whether two TestResponse values are equivalent by recursively -// comparing the message's fields. -// For more information see the documentation for -// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal -func (this *TestResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - var that1 *TestResponse - switch t := that.(type) { - case *TestResponse: - that1 = t - case TestResponse: - that1 = &t - default: - return false - } - - return proto.Equal(this, that1) -} diff --git a/chasm/lib/tests/gen/testspb/v1/request_response.pb.go b/chasm/lib/tests/gen/testspb/v1/request_response.pb.go deleted file mode 100644 index 0942950ed3..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/request_response.pb.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/tests/proto/v1/request_response.proto - -package testspb - -import ( - reflect "reflect" - sync "sync" - unsafe "unsafe" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type TestRequest struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TestRequest) Reset() { - *x = TestRequest{} - mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TestRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestRequest) ProtoMessage() {} - -func (x *TestRequest) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestRequest.ProtoReflect.Descriptor instead. -func (*TestRequest) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescGZIP(), []int{0} -} - -func (x *TestRequest) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -type TestResponse struct { - state protoimpl.MessageState `protogen:"open.v1"` - RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - HasEngineCtx bool `protobuf:"varint,2,opt,name=has_engine_ctx,json=hasEngineCtx,proto3" json:"has_engine_ctx,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TestResponse) Reset() { - *x = TestResponse{} - mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TestResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TestResponse) ProtoMessage() {} - -func (x *TestResponse) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TestResponse.ProtoReflect.Descriptor instead. -func (*TestResponse) Descriptor() ([]byte, []int) { - return file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescGZIP(), []int{1} -} - -func (x *TestResponse) GetRequestId() string { - if x != nil { - return x.RequestId - } - return "" -} - -func (x *TestResponse) GetHasEngineCtx() bool { - if x != nil { - return x.HasEngineCtx - } - return false -} - -var File_temporal_server_chasm_lib_tests_proto_v1_request_response_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc = "" + - "\n" + - "?temporal/server/chasm/lib/tests/proto/v1/request_response.proto\x12(temporal.server.chasm.lib.tests.proto.v1\",\n" + - "\vTestRequest\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\tR\trequestId\"S\n" + - "\fTestResponse\x12\x1d\n" + - "\n" + - "request_id\x18\x01 \x01(\tR\trequestId\x12$\n" + - "\x0ehas_engine_ctx\x18\x02 \x01(\bR\fhasEngineCtxB;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3" - -var ( - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescOnce sync.Once - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescData []byte -) - -func file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescGZIP() []byte { - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescOnce.Do(func() { - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc))) - }) - return file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescData -} - -var file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_goTypes = []any{ - (*TestRequest)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestRequest - (*TestResponse)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestResponse -} -var file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init() } -func file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init() { - if File_temporal_server_chasm_lib_tests_proto_v1_request_response_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_depIdxs, - MessageInfos: file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes, - }.Build() - File_temporal_server_chasm_lib_tests_proto_v1_request_response_proto = out.File - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_goTypes = nil - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_depIdxs = nil -} diff --git a/chasm/lib/tests/gen/testspb/v1/service.pb.go b/chasm/lib/tests/gen/testspb/v1/service.pb.go deleted file mode 100644 index e3b105a6b0..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/service.pb.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// plugins: -// protoc-gen-go -// protoc -// source: temporal/server/chasm/lib/tests/proto/v1/service.proto - -package testspb - -import ( - reflect "reflect" - unsafe "unsafe" - - _ "go.temporal.io/server/api/common/v1" - _ "go.temporal.io/server/api/routing/v1" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -var File_temporal_server_chasm_lib_tests_proto_v1_service_proto protoreflect.FileDescriptor - -const file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc = "" + - "\n" + - "6temporal/server/chasm/lib/tests/proto/v1/service.proto\x12(temporal.server.chasm.lib.tests.proto.v1\x1a?temporal/server/chasm/lib/tests/proto/v1/request_response.proto\x1a.temporal/server/api/routing/v1/extension.proto\x1a0temporal/server/api/common/v1/api_category.proto2\x93\x01\n" + - "\vTestService\x12\x83\x01\n" + - "\x04Test\x125.temporal.server.chasm.lib.tests.proto.v1.TestRequest\x1a6.temporal.server.chasm.lib.tests.proto.v1.TestResponse\"\f\x92\xc4\x03\x02\b\x01\x8a\xb5\x18\x02\b\x01B;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3" - -var file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes = []any{ - (*TestRequest)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestRequest - (*TestResponse)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestResponse -} -var file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs = []int32{ - 0, // 0: temporal.server.chasm.lib.tests.proto.v1.TestService.Test:input_type -> temporal.server.chasm.lib.tests.proto.v1.TestRequest - 1, // 1: temporal.server.chasm.lib.tests.proto.v1.TestService.Test:output_type -> temporal.server.chasm.lib.tests.proto.v1.TestResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_temporal_server_chasm_lib_tests_proto_v1_service_proto_init() } -func file_temporal_server_chasm_lib_tests_proto_v1_service_proto_init() { - if File_temporal_server_chasm_lib_tests_proto_v1_service_proto != nil { - return - } - file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc)), - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes, - DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs, - }.Build() - File_temporal_server_chasm_lib_tests_proto_v1_service_proto = out.File - file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes = nil - file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs = nil -} diff --git a/chasm/lib/tests/gen/testspb/v1/service_client.pb.go b/chasm/lib/tests/gen/testspb/v1/service_client.pb.go deleted file mode 100644 index fbeff6fc99..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/service_client.pb.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by protoc-gen-go-chasm. DO NOT EDIT. -package testspb - -import ( - "context" - "math/rand" - "time" - - "go.temporal.io/server/client/history" - "go.temporal.io/server/common" - "go.temporal.io/server/common/backoff" - "go.temporal.io/server/common/config" - "go.temporal.io/server/common/dynamicconfig" - "go.temporal.io/server/common/headers" - "go.temporal.io/server/common/log" - "go.temporal.io/server/common/membership" - "go.temporal.io/server/common/metrics" - "go.temporal.io/server/common/primitives" - "google.golang.org/grpc" -) - -// TestServiceLayeredClient is a client for TestService. -type TestServiceLayeredClient struct { - metricsHandler metrics.Handler - numShards int32 - redirector history.Redirector[TestServiceClient] - retryPolicy backoff.RetryPolicy -} - -// NewTestServiceLayeredClient initializes a new TestServiceLayeredClient. -func NewTestServiceLayeredClient( - dc *dynamicconfig.Collection, - rpcFactory common.RPCFactory, - monitor membership.Monitor, - config *config.Persistence, - logger log.Logger, - metricsHandler metrics.Handler, -) (TestServiceClient, error) { - resolver, err := monitor.GetResolver(primitives.HistoryService) - if err != nil { - return nil, err - } - connections := history.NewConnectionPool(resolver, rpcFactory, NewTestServiceClient) - var redirector history.Redirector[TestServiceClient] - if dynamicconfig.HistoryClientOwnershipCachingEnabled.Get(dc)() { - redirector = history.NewCachingRedirector( - connections, - resolver, - logger, - dynamicconfig.HistoryClientOwnershipCachingStaleTTL.Get(dc), - ) - } else { - redirector = history.NewBasicRedirector(connections, resolver) - } - return &TestServiceLayeredClient{ - metricsHandler: metricsHandler, - redirector: redirector, - numShards: config.NumHistoryShards, - retryPolicy: common.CreateHistoryClientRetryPolicy(), - }, nil -} -func (c *TestServiceLayeredClient) callTestNoRetry( - ctx context.Context, - request *TestRequest, - opts ...grpc.CallOption, -) (*TestResponse, error) { - var response *TestResponse - var err error - startTime := time.Now().UTC() - // the caller is a namespace, hence the tag below. - caller := headers.GetCallerInfo(ctx).CallerName - metricsHandler := c.metricsHandler.WithTags( - metrics.OperationTag("TestService.Test"), - metrics.NamespaceTag(caller), - metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), - ) - metrics.ClientRequests.With(metricsHandler).Record(1) - defer func() { - if err != nil { - metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) - } - metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) - }() - shardID := int32(rand.Intn(int(c.numShards)) + 1) - op := func(ctx context.Context, client TestServiceClient) error { - var err error - ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) - defer cancel() - response, err = client.Test(ctx, request, opts...) - return err - } - err = c.redirector.Execute(ctx, shardID, op) - return response, err -} -func (c *TestServiceLayeredClient) Test( - ctx context.Context, - request *TestRequest, - opts ...grpc.CallOption, -) (*TestResponse, error) { - call := func(ctx context.Context) (*TestResponse, error) { - return c.callTestNoRetry(ctx, request, opts...) - } - return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) -} diff --git a/chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go b/chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go deleted file mode 100644 index 1b7ce58552..0000000000 --- a/chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// plugins: -// - protoc-gen-go-grpc -// - protoc -// source: temporal/server/chasm/lib/tests/proto/v1/service.proto - -package testspb - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - TestService_Test_FullMethodName = "/temporal.server.chasm.lib.tests.proto.v1.TestService/Test" -) - -// TestServiceClient is the client API for TestService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type TestServiceClient interface { - Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error) -} - -type testServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient { - return &testServiceClient{cc} -} - -func (c *testServiceClient) Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error) { - out := new(TestResponse) - err := c.cc.Invoke(ctx, TestService_Test_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TestServiceServer is the server API for TestService service. -// All implementations must embed UnimplementedTestServiceServer -// for forward compatibility -type TestServiceServer interface { - Test(context.Context, *TestRequest) (*TestResponse, error) - mustEmbedUnimplementedTestServiceServer() -} - -// UnimplementedTestServiceServer must be embedded to have forward compatible implementations. -type UnimplementedTestServiceServer struct { -} - -func (UnimplementedTestServiceServer) Test(context.Context, *TestRequest) (*TestResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Test not implemented") -} -func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {} - -// UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to TestServiceServer will -// result in compilation errors. -type UnsafeTestServiceServer interface { - mustEmbedUnimplementedTestServiceServer() -} - -func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) { - s.RegisterService(&TestService_ServiceDesc, srv) -} - -func _TestService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestServiceServer).Test(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: TestService_Test_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestServiceServer).Test(ctx, req.(*TestRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var TestService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "temporal.server.chasm.lib.tests.proto.v1.TestService", - HandlerType: (*TestServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Test", - Handler: _TestService_Test_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "temporal/server/chasm/lib/tests/proto/v1/service.proto", -} diff --git a/common/log/tag/values.go b/common/log/tag/values.go index cbb44a4e03..173185609e 100644 --- a/common/log/tag/values.go +++ b/common/log/tag/values.go @@ -12,6 +12,7 @@ var ( WorkflowActionWorkflowContinueAsNew = workflowAction("add-workflow-continue-as-new-event") WorkflowActionWorkflowPaused = workflowAction("add-workflow-paused-event") WorkflowActionWorkflowUnpaused = workflowAction("add-workflow-unpaused-event") + WorkflowActionWorkflowTimeSkipped = workflowAction("add-workflow-time-skipped-event") // workflow cancellation / sign / update-options WorkflowActionWorkflowCancelRequested = workflowAction("add-workflow-cancel-requested-event") diff --git a/common/metrics/metric_defs.go b/common/metrics/metric_defs.go index ce6a4c3641..a9aa5294eb 100644 --- a/common/metrics/metric_defs.go +++ b/common/metrics/metric_defs.go @@ -1108,8 +1108,9 @@ var ( ExecutionQueueSchedulerTaskLatency = NewTimerDef("execution_queue_scheduler_task_latency") ExecutionQueueSchedulerQueueWaitTime = NewTimerDef("execution_queue_scheduler_queue_wait_time") - PausedActivitiesCounter = NewCounterDef("paused_activities") - ExternalPayloadUploadSize = NewBytesHistogramDef("external_payload_upload_size", WithDescription("The histogram of sizes in bytes of uploaded external payloads.")) + PausedActivitiesCounter = NewCounterDef("paused_activities") + ExternalPayloadUploadSize = NewBytesHistogramDef("external_payload_upload_size", WithDescription("The histogram of sizes in bytes of uploaded external payloads.")) + ExecutionTimeSkippingEventCounter = NewCounterDef("execution_time_skipping_event") // Deadlock detector metrics DDSuspectedDeadlocks = NewCounterDef("dd_suspected_deadlocks") diff --git a/go.mod b/go.mod index 89c06e2a9f..4f44a6da05 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( go.opentelemetry.io/otel/sdk v1.40.0 go.opentelemetry.io/otel/sdk/metric v1.40.0 go.opentelemetry.io/otel/trace v1.40.0 - go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574 + go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019 go.temporal.io/sdk v1.38.0 go.uber.org/fx v1.24.0 go.uber.org/mock v0.6.0 diff --git a/go.sum b/go.sum index 0c51214699..3927befd5b 100644 --- a/go.sum +++ b/go.sum @@ -378,6 +378,12 @@ go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOV go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574 h1:qVCgcJueXcPgE+gxlMLKBL1MlqKDt5kSVnYbtatqKoc= go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= +go.temporal.io/api v1.62.3-0.20260322204713-45a5a58b7284 h1:sXFawfZekEFr+w/9umRqmNp2oK1985ek/JfKr/pZyxc= +go.temporal.io/api v1.62.3-0.20260322204713-45a5a58b7284/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= +go.temporal.io/api v1.62.3-0.20260322205303-ac66c14c6f53 h1:ICjBBnQrF235sHeiF8dKzzADc7FJmaURWLR1SdoKklE= +go.temporal.io/api v1.62.3-0.20260322205303-ac66c14c6f53/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= +go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019 h1:0ZYkwnj9HlPBCB+JGev5qjGe3Fe57wxnzVM8zVu4pPI= +go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.temporal.io/sdk v1.38.0 h1:4Bok5LEdED7YKpsSjIa3dDqram5VOq+ydBf4pyx0Wo4= go.temporal.io/sdk v1.38.0/go.mod h1:a+R2Ej28ObvHoILbHaxMyind7M6D+W0L7edt5UJF4SE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/proto/internal/temporal/server/api/persistence/v1/executions.proto b/proto/internal/temporal/server/api/persistence/v1/executions.proto index 1d515bcdea..78177dcad0 100644 --- a/proto/internal/temporal/server/api/persistence/v1/executions.proto +++ b/proto/internal/temporal/server/api/persistence/v1/executions.proto @@ -331,9 +331,16 @@ message TimeSkippingInfo { // metadata bool enabled = 1; // runtime history - repeated google.protobuf.Timestamp skipped_time_offsets = 4; + repeated TimeSkippedDetails time_skipped_details = 2; } +message TimeSkippedDetails { + google.protobuf.Timestamp real_time_point_when_skipped = 1; + google.protobuf.Timestamp virtual_time_point_when_skipped = 2; + google.protobuf.Timestamp duration_to_skip = 3; + google.protobuf.Timestamp target_virtual_time_point = 4; +} + message ExecutionStats { int64 history_size = 1; // Total size in bytes of all external payloads referenced in the entire history tree of the execution, not just the current branch. diff --git a/service/history/historybuilder/event_factory.go b/service/history/historybuilder/event_factory.go index 81d3adaefe..802042cc11 100644 --- a/service/history/historybuilder/event_factory.go +++ b/service/history/historybuilder/event_factory.go @@ -1060,6 +1060,21 @@ func (b *EventFactory) CreateWorkflowExecutionUnpausedEvent( return event } +func (b *EventFactory) CreateWorkflowExecutionTimePointAdvancedEvent( + advanceToTimePoint time.Time, + durationToAdvance time.Duration, +) *historypb.HistoryEvent { + event := b.createHistoryEvent(enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED, b.timeSource.Now()) + event.Attributes = &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ + WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ + SkippedDuration: durationpb.New(durationToAdvance), + SkipToTimePoint: timestamppb.New(advanceToTimePoint), + }, + } + event.WorkerMayIgnore = true + return event +} + func (b *EventFactory) createHistoryEvent( eventType enumspb.EventType, time time.Time, diff --git a/service/history/historybuilder/event_store.go b/service/history/historybuilder/event_store.go index c4918c4521..da99134fc5 100644 --- a/service/history/historybuilder/event_store.go +++ b/service/history/historybuilder/event_store.go @@ -271,7 +271,8 @@ func (b *EventStore) bufferEvent( enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIMED_OUT, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW, - enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: + enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED, + enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED: return false case // workflow task event should not be buffered diff --git a/service/history/historybuilder/history_builder.go b/service/history/historybuilder/history_builder.go index 2572e05548..20cd3b0502 100644 --- a/service/history/historybuilder/history_builder.go +++ b/service/history/historybuilder/history_builder.go @@ -304,6 +304,19 @@ func (b *HistoryBuilder) AddWorkflowExecutionUnpausedEvent( return event } +// todo: @feiyang - try to align naming between TimeSkippingEvent +func (b *HistoryBuilder) AddWorkflowExecutionTimeSkippedEvent( + advanceToTimePoint time.Time, + durationToAdvance time.Duration, +) *historypb.HistoryEvent { + event := b.EventFactory.CreateWorkflowExecutionTimePointAdvancedEvent(advanceToTimePoint, durationToAdvance) + // Mark the event as 'worker may ignore' so that older SDKs can safely ignore it. + event.WorkerMayIgnore = true + event, _ = b.EventStore.add(event) + b.metricsHandler.Counter(metrics.ExecutionTimeSkippingEventCounter.Name()).Record(1) + return event +} + func (b *HistoryBuilder) AddActivityTaskScheduledEvent( workflowTaskCompletedEventID int64, command *commandpb.ScheduleActivityTaskCommandAttributes, diff --git a/service/history/interfaces/mutable_state.go b/service/history/interfaces/mutable_state.go index 0139bac3a1..3ccb7e8e6e 100644 --- a/service/history/interfaces/mutable_state.go +++ b/service/history/interfaces/mutable_state.go @@ -89,8 +89,10 @@ type ( AddTimeoutWorkflowEvent(int64, enumspb.RetryState, string) (*historypb.HistoryEvent, error) AddTimerCanceledEvent(int64, *commandpb.CancelTimerCommandAttributes, string) (*historypb.HistoryEvent, error) AddTimerFiredEvent(string) (*historypb.HistoryEvent, error) - AddTimeSkippingEvent(advancedTimeDuration time.Duration) (*historypb.HistoryEvent, error) + AddWorkflowExecutionTimeSkippedEvent(ctx context.Context, advanceToTimePoint time.Time) (*historypb.HistoryEvent, error) + ApplyWorkflowExecutionTimeSkippedEvent(ctx context.Context, event *historypb.HistoryEvent) error IsAutoTimeSkippable() bool + VirtualTimeNow() time.Time AddTimerStartedEvent(int64, *commandpb.StartTimerCommandAttributes) (*historypb.HistoryEvent, *persistencespb.TimerInfo, error) AddUpsertWorkflowSearchAttributesEvent(int64, *commandpb.UpsertWorkflowSearchAttributesCommandAttributes) (*historypb.HistoryEvent, error) AddWorkflowPropertiesModifiedEvent(int64, *commandpb.ModifyWorkflowPropertiesCommandAttributes) (*historypb.HistoryEvent, error) diff --git a/service/history/interfaces/mutable_state_mock.go b/service/history/interfaces/mutable_state_mock.go index 30dc3879ab..62306a89d4 100644 --- a/service/history/interfaces/mutable_state_mock.go +++ b/service/history/interfaces/mutable_state_mock.go @@ -556,21 +556,6 @@ func (mr *MockMutableStateMockRecorder) AddTasks(arg0 ...any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTasks", reflect.TypeOf((*MockMutableState)(nil).AddTasks), arg0...) } -// AddTimeSkippingEvent mocks base method. -func (m *MockMutableState) AddTimeSkippingEvent(advancedTimeDuration time.Duration) (*history.HistoryEvent, error) { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AddTimeSkippingEvent", advancedTimeDuration) - ret0, _ := ret[0].(*history.HistoryEvent) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// AddTimeSkippingEvent indicates an expected call of AddTimeSkippingEvent. -func (mr *MockMutableStateMockRecorder) AddTimeSkippingEvent(advancedTimeDuration any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTimeSkippingEvent", reflect.TypeOf((*MockMutableState)(nil).AddTimeSkippingEvent), advancedTimeDuration) -} - // AddTimeoutWorkflowEvent mocks base method. func (m *MockMutableState) AddTimeoutWorkflowEvent(arg0 int64, arg1 enums.RetryState, arg2 string) (*history.HistoryEvent, error) { m.ctrl.T.Helper() @@ -782,6 +767,21 @@ func (mr *MockMutableStateMockRecorder) AddWorkflowExecutionTerminatedEvent(firs return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddWorkflowExecutionTerminatedEvent", reflect.TypeOf((*MockMutableState)(nil).AddWorkflowExecutionTerminatedEvent), firstEventID, reason, details, identity, deleteAfterTerminate, links) } +// AddWorkflowExecutionTimeSkippedEvent mocks base method. +func (m *MockMutableState) AddWorkflowExecutionTimeSkippedEvent(ctx context.Context, advanceToTimePoint time.Time) (*history.HistoryEvent, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddWorkflowExecutionTimeSkippedEvent", ctx, advanceToTimePoint) + ret0, _ := ret[0].(*history.HistoryEvent) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// AddWorkflowExecutionTimeSkippedEvent indicates an expected call of AddWorkflowExecutionTimeSkippedEvent. +func (mr *MockMutableStateMockRecorder) AddWorkflowExecutionTimeSkippedEvent(ctx, advanceToTimePoint any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddWorkflowExecutionTimeSkippedEvent", reflect.TypeOf((*MockMutableState)(nil).AddWorkflowExecutionTimeSkippedEvent), ctx, advanceToTimePoint) +} + // AddWorkflowExecutionUnpausedEvent mocks base method. func (m *MockMutableState) AddWorkflowExecutionUnpausedEvent(identity, reason, requestID string) (*history.HistoryEvent, error) { m.ctrl.T.Helper() @@ -1513,6 +1513,20 @@ func (mr *MockMutableStateMockRecorder) ApplyWorkflowExecutionTerminatedEvent(ar return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyWorkflowExecutionTerminatedEvent", reflect.TypeOf((*MockMutableState)(nil).ApplyWorkflowExecutionTerminatedEvent), arg0, arg1) } +// ApplyWorkflowExecutionTimeSkippedEvent mocks base method. +func (m *MockMutableState) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.Context, arg0 *history.HistoryEvent) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ApplyWorkflowExecutionTimeSkippedEvent", ctx, arg0) + ret0, _ := ret[0].(error) + return ret0 +} + +// ApplyWorkflowExecutionTimeSkippedEvent indicates an expected call of ApplyWorkflowExecutionTimeSkippedEvent. +func (mr *MockMutableStateMockRecorder) ApplyWorkflowExecutionTimeSkippedEvent(ctx, arg0 any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyWorkflowExecutionTimeSkippedEvent", reflect.TypeOf((*MockMutableState)(nil).ApplyWorkflowExecutionTimeSkippedEvent), ctx, arg0) +} + // ApplyWorkflowExecutionTimedoutEvent mocks base method. func (m *MockMutableState) ApplyWorkflowExecutionTimedoutEvent(arg0 int64, arg1 *history.HistoryEvent) error { m.ctrl.T.Helper() @@ -3038,6 +3052,20 @@ func (mr *MockMutableStateMockRecorder) IsAutoTimeSkippable() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoTimeSkippable", reflect.TypeOf((*MockMutableState)(nil).IsAutoTimeSkippable)) } +// VirtualTimeNow mocks base method. +func (m *MockMutableState) VirtualTimeNow() time.Time { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VirtualTimeNow") + ret0, _ := ret[0].(time.Time) + return ret0 +} + +// VirtualTimeNow indicates an expected call of VirtualTimeNow. +func (mr *MockMutableStateMockRecorder) VirtualTimeNow() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualTimeNow", reflect.TypeOf((*MockMutableState)(nil).VirtualTimeNow)) +} + // IsCancelRequested mocks base method. func (m *MockMutableState) IsCancelRequested() bool { m.ctrl.T.Helper() diff --git a/service/history/tasks/utils.go b/service/history/tasks/utils.go index 1d6a385c08..3010e0f14d 100644 --- a/service/history/tasks/utils.go +++ b/service/history/tasks/utils.go @@ -112,6 +112,8 @@ func GetTimerTaskEventID( return getChasmTaskEventID() case *StateMachineTimerTask: eventID = common.FirstEventID + case *TimeSkippingTimerTask: + eventID = common.FirstEventID case *ChasmTaskPure: return getChasmTaskEventID() case *ChasmTask: diff --git a/service/history/timer_queue_active_task_executor.go b/service/history/timer_queue_active_task_executor.go index 78faddd27c..7ace583bda 100644 --- a/service/history/timer_queue_active_task_executor.go +++ b/service/history/timer_queue_active_task_executor.go @@ -3,6 +3,7 @@ package history import ( "context" "fmt" + "time" "github.com/google/uuid" commonpb "go.temporal.io/api/common/v1" @@ -169,7 +170,7 @@ func (t *timerQueueActiveTaskExecutor) executeTimeSkippingTimerTask( } timeSkippingInfo := mutableState.GetExecutionInfo().GetTimeSkippingInfo() if timeSkippingInfo == nil || !timeSkippingInfo.GetEnabled() { - t.logger.Warn("time skipping is not disabled when runnign this task, this should be a rare case") + t.logger.Warn("time skipping is not enabled when running this task, this should be a rare case") release(nil) return nil } @@ -190,19 +191,18 @@ func (t *timerQueueActiveTaskExecutor) executeTimeSkippingTimerTask( return nil } - now := t.Now() - nextTimerTs := userTimers[0].Timestamp // todo: @feiyang need to reorder? - if !nextTimerTs.After(now) { - // Already expired; the normal timer queue will handle it. - noSkippingReason = "next timer already expired" + advanceToTimePoint := userTimers[0].Timestamp // todo: @feiyang need to reorder? + if !advanceToTimePoint.After(mutableState.VirtualTimeNow().Add(1 * time.Second)) { + noSkippingReason = "next timer is close to now, skipping is not necessary" release(nil) return nil } - durationToAdvance := nextTimerTs.Sub(now) - // key step: of time skipping (event, mutable state update) - mutableState.AddTimeSkippingEvent(durationToAdvance) - return t.updateWorkflowExecution(ctx, weContext, mutableState, true) + // Persist the time skipped event, updated mutable state, and refreshed tasks atomically. + if _, err := mutableState.AddWorkflowExecutionTimeSkippedEvent(ctx, advanceToTimePoint); err != nil { + return err + } + return t.updateWorkflowExecution(ctx, weContext, mutableState, false) } func (t *timerQueueActiveTaskExecutor) executeUserTimerTimeoutTask( @@ -228,7 +228,8 @@ func (t *timerQueueActiveTaskExecutor) executeUserTimerTimeoutTask( } timerSequence := t.getTimerSequence(mutableState) - referenceTime := t.Now() + // Use virtual time as reference so time-skipped timers are recognized as expired. + referenceTime := mutableState.VirtualTimeNow() timerFired := false Loop: for _, timerSequenceID := range timerSequence.LoadAndSortUserTimers() { diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 888f8c748a..1a2c5df8e1 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -258,7 +258,7 @@ type ( clusterMetadata cluster.Metadata eventsCache events.Cache config *configs.Config - timeSource clock.TimeSource + timeSource clock.TimeSource logger log.Logger metricsHandler metrics.Handler stateMachineNode *hsm.Node @@ -502,6 +502,13 @@ func NewMutableStateFromDB( mutableState.approximateSize += dbRecord.ExecutionInfo.Size() - mutableState.executionInfo.Size() mutableState.executionInfo = dbRecord.ExecutionInfo + if mutableState.executionInfo.GetTimeSkippingInfo().GetEnabled() { + mutableState.timeSource = newTimeSkippingTimeSource( + mutableState.timeSource, + mutableState.executionInfo.TimeSkippingInfo.TimeSkippedDetails, + ) + } + // StartTime was moved from ExecutionInfo to executionState if mutableState.executionState.StartTime == nil && dbRecord.ExecutionInfo.StartTime != nil { mutableState.executionState.StartTime = dbRecord.ExecutionInfo.StartTime @@ -2756,6 +2763,7 @@ func (ms *MutableStateImpl) AddWorkflowExecutionStartedEventWithOptions( ms.executionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{ Enabled: true, } + ms.timeSource = newTimeSkippingTimeSource(ms.timeSource, nil) } // Versioning Override set on StartWorkflowExecutionRequest @@ -3926,6 +3934,124 @@ func (ms *MutableStateImpl) ApplyWorkflowTaskFailedEvent() error { return ms.workflowTaskManager.ApplyWorkflowTaskFailedEvent() } +// AddWorkflowExecutionTimeSkippedEvent adds a WorkflowExecutionTimeSkippedEvent to the history +// and refreshes tasks to reflect the advanced time point. +func (ms *MutableStateImpl) AddWorkflowExecutionTimeSkippedEvent( + ctx context.Context, + advanceToTimePoint time.Time, +) (*historypb.HistoryEvent, error) { + opTag := tag.WorkflowActionWorkflowTimeSkipped + if err := ms.checkMutability(opTag); err != nil { + return nil, err + } + + durationToAdvance := advanceToTimePoint.Sub(ms.timeSource.Now()) + event := ms.hBuilder.AddWorkflowExecutionTimeSkippedEvent(advanceToTimePoint, durationToAdvance) + if err := ms.ApplyWorkflowExecutionTimeSkippedEvent(ctx, event); err != nil { + return nil, err + } + return event, nil +} + +func (ms *MutableStateImpl) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.Context, event *historypb.HistoryEvent) error { + executionInfo := ms.GetExecutionInfo() + newDetails := buildTimeSkippedDetails(executionInfo.TimeSkippingInfo.TimeSkippedDetails, event) + executionInfo.TimeSkippingInfo.TimeSkippedDetails = append( + executionInfo.TimeSkippingInfo.TimeSkippedDetails, + newDetails, + ) + if ts, ok := ms.timeSource.(*TimeSkippingTimeSource); ok { + ts.advance(timeSkippedDurationFromTimestamp(newDetails.GetDurationToSkip())) + } + return NewTaskRefresher(ms.shard).Refresh(ctx, ms, false) +} + +// buildTimeSkippedDetails constructs a TimeSkippedDetails entry for a single skip event, +// accumulating previously skipped durations to compute the correct virtual time at the moment of this skip. +// +// VirtualTimeWhenSkipped = RealTime + sum(all previous DurationToSkip) +// TargetVirtualTimePoint = VirtualTimeWhenSkipped + DurationToSkip +func buildTimeSkippedDetails( + existingDetails []*persistencespb.TimeSkippedDetails, + event *historypb.HistoryEvent, +) *persistencespb.TimeSkippedDetails { + attrs := event.GetWorkflowExecutionTimeSkippedEventAttributes() + + var totalPreviouslySkipped time.Duration + for _, d := range existingDetails { + totalPreviouslySkipped += timeSkippedDurationFromTimestamp(d.GetDurationToSkip()) + } + + realTime := event.GetEventTime().AsTime() + virtualTimeWhenSkipped := realTime.Add(totalPreviouslySkipped) + skipDuration := attrs.GetSkippedDuration().AsDuration() + + return &persistencespb.TimeSkippedDetails{ + RealTimePointWhenSkipped: event.GetEventTime(), + VirtualTimePointWhenSkipped: timestamppb.New(virtualTimeWhenSkipped), + DurationToSkip: timeSkippedDurationToTimestamp(skipDuration), + TargetVirtualTimePoint: attrs.GetSkipToTimePoint(), + } +} + +// timeSkippedDurationToTimestamp encodes a time.Duration into a *timestamppb.Timestamp +// by storing seconds and nanoseconds directly in the Timestamp fields. +// This is a convention for the DurationToSkip field in TimeSkippedDetails. +func timeSkippedDurationToTimestamp(d time.Duration) *timestamppb.Timestamp { + return ×tamppb.Timestamp{ + Seconds: int64(d / time.Second), + Nanos: int32(d % time.Second), + } +} + +// timeSkippedDurationFromTimestamp reverses timeSkippedDurationToTimestamp. +func timeSkippedDurationFromTimestamp(ts *timestamppb.Timestamp) time.Duration { + if ts == nil { + return 0 + } + return time.Duration(ts.GetSeconds())*time.Second + time.Duration(ts.GetNanos()) +} + +// VirtualTimeNow returns the current effective time for this workflow. +// For workflows with time skipping enabled, this returns the virtual (advanced) time. +// For regular workflows, this returns the real shard time. +func (ms *MutableStateImpl) VirtualTimeNow() time.Time { + return ms.timeSource.Now() +} + +func (ms *MutableStateImpl) IsAutoTimeSkippable() bool { + noSkippingReason := "" + defer func() { + if noSkippingReason != "" { + ms.logInfo(fmt.Sprintf("no auto time skipping allowed: %s", noSkippingReason), + tag.WorkflowID(ms.GetExecutionInfo().WorkflowId), + tag.WorkflowRunID(ms.GetExecutionState().RunId), + ) + } + }() + if !ms.IsWorkflowExecutionRunning() { + noSkippingReason = "workflow is not running" + return false + } + if ms.HasPendingWorkflowTask() { + noSkippingReason = "pending workflow task" + return false + } + if len(ms.GetPendingActivityInfos()) > 0 { + noSkippingReason = "pending activity" + return false + } + if len(ms.GetPendingChildExecutionInfos()) > 0 { + noSkippingReason = "pending child execution" + return false + } + if nexusoperations.MachineCollection(ms.HSM()).Size() > 0 { + noSkippingReason = "pending Nexus operations" + return false + } + return true +} + func (ms *MutableStateImpl) AddActivityTaskScheduledEvent( workflowTaskCompletedEventID int64, command *commandpb.ScheduleActivityTaskCommandAttributes, @@ -3954,7 +4080,6 @@ func (ms *MutableStateImpl) AddActivityTaskScheduledEvent( return nil, nil, err } } - return event, ai, err } @@ -5472,8 +5597,18 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent(event *his // Update time skipping config. if tsc := attributes.GetTimeSkippingConfig(); tsc != nil { - ms.executionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{ - Enabled: tsc.GetEnabled(), + if ms.executionInfo.TimeSkippingInfo == nil { + ms.executionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{} + } + ms.executionInfo.TimeSkippingInfo.Enabled = tsc.GetEnabled() + + if tsc.GetEnabled() { + if _, alreadySkipping := ms.timeSource.(*TimeSkippingTimeSource); !alreadySkipping { + ms.timeSource = newTimeSkippingTimeSource( + ms.timeSource, + ms.executionInfo.TimeSkippingInfo.GetTimeSkippedDetails(), + ) + } } } @@ -9120,43 +9255,6 @@ func (ms *MutableStateImpl) SetVersioningRevisionNumber(revisionNumber int64) { ms.GetExecutionInfo().GetVersioningInfo().RevisionNumber = revisionNumber } -func (ms *MutableStateImpl) AddTimeSkippingEvent(advancedTimeDuration time.Duration) (*historypb.HistoryEvent, error) { - // todo: @feiyang to be implemented - return nil, nil -} -func (ms *MutableStateImpl) IsAutoTimeSkippable() bool { - noSkippingReason := "" - defer func() { - if noSkippingReason != "" { - ms.logInfo(fmt.Sprintf("no auto time skipping allowed: %s", noSkippingReason), - tag.WorkflowID(ms.GetExecutionInfo().WorkflowId), - tag.WorkflowRunID(ms.GetExecutionState().RunId), - ) - } - }() - if !ms.IsWorkflowExecutionRunning() { - noSkippingReason = "workflow is not running" - return false - } - if ms.HasPendingWorkflowTask() { - noSkippingReason = "pending workflow task" - return false - } - if len(ms.GetPendingActivityInfos()) > 0 { - noSkippingReason = "pending activity" - return false - } - if len(ms.GetPendingChildExecutionInfos()) > 0 { - noSkippingReason = "pending child execution" - return false - } - if nexusoperations.MachineCollection(ms.HSM()).Size() > 0 { - noSkippingReason = "pending Nexus operations" - return false - } - return true -} - // reschedulePendingActivities reschedules all the activities that are not started, so they are // scheduled against the right queue in matching. func (ms *MutableStateImpl) reschedulePendingActivities(wftScheduleToClose time.Duration) error { diff --git a/service/history/workflow/mutable_state_impl_test.go b/service/history/workflow/mutable_state_impl_test.go index 9e174f0277..19d103ec38 100644 --- a/service/history/workflow/mutable_state_impl_test.go +++ b/service/history/workflow/mutable_state_impl_test.go @@ -6149,3 +6149,128 @@ func (s *mutableStateSuite) TestSetContextMetadata() { s.True(ok) s.Equal(taskQueue, tq) } + +// --------------------------------------------------------------------------- +// Time-skipping unit tests +// --------------------------------------------------------------------------- + +func (s *mutableStateSuite) TestBuildTimeSkippedDetails_FirstSkip() { + realTime := time.Date(2024, 1, 1, 12, 0, 0, 0, time.UTC) + skipDuration := 2 * time.Hour + targetVirtualTime := realTime.Add(skipDuration) + + event := &historypb.HistoryEvent{ + EventTime: timestamppb.New(realTime), + Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ + WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ + SkippedDuration: durationpb.New(skipDuration), + SkipToTimePoint: timestamppb.New(targetVirtualTime), + }, + }, + } + + details := buildTimeSkippedDetails(nil, event) + + // Real time is the event time. + s.Equal(realTime, details.GetRealTimePointWhenSkipped().AsTime()) + // No previous skips: virtual time when skipped == real time. + s.Equal(realTime, details.GetVirtualTimePointWhenSkipped().AsTime()) + // Duration encodes correctly. + s.Equal(skipDuration, timeSkippedDurationFromTimestamp(details.GetDurationToSkip())) + // Target = realTime + 2h. + s.Equal(targetVirtualTime, details.GetTargetVirtualTimePoint().AsTime()) +} + +func (s *mutableStateSuite) TestBuildTimeSkippedDetails_SecondSkip_AccumulatesPreviousDuration() { + // First skip: real 12:00, skip 2h → virtual advances to 14:00. + realTime1 := time.Date(2024, 1, 1, 12, 0, 0, 0, time.UTC) + skipDuration1 := 2 * time.Hour + targetVirtual1 := realTime1.Add(skipDuration1) // 14:00 virtual + + event1 := &historypb.HistoryEvent{ + EventTime: timestamppb.New(realTime1), + Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ + WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ + SkippedDuration: durationpb.New(skipDuration1), + SkipToTimePoint: timestamppb.New(targetVirtual1), + }, + }, + } + details1 := buildTimeSkippedDetails(nil, event1) + + // Second skip: real clock advanced 1h to 13:00, skip 3h more. + // Virtual time at this moment = 13:00 real + 2h (prev skip) = 15:00 virtual. + realTime2 := time.Date(2024, 1, 1, 13, 0, 0, 0, time.UTC) + skipDuration2 := 3 * time.Hour + expectedVirtualAtSkip2 := realTime2.Add(skipDuration1) // 15:00 virtual + targetVirtual2 := expectedVirtualAtSkip2.Add(skipDuration2) // 18:00 virtual + + event2 := &historypb.HistoryEvent{ + EventTime: timestamppb.New(realTime2), + Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ + WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ + SkippedDuration: durationpb.New(skipDuration2), + SkipToTimePoint: timestamppb.New(targetVirtual2), + }, + }, + } + details2 := buildTimeSkippedDetails([]*persistencespb.TimeSkippedDetails{details1}, event2) + + s.Equal(realTime2, details2.GetRealTimePointWhenSkipped().AsTime()) + // Virtual time when skipped = real2 + sum of previous durations = 13:00 + 2h = 15:00. + s.Equal(expectedVirtualAtSkip2, details2.GetVirtualTimePointWhenSkipped().AsTime()) + s.Equal(skipDuration2, timeSkippedDurationFromTimestamp(details2.GetDurationToSkip())) + s.Equal(targetVirtual2, details2.GetTargetVirtualTimePoint().AsTime()) +} + +func (s *mutableStateSuite) TestBuildTimeSkippedDetails_ThreeSkips_VirtualTimeAccumulates() { + base := time.Date(2024, 1, 1, 10, 0, 0, 0, time.UTC) + + type skipInput struct { + realTime time.Time + skipDuration time.Duration + } + skips := []skipInput{ + {base, 1 * time.Hour}, // skip1: real=10:00, +1h + {base.Add(30 * time.Minute), 2 * time.Hour}, // skip2: real=10:30, +2h + {base.Add(45 * time.Minute), 3 * time.Hour}, // skip3: real=10:45, +3h + } + + var accumulated []*persistencespb.TimeSkippedDetails + var prevTotalSkipped time.Duration + for i, sk := range skips { + targetVirtual := sk.realTime.Add(prevTotalSkipped + sk.skipDuration) + event := &historypb.HistoryEvent{ + EventTime: timestamppb.New(sk.realTime), + Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ + WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ + SkippedDuration: durationpb.New(sk.skipDuration), + SkipToTimePoint: timestamppb.New(targetVirtual), + }, + }, + } + d := buildTimeSkippedDetails(accumulated, event) + + s.Equal(sk.realTime, d.GetRealTimePointWhenSkipped().AsTime(), "skip %d: real time", i) + s.Equal(sk.realTime.Add(prevTotalSkipped), d.GetVirtualTimePointWhenSkipped().AsTime(), "skip %d: virtual time when skipped", i) + s.Equal(sk.skipDuration, timeSkippedDurationFromTimestamp(d.GetDurationToSkip()), "skip %d: duration", i) + s.Equal(targetVirtual, d.GetTargetVirtualTimePoint().AsTime(), "skip %d: target virtual time", i) + + accumulated = append(accumulated, d) + prevTotalSkipped += sk.skipDuration + } +} + +func (s *mutableStateSuite) TestTimeSkippedDurationRoundtrip() { + durations := []time.Duration{ + 0, + time.Second, + time.Minute, + time.Hour, + 2*time.Hour + 30*time.Minute + 15*time.Second, + 24 * time.Hour, + } + for _, d := range durations { + s.Equal(d, timeSkippedDurationFromTimestamp(timeSkippedDurationToTimestamp(d)), "duration: %v", d) + } +} diff --git a/service/history/workflow/task_refresher.go b/service/history/workflow/task_refresher.go index b9315cfc00..7eb1a5c45e 100644 --- a/service/history/workflow/task_refresher.go +++ b/service/history/workflow/task_refresher.go @@ -14,6 +14,7 @@ import ( "go.temporal.io/server/common/primitives/timestamp" "go.temporal.io/server/service/history/hsm" historyi "go.temporal.io/server/service/history/interfaces" + "go.temporal.io/server/service/history/tasks" ) type ( @@ -75,6 +76,8 @@ func (r *TaskRefresherImpl) Refresh( return err } + r.applyTimeSkippingOffsetToUserTimerTasks(mutableState) + if err := mutableState.ChasmTree().RefreshTasks(); err != nil { return err } @@ -688,3 +691,37 @@ func (r *TaskRefresherImpl) refreshTasksForSubStateMachines( return nil } + +// applyTimeSkippingOffsetToUserTimerTasks shifts the VisibilityTimestamp of all user timer tasks +// that were just generated by subtracting the total skipped duration. This ensures the timer queue +// fires them at the correct real-clock time relative to the advanced virtual clock. +// +// skippedDuration = latestSkipToTimePoint - realNow +// adjustedFireTime = virtualFireTime - skippedDuration +func (r *TaskRefresherImpl) applyTimeSkippingOffsetToUserTimerTasks(mutableState historyi.MutableState) { + timeSkippingInfo := mutableState.GetExecutionInfo().GetTimeSkippingInfo() + if timeSkippingInfo == nil { + return + } + details := timeSkippingInfo.GetTimeSkippedDetails() + if len(details) == 0 { + return + } + + latestDetail := details[len(details)-1] + latestTargetVirtualTime := latestDetail.GetTargetVirtualTimePoint().AsTime() + skippedDuration := latestTargetVirtualTime.Sub(r.shard.GetTimeSource().Now()) + if skippedDuration <= 0 { + return + } + + ms, ok := mutableState.(*MutableStateImpl) + if !ok { + return + } + for _, task := range ms.InsertTasks[tasks.CategoryTimer] { + if userTimerTask, ok := task.(*tasks.UserTimerTask); ok { + userTimerTask.VisibilityTimestamp = userTimerTask.VisibilityTimestamp.Add(-skippedDuration) + } + } +} diff --git a/service/history/workflow/time_skipping_time_source.go b/service/history/workflow/time_skipping_time_source.go new file mode 100644 index 0000000000..5d00d989a8 --- /dev/null +++ b/service/history/workflow/time_skipping_time_source.go @@ -0,0 +1,62 @@ +package workflow + +import ( + "time" + + persistencespb "go.temporal.io/server/api/persistence/v1" + "go.temporal.io/server/common/clock" +) + +// TimeSkippingTimeSource wraps a real TimeSource and adds a virtual time offset. +// When time skipping is enabled for a workflow, the workflow's "now" is real time + offset. +// The offset accumulates across skip events and is reconstructed from persisted +// TimeSkippedDetails on workflow reload — no separate field needs to be persisted. +type TimeSkippingTimeSource struct { + base clock.TimeSource + offset time.Duration +} + +var _ clock.TimeSource = (*TimeSkippingTimeSource)(nil) + +// newTimeSkippingTimeSource creates a TimeSkippingTimeSource whose offset is the sum of all +// previously skipped durations. Pass nil or empty details when starting a new workflow. +func newTimeSkippingTimeSource(base clock.TimeSource, details []*persistencespb.TimeSkippedDetails) *TimeSkippingTimeSource { + return &TimeSkippingTimeSource{ + base: base, + offset: computeTotalSkippedOffset(details), + } +} + +// Now returns the current virtual time (real time + accumulated skipped offset). +func (ts *TimeSkippingTimeSource) Now() time.Time { + return ts.base.Now().Add(ts.offset) +} + +// Since returns the time elapsed since t in virtual time. +func (ts *TimeSkippingTimeSource) Since(t time.Time) time.Duration { + return ts.Now().Sub(t) +} + +// AfterFunc delegates to the base time source. OS-level timers run on real wall clock. +func (ts *TimeSkippingTimeSource) AfterFunc(d time.Duration, f func()) clock.Timer { + return ts.base.AfterFunc(d, f) +} + +// NewTimer delegates to the base time source. OS-level timers run on real wall clock. +func (ts *TimeSkippingTimeSource) NewTimer(d time.Duration) (<-chan time.Time, clock.Timer) { + return ts.base.NewTimer(d) +} + +// advance increases the virtual time offset by d. +func (ts *TimeSkippingTimeSource) advance(d time.Duration) { + ts.offset += d +} + +// computeTotalSkippedOffset sums all DurationToSkip values from persisted TimeSkippedDetails. +func computeTotalSkippedOffset(details []*persistencespb.TimeSkippedDetails) time.Duration { + var total time.Duration + for _, d := range details { + total += timeSkippedDurationFromTimestamp(d.GetDurationToSkip()) + } + return total +} diff --git a/service/history/workflow/time_skipping_time_source_test.go b/service/history/workflow/time_skipping_time_source_test.go new file mode 100644 index 0000000000..33132b834f --- /dev/null +++ b/service/history/workflow/time_skipping_time_source_test.go @@ -0,0 +1,121 @@ +package workflow + +import ( + "testing" + "time" + + "github.com/stretchr/testify/assert" + persistencespb "go.temporal.io/server/api/persistence/v1" + "go.temporal.io/server/common/clock" + "google.golang.org/protobuf/types/known/timestamppb" +) + +func TestTimeSkippingTimeSource_NowWithNoSkip(t *testing.T) { + base := clock.NewEventTimeSource() + base.Update(time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)) + + ts := newTimeSkippingTimeSource(base, nil) + + assert.Equal(t, base.Now(), ts.Now()) +} + +func TestTimeSkippingTimeSource_NowAfterAdvance(t *testing.T) { + base := clock.NewEventTimeSource() + realNow := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) + base.Update(realNow) + + ts := newTimeSkippingTimeSource(base, nil) + ts.advance(24 * time.Hour) + + assert.Equal(t, realNow.Add(24*time.Hour), ts.Now()) + // base is unchanged + assert.Equal(t, realNow, base.Now()) +} + +func TestTimeSkippingTimeSource_NowWithMultipleAdvances(t *testing.T) { + base := clock.NewEventTimeSource() + realNow := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) + base.Update(realNow) + + ts := newTimeSkippingTimeSource(base, nil) + ts.advance(24 * time.Hour) + ts.advance(48 * time.Hour) + + assert.Equal(t, realNow.Add(72*time.Hour), ts.Now()) +} + +func TestTimeSkippingTimeSource_ReconstructedFromPersistedDetails(t *testing.T) { + base := clock.NewEventTimeSource() + realNow := time.Date(2025, 6, 1, 12, 0, 0, 0, time.UTC) + base.Update(realNow) + + // Simulate two previously persisted skip events: 10h + 5h = 15h total offset + details := []*persistencespb.TimeSkippedDetails{ + {DurationToSkip: timeSkippedDurationToTimestamp(10 * time.Hour)}, + {DurationToSkip: timeSkippedDurationToTimestamp(5 * time.Hour)}, + } + + ts := newTimeSkippingTimeSource(base, details) + + assert.Equal(t, realNow.Add(15*time.Hour), ts.Now()) +} + +func TestTimeSkippingTimeSource_Since(t *testing.T) { + base := clock.NewEventTimeSource() + realNow := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) + base.Update(realNow) + + ts := newTimeSkippingTimeSource(base, nil) + ts.advance(10 * time.Hour) + + past := realNow.Add(-5 * time.Hour) // 5 hours before real now + // virtual now = realNow + 10h, so since(past) = 15h + assert.Equal(t, 15*time.Hour, ts.Since(past)) +} + +func TestTimeSkippingTimeSource_DelegatesTimersToBase(t *testing.T) { + base := clock.NewEventTimeSource() + base.Update(time.Now()) + + ts := newTimeSkippingTimeSource(base, nil) + + fired := false + ts.AfterFunc(time.Millisecond, func() { fired = true }) + base.Advance(time.Millisecond) + + assert.True(t, fired, "AfterFunc should fire via base time source") +} + +func TestComputeTotalSkippedOffset(t *testing.T) { + details := []*persistencespb.TimeSkippedDetails{ + {DurationToSkip: timeSkippedDurationToTimestamp(3 * time.Hour)}, + {DurationToSkip: timeSkippedDurationToTimestamp(7 * time.Hour)}, + {DurationToSkip: timeSkippedDurationToTimestamp(2 * time.Hour)}, + } + assert.Equal(t, 12*time.Hour, computeTotalSkippedOffset(details)) +} + +func TestComputeTotalSkippedOffset_Empty(t *testing.T) { + assert.Equal(t, time.Duration(0), computeTotalSkippedOffset(nil)) + assert.Equal(t, time.Duration(0), computeTotalSkippedOffset([]*persistencespb.TimeSkippedDetails{})) +} + +// roundtrip helper — verifies encoding/decoding is consistent +func TestTimeSkippedDurationRoundtrip(t *testing.T) { + durations := []time.Duration{ + 0, + time.Second, + time.Hour, + 24 * time.Hour, + 365 * 24 * time.Hour, + time.Hour + 30*time.Minute + 15*time.Second, + } + for _, d := range durations { + ts := timeSkippedDurationToTimestamp(d) + assert.Equal(t, d, timeSkippedDurationFromTimestamp(ts)) + } +} + +func TestTimeSkippedDurationFromTimestamp_Nil(t *testing.T) { + assert.Equal(t, time.Duration(0), timeSkippedDurationFromTimestamp((*timestamppb.Timestamp)(nil))) +} diff --git a/tests/timeskipping_test.go b/tests/timeskipping_test.go index 7a78420850..552b2b63cd 100644 --- a/tests/timeskipping_test.go +++ b/tests/timeskipping_test.go @@ -1,16 +1,20 @@ package tests import ( + "context" + "fmt" "testing" "time" "github.com/google/uuid" "github.com/stretchr/testify/suite" + commandpb "go.temporal.io/api/command/v1" commonpb "go.temporal.io/api/common/v1" enumspb "go.temporal.io/api/enums/v1" taskqueuepb "go.temporal.io/api/taskqueue/v1" workflowpb "go.temporal.io/api/workflow/v1" "go.temporal.io/api/workflowservice/v1" + "go.temporal.io/sdk/workflow" "go.temporal.io/server/common/dynamicconfig" "go.temporal.io/server/common/testing/taskpoller" "go.temporal.io/server/common/testing/testvars" @@ -224,3 +228,261 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_FeatureDisabled() { }) s.Error(err, "expected error when time skipping is disabled for namespace") } + +// TestTimeSkipping_TimerFiresAfterSkip starts a workflow with time skipping enabled +// that mimics: sleep(1h) → check time → sleep(1h) → check time → complete. +// Each sleep is a separate timer scheduled sequentially. The time-skipping mechanism +// advances virtual time once per timer, completing the workflow in wall-clock seconds. +// Virtual time is verified at each checkpoint via WorkflowTaskStarted event timestamps. +func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_Server() { + s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) + + id := "functional-timeskipping-timer-fires-after-skip" + tl := "functional-timeskipping-timer-fires-after-skip-tq" + tv := testvars.New(s.T()).WithTaskQueue(tl) + + startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: id, + WorkflowType: &commonpb.WorkflowType{Name: id + "-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(3 * time.Hour), // must exceed total timer duration (2h) + WorkflowTaskTimeout: durationpb.New(10 * time.Second), + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.NoError(err) + workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.RunId} + + poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + taskQueue := &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL} + + startTimer := func(id string, d time.Duration) *commandpb.Command { + return &commandpb.Command{ + CommandType: enumspb.COMMAND_TYPE_START_TIMER, + Attributes: &commandpb.Command_StartTimerCommandAttributes{ + StartTimerCommandAttributes: &commandpb.StartTimerCommandAttributes{ + TimerId: id, + StartToFireTimeout: durationpb.New(d), + }, + }, + } + } + + virtualNow := func(task *workflowservice.PollWorkflowTaskQueueResponse) time.Time { + events := task.GetHistory().GetEvents() + return events[len(events)-1].GetEventTime().AsTime() + } + + // WT1: sleep(1h) — schedule the first 1-hour timer. Capture workflow start time. + var startTime time.Time + _, err = poller.PollWorkflowTask( + &workflowservice.PollWorkflowTaskQueueRequest{TaskQueue: taskQueue}, + ).HandleTask(tv, func(task *workflowservice.PollWorkflowTaskQueueResponse) (*workflowservice.RespondWorkflowTaskCompletedRequest, error) { + startTime = task.GetHistory().GetEvents()[0].GetEventTime().AsTime() + return &workflowservice.RespondWorkflowTaskCompletedRequest{ + Commands: []*commandpb.Command{startTimer("sleep-1", time.Hour)}, + }, nil + }) + s.NoError(err) + + // WT2: fires after the first 1h skip. Check virtual time ≈ start+1h, then sleep(1h) again. + _, err = poller.PollWorkflowTask( + &workflowservice.PollWorkflowTaskQueueRequest{TaskQueue: taskQueue}, + ).HandleTask(tv, func(task *workflowservice.PollWorkflowTaskQueueResponse) (*workflowservice.RespondWorkflowTaskCompletedRequest, error) { + s.True( + virtualNow(task).Sub(startTime) >= time.Hour, + "expected virtual time ≥ start+1h after first skip, got %v", virtualNow(task).Sub(startTime), + ) + s.True( + virtualNow(task).Sub(startTime) <= time.Hour+5*time.Second, + "expected virtual time ≤ start+1h+5s after first skip, got %v", virtualNow(task).Sub(startTime), + ) + return &workflowservice.RespondWorkflowTaskCompletedRequest{ + Commands: []*commandpb.Command{startTimer("sleep-2", time.Hour)}, + }, nil + }) + s.NoError(err) + + // WT3: fires after the second 1h skip. Check virtual time ≈ start+2h, then complete. + _, err = poller.PollWorkflowTask( + &workflowservice.PollWorkflowTaskQueueRequest{TaskQueue: taskQueue}, + ).HandleTask(tv, func(task *workflowservice.PollWorkflowTaskQueueResponse) (*workflowservice.RespondWorkflowTaskCompletedRequest, error) { + s.True( + virtualNow(task).Sub(startTime) >= 2*time.Hour, + "expected virtual time ≥ start+2h after second skip, got %v", virtualNow(task).Sub(startTime), + ) + s.True( + virtualNow(task).Sub(startTime) <= 2*time.Hour+5*time.Second, + "expected virtual time ≤ start+2h+5s after second skip, got %v", virtualNow(task).Sub(startTime), + ) + return taskpoller.CompleteWorkflowHandler(task) + }) + s.NoError(err) + + s.EqualHistoryEvents(` + 1 WorkflowExecutionStarted + 2 WorkflowTaskScheduled + 3 WorkflowTaskStarted + 4 WorkflowTaskCompleted + 5 TimerStarted + 6 WorkflowExecutionTimeSkipped + 7 TimerFired + 8 WorkflowTaskScheduled + 9 WorkflowTaskStarted + 10 WorkflowTaskCompleted + 11 TimerStarted + 12 WorkflowExecutionTimeSkipped + 13 TimerFired + 14 WorkflowTaskScheduled + 15 WorkflowTaskStarted + 16 WorkflowTaskCompleted + 17 WorkflowExecutionCompleted +`, s.GetHistory(s.Namespace().String(), workflowExecution)) +} + +// TestTimeSkipping_EnableMidFlight starts a workflow without time skipping, waits for +// it to reach a 1h timer, then enables time skipping via UpdateWorkflowExecutionOptions. +// Verifies the workflow completes quickly and workflow.Now() reflects virtual time ≈ start+1h. +func (s *TimeSkippingTestSuite) TestTimeSkipping_EnableMidFlight() { + s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) + + type result struct { + StartTime time.Time + TimeAfterSleep time.Time + } + + workflowFn := func(ctx workflow.Context) (result, error) { + startTime := workflow.Now(ctx) + if err := workflow.Sleep(ctx, time.Hour); err != nil { + return result{}, err + } + return result{startTime, workflow.Now(ctx)}, nil + } + + const wfType = "timeskipping-enable-mid-flight" + s.Worker().RegisterWorkflowWithOptions(workflowFn, workflow.RegisterOptions{Name: wfType}) + + const wfID = "functional-timeskipping-enable-mid-flight" + startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: wfID, + WorkflowType: &commonpb.WorkflowType{Name: wfType}, + TaskQueue: &taskqueuepb.TaskQueue{Name: s.TaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(3 * time.Hour), + // No TimeSkippingConfig — time skipping disabled at start. + }) + s.NoError(err) + + // Give the SDK worker time to execute the first WorkflowTask and schedule the timer. + time.Sleep(1 * time.Second) + // Enable time skipping mid-flight — the already-scheduled 1h timer should fire virtually. + s.updateTimeSkipping(&commonpb.WorkflowExecution{WorkflowId: wfID, RunId: startResp.RunId}, "test", true) + // The time-skip fires the 1h timer virtually; give the task executor and SDK worker + // a few seconds to complete the chain (two timer tasks + one workflow task). + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) + defer cancel() + var res result + s.NoError(s.SdkClient().GetWorkflow(context.Background(), wfID, startResp.RunId).Get(ctx, &res)) + + elapsed := res.TimeAfterSleep.Sub(res.StartTime) + s.True(elapsed >= time.Hour, + "expected virtual time ≥ start+1h after skip, got %v", elapsed) + fmt.Println("time elapsed: ", elapsed.Minutes()) + s.True(elapsed <= time.Hour+10*time.Second, + "expected virtual time ≤ start+1h+5s after skip, got %v", elapsed) +} + +// TestTimeSkipping_SDK_UserTimers uses a real SDK worker to run a workflow that: +// 1. sleep(1h) — skipped virtually +// 2. run a dummy activity — must complete without timeout +// 3. sleep(1h) — skipped virtually +// +// Verifies that workflow.Now() reflects virtual time at each checkpoint, and that +// the activity completes successfully (time skipping does not cause spurious timeouts). +func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_SDKIntegration() { + s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) + + // Dummy activity — returns immediately with the real wall-clock time it ran at, + // so the test can confirm it executed well within its timeout window. + activityFn := func(ctx context.Context) (time.Time, error) { + return time.Now(), nil + } + s.Worker().RegisterActivity(activityFn) + + type result struct { + StartTime time.Time + TimeAfterFirstSleep time.Time + ActivityRealTime time.Time // real wall-clock time the activity body ran + TimeAfterSecondSleep time.Time + } + + workflowFn := func(ctx workflow.Context) (result, error) { + startTime := workflow.Now(ctx) + + if err := workflow.Sleep(ctx, time.Hour); err != nil { + return result{}, err + } + t1 := workflow.Now(ctx) + + // Run the dummy activity between the two sleeps. + // A 10-second start-to-close timeout is generous for a no-op activity. + var activityRealTime time.Time + actCtx := workflow.WithActivityOptions(ctx, workflow.ActivityOptions{ + StartToCloseTimeout: 10 * time.Second, + }) + if err := workflow.ExecuteActivity(actCtx, activityFn).Get(ctx, &activityRealTime); err != nil { + return result{}, err + } + + if err := workflow.Sleep(ctx, time.Hour); err != nil { + return result{}, err + } + t2 := workflow.Now(ctx) + + return result{startTime, t1, activityRealTime, t2}, nil + } + + // Register with an explicit name so we can pass it to the gRPC start request. + const wfType = "timeskipping-sdk-sleep-workflow" + s.Worker().RegisterWorkflowWithOptions(workflowFn, workflow.RegisterOptions{Name: wfType}) + + // The SDK's StartWorkflowOptions does not expose TimeSkippingConfig yet, so start + // via the gRPC frontend directly, then obtain the run handle from SdkClient. + const wfID = "functional-timeskipping-sdk-user-timers" + startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: wfID, + WorkflowType: &commonpb.WorkflowType{Name: wfType}, + TaskQueue: &taskqueuepb.TaskQueue{Name: s.TaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(3 * time.Hour), + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.NoError(err) + + run := s.SdkClient().GetWorkflow(context.Background(), wfID, startResp.RunId) + + var res result + s.NoError(run.Get(context.Background(), &res)) + + // workflow.Now() after first sleep should be ~1h after start + s.True(res.TimeAfterFirstSleep.Sub(res.StartTime) >= time.Hour, + "expected virtual time ≥ start+1h after first sleep, got %v", res.TimeAfterFirstSleep.Sub(res.StartTime)) + s.True(res.TimeAfterFirstSleep.Sub(res.StartTime) <= time.Hour+3*time.Second, + "expected virtual time ≤ start+1h+3s after first sleep, got %v", res.TimeAfterFirstSleep.Sub(res.StartTime)) + + // The activity ran at a real wall-clock time after the first skip, so its real + // execution time must be within the 10-second start-to-close timeout window. + s.True(res.ActivityRealTime.After(res.StartTime), + "activity should have run after workflow start") + s.True(time.Since(res.ActivityRealTime) < 30*time.Second, + "activity real execution time should be recent (within test wall-clock), got %v ago", time.Since(res.ActivityRealTime)) + + // workflow.Now() after second sleep should be ~2h after start + s.True(res.TimeAfterSecondSleep.Sub(res.StartTime) >= 2*time.Hour, + "expected virtual time ≥ start+2h after second sleep, got %v", res.TimeAfterSecondSleep.Sub(res.StartTime)) + s.True(res.TimeAfterSecondSleep.Sub(res.StartTime) <= 2*time.Hour+3*time.Second, + "expected virtual time ≤ start+2h+3s after second sleep, got %v", res.TimeAfterSecondSleep.Sub(res.StartTime)) +} From 62746b33941433983aa666602cb2d2bd734d91f8 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Sun, 22 Mar 2026 21:38:29 -0700 Subject: [PATCH 4/7] timeskipping-poc: fix code lint, conflicts Co-Authored-By: Claude Sonnet 4.6 --- .../v1/executions.go-helpers.pb.go | 49 +- api/persistence/v1/executions.pb.go | 1238 ++++-------- .../v1/activity_state.go-helpers.pb.go | 292 +++ .../gen/activitypb/v1/activity_state.pb.go | 1061 ++++++++++ .../v1/request_response.go-helpers.pb.go | 450 +++++ .../gen/activitypb/v1/request_response.pb.go | 686 +++++++ .../activity/gen/activitypb/v1/service.pb.go | 96 + .../gen/activitypb/v1/service_client.pb.go | 318 +++ .../gen/activitypb/v1/service_grpc.pb.go | 295 +++ .../gen/activitypb/v1/tasks.go-helpers.pb.go | 191 ++ .../activity/gen/activitypb/v1/tasks.pb.go | 307 +++ .../callbackpb/v1/message.go-helpers.pb.go | 104 + .../callback/gen/callbackpb/v1/message.pb.go | 490 +++++ .../gen/callbackpb/v1/tasks.go-helpers.pb.go | 80 + .../callback/gen/callbackpb/v1/tasks.pb.go | 172 ++ .../v1/operation.go-helpers.pb.go | 129 ++ .../gen/nexusoperationpb/v1/operation.pb.go | 375 ++++ .../v1/tasks.go-helpers.pb.go | 191 ++ .../gen/nexusoperationpb/v1/tasks.pb.go | 311 +++ .../schedulerpb/v1/message.go-helpers.pb.go | 265 +++ .../gen/schedulerpb/v1/message.pb.go | 749 +++++++ .../gen/schedulerpb/v1/tasks.go-helpers.pb.go | 265 +++ .../scheduler/gen/schedulerpb/v1/tasks.pb.go | 367 ++++ .../gen/testspb/v1/message.go-helpers.pb.go | 117 ++ chasm/lib/tests/gen/testspb/v1/message.pb.go | 266 +++ .../v1/request_response.go-helpers.pb.go | 80 + .../gen/testspb/v1/request_response.pb.go | 181 ++ chasm/lib/tests/gen/testspb/v1/service.pb.go | 70 + .../tests/gen/testspb/v1/service_client.pb.go | 104 + .../tests/gen/testspb/v1/service_grpc.pb.go | 110 ++ common/metrics/metric_defs.go | 9 +- .../serialization/task_serializers.go | 6 +- go.mod | 2 +- go.sum | 2 + .../api/persistence/v1/executions.proto | 13 +- service/frontend/workflow_handler.go | 2 - .../history/api/updateworkflowoptions/api.go | 1 - .../history/historybuilder/event_factory.go | 4 +- .../history/historybuilder/history_builder.go | 8 +- .../history/interfaces/mutable_state_mock.go | 36 +- service/history/workflow/context.go | 12 - .../history/workflow/mutable_state_impl.go | 43 +- .../workflow/mutable_state_impl_test.go | 82 +- service/history/workflow/task_refresher.go | 2 +- setting_gen.go | 1733 ----------------- tests/timeskipping_test.go | 251 ++- 46 files changed, 8854 insertions(+), 2761 deletions(-) create mode 100644 chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/request_response.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/service.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/service_client.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go create mode 100644 chasm/lib/activity/gen/activitypb/v1/tasks.pb.go create mode 100644 chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go create mode 100644 chasm/lib/callback/gen/callbackpb/v1/message.pb.go create mode 100644 chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go create mode 100644 chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go create mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go create mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go create mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go create mode 100644 chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go create mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go create mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go create mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go create mode 100644 chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/message.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/request_response.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/service.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/service_client.pb.go create mode 100644 chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go delete mode 100644 setting_gen.go diff --git a/api/persistence/v1/executions.go-helpers.pb.go b/api/persistence/v1/executions.go-helpers.pb.go index 04d45b6945..9a25605460 100644 --- a/api/persistence/v1/executions.go-helpers.pb.go +++ b/api/persistence/v1/executions.go-helpers.pb.go @@ -79,7 +79,6 @@ func (this *WorkflowExecutionInfo) Equal(that interface{}) bool { return proto.Equal(this, that1) } -<<<<<<< HEAD // Marshal an object of type LastNotifiedTargetVersion to the protobuf v3 wire format func (val *LastNotifiedTargetVersion) Marshal() ([]byte, error) { return proto.Marshal(val) @@ -87,20 +86,10 @@ func (val *LastNotifiedTargetVersion) Marshal() ([]byte, error) { // Unmarshal an object of type LastNotifiedTargetVersion from the protobuf v3 wire format func (val *LastNotifiedTargetVersion) Unmarshal(buf []byte) error { -======= -// Marshal an object of type TimeSkippingInfo to the protobuf v3 wire format -func (val *TimeSkippingInfo) Marshal() ([]byte, error) { - return proto.Marshal(val) -} - -// Unmarshal an object of type TimeSkippingInfo from the protobuf v3 wire format -func (val *TimeSkippingInfo) Unmarshal(buf []byte) error { ->>>>>>> 286ac49dc (timeskipping-poc: control plane) return proto.Unmarshal(buf, val) } // Size returns the size of the object, in bytes, once serialized -<<<<<<< HEAD func (val *LastNotifiedTargetVersion) Size() int { return proto.Size(val) } @@ -110,7 +99,34 @@ func (val *LastNotifiedTargetVersion) Size() int { // For more information see the documentation for // https://pkg.go.dev/google.golang.org/protobuf/proto#Equal func (this *LastNotifiedTargetVersion) Equal(that interface{}) bool { -======= + if that == nil { + return this == nil + } + + var that1 *LastNotifiedTargetVersion + switch t := that.(type) { + case *LastNotifiedTargetVersion: + that1 = t + case LastNotifiedTargetVersion: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type TimeSkippingInfo to the protobuf v3 wire format +func (val *TimeSkippingInfo) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TimeSkippingInfo from the protobuf v3 wire format +func (val *TimeSkippingInfo) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized func (val *TimeSkippingInfo) Size() int { return proto.Size(val) } @@ -120,24 +136,15 @@ func (val *TimeSkippingInfo) Size() int { // For more information see the documentation for // https://pkg.go.dev/google.golang.org/protobuf/proto#Equal func (this *TimeSkippingInfo) Equal(that interface{}) bool { ->>>>>>> 286ac49dc (timeskipping-poc: control plane) if that == nil { return this == nil } -<<<<<<< HEAD - var that1 *LastNotifiedTargetVersion - switch t := that.(type) { - case *LastNotifiedTargetVersion: - that1 = t - case LastNotifiedTargetVersion: -======= var that1 *TimeSkippingInfo switch t := that.(type) { case *TimeSkippingInfo: that1 = t case TimeSkippingInfo: ->>>>>>> 286ac49dc (timeskipping-poc: control plane) that1 = &t default: return false diff --git a/api/persistence/v1/executions.pb.go b/api/persistence/v1/executions.pb.go index 4993dee9c4..aebd051401 100644 --- a/api/persistence/v1/executions.pb.go +++ b/api/persistence/v1/executions.pb.go @@ -353,7 +353,6 @@ type WorkflowExecutionInfo struct { // *WorkflowExecutionInfo_LastWorkflowTaskFailureCause // *WorkflowExecutionInfo_LastWorkflowTaskTimedOutType LastWorkflowTaskFailure isWorkflowExecutionInfo_LastWorkflowTaskFailure `protobuf_oneof:"last_workflow_task_failure"` -<<<<<<< HEAD // The last target version for which the server set targetDeploymentVersionChanged // to true on a workflow task started event. Updated on each workflow task start, // set only when the server decides to set the targetDeploymentVersionChanged flag @@ -373,15 +372,10 @@ type WorkflowExecutionInfo struct { // // Wrapper distinguishes "never declined" (nil) from "declined unversioned" (non-nil, nil version). DeclinedTargetVersionUpgrade *v17.DeclinedTargetVersionUpgrade `protobuf:"bytes,114,opt,name=declined_target_version_upgrade,json=declinedTargetVersionUpgrade,proto3" json:"declined_target_version_upgrade,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -======= - // Time skipping info contains the metadata of the time skipping for the workflow. - // todo: using 120 to leave room for others' changes while working on this feature. + // Time skipping info that contains the config and duration offsets of the time skipping for the workflow. TimeSkippingInfo *TimeSkippingInfo `protobuf:"bytes,120,opt,name=time_skipping_info,json=timeSkippingInfo,proto3" json:"time_skipping_info,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache ->>>>>>> 286ac49dc (timeskipping-poc: control plane) } func (x *WorkflowExecutionInfo) Reset() { @@ -1139,7 +1133,6 @@ func (x *WorkflowExecutionInfo) GetLastWorkflowTaskTimedOutType() v11.TimeoutTyp return v11.TimeoutType(0) } -<<<<<<< HEAD func (x *WorkflowExecutionInfo) GetLastNotifiedTargetVersion() *LastNotifiedTargetVersion { if x != nil { return x.LastNotifiedTargetVersion @@ -1150,11 +1143,13 @@ func (x *WorkflowExecutionInfo) GetLastNotifiedTargetVersion() *LastNotifiedTarg func (x *WorkflowExecutionInfo) GetDeclinedTargetVersionUpgrade() *v17.DeclinedTargetVersionUpgrade { if x != nil { return x.DeclinedTargetVersionUpgrade -======= + } + return nil +} + func (x *WorkflowExecutionInfo) GetTimeSkippingInfo() *TimeSkippingInfo { if x != nil { return x.TimeSkippingInfo ->>>>>>> 286ac49dc (timeskipping-poc: control plane) } return nil } @@ -1177,7 +1172,6 @@ func (*WorkflowExecutionInfo_LastWorkflowTaskFailureCause) isWorkflowExecutionIn func (*WorkflowExecutionInfo_LastWorkflowTaskTimedOutType) isWorkflowExecutionInfo_LastWorkflowTaskFailure() { } -<<<<<<< HEAD // Internal wrapper message to distinguish "never notified" (nil wrapper) from // "notified about an unversioned target" (non-nil wrapper with nil deployment_version). // Used only within server persistence; never flows to the public API. @@ -1190,7 +1184,41 @@ type LastNotifiedTargetVersion struct { func (x *LastNotifiedTargetVersion) Reset() { *x = LastNotifiedTargetVersion{} -======= + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LastNotifiedTargetVersion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LastNotifiedTargetVersion) ProtoMessage() {} + +func (x *LastNotifiedTargetVersion) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LastNotifiedTargetVersion.ProtoReflect.Descriptor instead. +func (*LastNotifiedTargetVersion) Descriptor() ([]byte, []int) { + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{2} +} + +func (x *LastNotifiedTargetVersion) GetDeploymentVersion() *v18.WorkerDeploymentVersion { + if x != nil { + return x.DeploymentVersion + } + return nil +} + type TimeSkippingInfo struct { state protoimpl.MessageState `protogen:"open.v1"` // metadata @@ -1203,21 +1231,11 @@ type TimeSkippingInfo struct { func (x *TimeSkippingInfo) Reset() { *x = TimeSkippingInfo{} ->>>>>>> 286ac49dc (timeskipping-poc: control plane) - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -<<<<<<< HEAD -func (x *LastNotifiedTargetVersion) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LastNotifiedTargetVersion) ProtoMessage() {} - -func (x *LastNotifiedTargetVersion) ProtoReflect() protoreflect.Message { -======= func (x *TimeSkippingInfo) String() string { return protoimpl.X.MessageStringOf(x) } @@ -1225,8 +1243,7 @@ func (x *TimeSkippingInfo) String() string { func (*TimeSkippingInfo) ProtoMessage() {} func (x *TimeSkippingInfo) ProtoReflect() protoreflect.Message { ->>>>>>> 286ac49dc (timeskipping-poc: control plane) - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[2] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1237,19 +1254,9 @@ func (x *TimeSkippingInfo) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -<<<<<<< HEAD -// Deprecated: Use LastNotifiedTargetVersion.ProtoReflect.Descriptor instead. -func (*LastNotifiedTargetVersion) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{2} -} - -func (x *LastNotifiedTargetVersion) GetDeploymentVersion() *v18.WorkerDeploymentVersion { - if x != nil { - return x.DeploymentVersion -======= // Deprecated: Use TimeSkippingInfo.ProtoReflect.Descriptor instead. func (*TimeSkippingInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{2} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{3} } func (x *TimeSkippingInfo) GetEnabled() bool { @@ -1261,28 +1268,34 @@ func (x *TimeSkippingInfo) GetEnabled() bool { func (x *TimeSkippingInfo) GetTimeSkippedDetails() []*TimeSkippedDetails { if x != nil { -<<<<<<< HEAD - return x.SkippedTimeOffsets ->>>>>>> 286ac49dc (timeskipping-poc: control plane) -======= return x.TimeSkippedDetails } return nil } type TimeSkippedDetails struct { - state protoimpl.MessageState `protogen:"open.v1"` - RealTimePointWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=real_time_point_when_skipped,json=realTimePointWhenSkipped,proto3" json:"real_time_point_when_skipped,omitempty"` - VirtualTimePointWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=virtual_time_point_when_skipped,json=virtualTimePointWhenSkipped,proto3" json:"virtual_time_point_when_skipped,omitempty"` - DurationToSkip *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=duration_to_skip,json=durationToSkip,proto3" json:"duration_to_skip,omitempty"` - TargetVirtualTimePoint *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=target_virtual_time_point,json=targetVirtualTimePoint,proto3" json:"target_virtual_time_point,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + // (-- api-linter: core::0142::time-field-names=disabled + // + // aip.dev/not-precedent: Ignoring lint rules. --) + RealTimeWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=real_time_when_skipped,json=realTimeWhenSkipped,proto3" json:"real_time_when_skipped,omitempty"` + // (-- api-linter: core::0142::time-field-names=disabled + // + // aip.dev/not-precedent: Ignoring lint rules. --) + VirtualTimeWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=virtual_time_when_skipped,json=virtualTimeWhenSkipped,proto3" json:"virtual_time_when_skipped,omitempty"` + // (-- api-linter: core::0142::time-field-names=disabled + // + // api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: Ignoring lint rules. --) + DurationToSkip *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=duration_to_skip,json=durationToSkip,proto3" json:"duration_to_skip,omitempty"` + TargetVirtualTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=target_virtual_time,json=targetVirtualTime,proto3" json:"target_virtual_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TimeSkippedDetails) Reset() { *x = TimeSkippedDetails{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1294,7 +1307,7 @@ func (x *TimeSkippedDetails) String() string { func (*TimeSkippedDetails) ProtoMessage() {} func (x *TimeSkippedDetails) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[3] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1307,19 +1320,19 @@ func (x *TimeSkippedDetails) ProtoReflect() protoreflect.Message { // Deprecated: Use TimeSkippedDetails.ProtoReflect.Descriptor instead. func (*TimeSkippedDetails) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{3} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{4} } -func (x *TimeSkippedDetails) GetRealTimePointWhenSkipped() *timestamppb.Timestamp { +func (x *TimeSkippedDetails) GetRealTimeWhenSkipped() *timestamppb.Timestamp { if x != nil { - return x.RealTimePointWhenSkipped + return x.RealTimeWhenSkipped } return nil } -func (x *TimeSkippedDetails) GetVirtualTimePointWhenSkipped() *timestamppb.Timestamp { +func (x *TimeSkippedDetails) GetVirtualTimeWhenSkipped() *timestamppb.Timestamp { if x != nil { - return x.VirtualTimePointWhenSkipped + return x.VirtualTimeWhenSkipped } return nil } @@ -1331,10 +1344,9 @@ func (x *TimeSkippedDetails) GetDurationToSkip() *timestamppb.Timestamp { return nil } -func (x *TimeSkippedDetails) GetTargetVirtualTimePoint() *timestamppb.Timestamp { +func (x *TimeSkippedDetails) GetTargetVirtualTime() *timestamppb.Timestamp { if x != nil { - return x.TargetVirtualTimePoint ->>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) + return x.TargetVirtualTime } return nil } @@ -1354,7 +1366,7 @@ type ExecutionStats struct { func (x *ExecutionStats) Reset() { *x = ExecutionStats{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1366,7 +1378,7 @@ func (x *ExecutionStats) String() string { func (*ExecutionStats) ProtoMessage() {} func (x *ExecutionStats) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[4] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1379,7 +1391,7 @@ func (x *ExecutionStats) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionStats.ProtoReflect.Descriptor instead. func (*ExecutionStats) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{4} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{5} } func (x *ExecutionStats) GetHistorySize() int64 { @@ -1422,7 +1434,7 @@ type WorkflowExecutionState struct { func (x *WorkflowExecutionState) Reset() { *x = WorkflowExecutionState{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1434,7 +1446,7 @@ func (x *WorkflowExecutionState) String() string { func (*WorkflowExecutionState) ProtoMessage() {} func (x *WorkflowExecutionState) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[5] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1447,7 +1459,7 @@ func (x *WorkflowExecutionState) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowExecutionState.ProtoReflect.Descriptor instead. func (*WorkflowExecutionState) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{5} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{6} } func (x *WorkflowExecutionState) GetCreateRequestId() string { @@ -1509,7 +1521,7 @@ type RequestIDInfo struct { func (x *RequestIDInfo) Reset() { *x = RequestIDInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1533,7 @@ func (x *RequestIDInfo) String() string { func (*RequestIDInfo) ProtoMessage() {} func (x *RequestIDInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[6] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1534,7 +1546,7 @@ func (x *RequestIDInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestIDInfo.ProtoReflect.Descriptor instead. func (*RequestIDInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{6} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{7} } func (x *RequestIDInfo) GetEventType() v11.EventType { @@ -1586,7 +1598,7 @@ type TransferTaskInfo struct { func (x *TransferTaskInfo) Reset() { *x = TransferTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1598,7 +1610,7 @@ func (x *TransferTaskInfo) String() string { func (*TransferTaskInfo) ProtoMessage() {} func (x *TransferTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1611,7 +1623,7 @@ func (x *TransferTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TransferTaskInfo.ProtoReflect.Descriptor instead. func (*TransferTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{7} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{8} } func (x *TransferTaskInfo) GetNamespaceId() string { @@ -1796,7 +1808,7 @@ type ReplicationTaskInfo struct { func (x *ReplicationTaskInfo) Reset() { *x = ReplicationTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1808,7 +1820,7 @@ func (x *ReplicationTaskInfo) String() string { func (*ReplicationTaskInfo) ProtoMessage() {} func (x *ReplicationTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1821,7 +1833,7 @@ func (x *ReplicationTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ReplicationTaskInfo.ProtoReflect.Descriptor instead. func (*ReplicationTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{8} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{9} } func (x *ReplicationTaskInfo) GetNamespaceId() string { @@ -1993,7 +2005,7 @@ type VisibilityTaskInfo struct { func (x *VisibilityTaskInfo) Reset() { *x = VisibilityTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2005,7 +2017,7 @@ func (x *VisibilityTaskInfo) String() string { func (*VisibilityTaskInfo) ProtoMessage() {} func (x *VisibilityTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2018,7 +2030,7 @@ func (x *VisibilityTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use VisibilityTaskInfo.ProtoReflect.Descriptor instead. func (*VisibilityTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{9} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{10} } func (x *VisibilityTaskInfo) GetNamespaceId() string { @@ -2149,7 +2161,7 @@ type TimerTaskInfo struct { func (x *TimerTaskInfo) Reset() { *x = TimerTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2161,7 +2173,7 @@ func (x *TimerTaskInfo) String() string { func (*TimerTaskInfo) ProtoMessage() {} func (x *TimerTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2174,7 +2186,7 @@ func (x *TimerTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TimerTaskInfo.ProtoReflect.Descriptor instead. func (*TimerTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{10} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{11} } func (x *TimerTaskInfo) GetNamespaceId() string { @@ -2331,7 +2343,7 @@ type ArchivalTaskInfo struct { func (x *ArchivalTaskInfo) Reset() { *x = ArchivalTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2343,7 +2355,7 @@ func (x *ArchivalTaskInfo) String() string { func (*ArchivalTaskInfo) ProtoMessage() {} func (x *ArchivalTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2356,7 +2368,7 @@ func (x *ArchivalTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ArchivalTaskInfo.ProtoReflect.Descriptor instead. func (*ArchivalTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{11} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{12} } func (x *ArchivalTaskInfo) GetTaskId() int64 { @@ -2430,7 +2442,7 @@ type OutboundTaskInfo struct { func (x *OutboundTaskInfo) Reset() { *x = OutboundTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2442,7 +2454,7 @@ func (x *OutboundTaskInfo) String() string { func (*OutboundTaskInfo) ProtoMessage() {} func (x *OutboundTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2455,7 +2467,7 @@ func (x *OutboundTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use OutboundTaskInfo.ProtoReflect.Descriptor instead. func (*OutboundTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{12} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{13} } func (x *OutboundTaskInfo) GetNamespaceId() string { @@ -2559,7 +2571,7 @@ type NexusInvocationTaskInfo struct { func (x *NexusInvocationTaskInfo) Reset() { *x = NexusInvocationTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2571,7 +2583,7 @@ func (x *NexusInvocationTaskInfo) String() string { func (*NexusInvocationTaskInfo) ProtoMessage() {} func (x *NexusInvocationTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2584,7 +2596,7 @@ func (x *NexusInvocationTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusInvocationTaskInfo.ProtoReflect.Descriptor instead. func (*NexusInvocationTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{13} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14} } func (x *NexusInvocationTaskInfo) GetAttempt() int32 { @@ -2603,7 +2615,7 @@ type NexusCancelationTaskInfo struct { func (x *NexusCancelationTaskInfo) Reset() { *x = NexusCancelationTaskInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2615,7 +2627,7 @@ func (x *NexusCancelationTaskInfo) String() string { func (*NexusCancelationTaskInfo) ProtoMessage() {} func (x *NexusCancelationTaskInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2628,7 +2640,7 @@ func (x *NexusCancelationTaskInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusCancelationTaskInfo.ProtoReflect.Descriptor instead. func (*NexusCancelationTaskInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15} } func (x *NexusCancelationTaskInfo) GetAttempt() int32 { @@ -2736,7 +2748,7 @@ type ActivityInfo struct { func (x *ActivityInfo) Reset() { *x = ActivityInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2748,7 +2760,7 @@ func (x *ActivityInfo) String() string { func (*ActivityInfo) ProtoMessage() {} func (x *ActivityInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2761,7 +2773,7 @@ func (x *ActivityInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityInfo.ProtoReflect.Descriptor instead. func (*ActivityInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16} } func (x *ActivityInfo) GetVersion() int64 { @@ -3143,7 +3155,7 @@ type TimerInfo struct { func (x *TimerInfo) Reset() { *x = TimerInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3155,7 +3167,7 @@ func (x *TimerInfo) String() string { func (*TimerInfo) ProtoMessage() {} func (x *TimerInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3168,7 +3180,7 @@ func (x *TimerInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use TimerInfo.ProtoReflect.Descriptor instead. func (*TimerInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{17} } func (x *TimerInfo) GetVersion() int64 { @@ -3236,7 +3248,7 @@ type ChildExecutionInfo struct { func (x *ChildExecutionInfo) Reset() { *x = ChildExecutionInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3248,7 +3260,7 @@ func (x *ChildExecutionInfo) String() string { func (*ChildExecutionInfo) ProtoMessage() {} func (x *ChildExecutionInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[17] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3261,7 +3273,7 @@ func (x *ChildExecutionInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ChildExecutionInfo.ProtoReflect.Descriptor instead. func (*ChildExecutionInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{17} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{18} } func (x *ChildExecutionInfo) GetVersion() int64 { @@ -3376,7 +3388,7 @@ type RequestCancelInfo struct { func (x *RequestCancelInfo) Reset() { *x = RequestCancelInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3388,7 +3400,7 @@ func (x *RequestCancelInfo) String() string { func (*RequestCancelInfo) ProtoMessage() {} func (x *RequestCancelInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[18] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3401,7 +3413,7 @@ func (x *RequestCancelInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use RequestCancelInfo.ProtoReflect.Descriptor instead. func (*RequestCancelInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{18} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{19} } func (x *RequestCancelInfo) GetVersion() int64 { @@ -3453,7 +3465,7 @@ type SignalInfo struct { func (x *SignalInfo) Reset() { *x = SignalInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3465,7 +3477,7 @@ func (x *SignalInfo) String() string { func (*SignalInfo) ProtoMessage() {} func (x *SignalInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3478,7 +3490,7 @@ func (x *SignalInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use SignalInfo.ProtoReflect.Descriptor instead. func (*SignalInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{19} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20} } func (x *SignalInfo) GetVersion() int64 { @@ -3528,7 +3540,7 @@ type Checksum struct { func (x *Checksum) Reset() { *x = Checksum{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3540,7 +3552,7 @@ func (x *Checksum) String() string { func (*Checksum) ProtoMessage() {} func (x *Checksum) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3553,7 +3565,7 @@ func (x *Checksum) ProtoReflect() protoreflect.Message { // Deprecated: Use Checksum.ProtoReflect.Descriptor instead. func (*Checksum) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21} } func (x *Checksum) GetVersion() int32 { @@ -3591,7 +3603,7 @@ type Callback struct { func (x *Callback) Reset() { *x = Callback{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3603,7 +3615,7 @@ func (x *Callback) String() string { func (*Callback) ProtoMessage() {} func (x *Callback) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3616,7 +3628,7 @@ func (x *Callback) ProtoReflect() protoreflect.Message { // Deprecated: Use Callback.ProtoReflect.Descriptor instead. func (*Callback) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22} } func (x *Callback) GetVariant() isCallback_Variant { @@ -3683,7 +3695,7 @@ type HSMCompletionCallbackArg struct { func (x *HSMCompletionCallbackArg) Reset() { *x = HSMCompletionCallbackArg{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3695,7 +3707,7 @@ func (x *HSMCompletionCallbackArg) String() string { func (*HSMCompletionCallbackArg) ProtoMessage() {} func (x *HSMCompletionCallbackArg) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3708,7 +3720,7 @@ func (x *HSMCompletionCallbackArg) ProtoReflect() protoreflect.Message { // Deprecated: Use HSMCompletionCallbackArg.ProtoReflect.Descriptor instead. func (*HSMCompletionCallbackArg) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23} } func (x *HSMCompletionCallbackArg) GetNamespaceId() string { @@ -3765,7 +3777,7 @@ type CallbackInfo struct { func (x *CallbackInfo) Reset() { *x = CallbackInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3777,7 +3789,7 @@ func (x *CallbackInfo) String() string { func (*CallbackInfo) ProtoMessage() {} func (x *CallbackInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[23] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3790,7 +3802,7 @@ func (x *CallbackInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackInfo.ProtoReflect.Descriptor instead. func (*CallbackInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24} } func (x *CallbackInfo) GetCallback() *Callback { @@ -3911,7 +3923,7 @@ type NexusOperationInfo struct { func (x *NexusOperationInfo) Reset() { *x = NexusOperationInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3923,7 +3935,7 @@ func (x *NexusOperationInfo) String() string { func (*NexusOperationInfo) ProtoMessage() {} func (x *NexusOperationInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[24] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3936,7 +3948,7 @@ func (x *NexusOperationInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusOperationInfo.ProtoReflect.Descriptor instead. func (*NexusOperationInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{25} } func (x *NexusOperationInfo) GetEndpoint() string { @@ -4081,7 +4093,7 @@ type NexusOperationCancellationInfo struct { func (x *NexusOperationCancellationInfo) Reset() { *x = NexusOperationCancellationInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4093,7 +4105,7 @@ func (x *NexusOperationCancellationInfo) String() string { func (*NexusOperationCancellationInfo) ProtoMessage() {} func (x *NexusOperationCancellationInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[25] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4106,7 +4118,7 @@ func (x *NexusOperationCancellationInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use NexusOperationCancellationInfo.ProtoReflect.Descriptor instead. func (*NexusOperationCancellationInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{25} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{26} } func (x *NexusOperationCancellationInfo) GetRequestedTime() *timestamppb.Timestamp { @@ -4169,7 +4181,7 @@ type ResetChildInfo struct { func (x *ResetChildInfo) Reset() { *x = ResetChildInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4181,7 +4193,7 @@ func (x *ResetChildInfo) String() string { func (*ResetChildInfo) ProtoMessage() {} func (x *ResetChildInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[26] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4194,7 +4206,7 @@ func (x *ResetChildInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetChildInfo.ProtoReflect.Descriptor instead. func (*ResetChildInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{26} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{27} } func (x *ResetChildInfo) GetShouldTerminateAndStart() bool { @@ -4220,7 +4232,7 @@ type WorkflowPauseInfo struct { func (x *WorkflowPauseInfo) Reset() { *x = WorkflowPauseInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[27] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4232,7 +4244,7 @@ func (x *WorkflowPauseInfo) String() string { func (*WorkflowPauseInfo) ProtoMessage() {} func (x *WorkflowPauseInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[27] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[28] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4245,7 +4257,7 @@ func (x *WorkflowPauseInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowPauseInfo.ProtoReflect.Descriptor instead. func (*WorkflowPauseInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{27} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{28} } func (x *WorkflowPauseInfo) GetPauseTime() *timestamppb.Timestamp { @@ -4287,7 +4299,7 @@ type TransferTaskInfo_CloseExecutionTaskDetails struct { func (x *TransferTaskInfo_CloseExecutionTaskDetails) Reset() { *x = TransferTaskInfo_CloseExecutionTaskDetails{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4299,7 +4311,7 @@ func (x *TransferTaskInfo_CloseExecutionTaskDetails) String() string { func (*TransferTaskInfo_CloseExecutionTaskDetails) ProtoMessage() {} func (x *TransferTaskInfo_CloseExecutionTaskDetails) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4312,7 +4324,7 @@ func (x *TransferTaskInfo_CloseExecutionTaskDetails) ProtoReflect() protoreflect // Deprecated: Use TransferTaskInfo_CloseExecutionTaskDetails.ProtoReflect.Descriptor instead. func (*TransferTaskInfo_CloseExecutionTaskDetails) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{7, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{8, 0} } func (x *TransferTaskInfo_CloseExecutionTaskDetails) GetCanSkipVisibilityArchival() bool { @@ -4336,7 +4348,7 @@ type ActivityInfo_UseWorkflowBuildIdInfo struct { func (x *ActivityInfo_UseWorkflowBuildIdInfo) Reset() { *x = ActivityInfo_UseWorkflowBuildIdInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4348,7 +4360,7 @@ func (x *ActivityInfo_UseWorkflowBuildIdInfo) String() string { func (*ActivityInfo_UseWorkflowBuildIdInfo) ProtoMessage() {} func (x *ActivityInfo_UseWorkflowBuildIdInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4361,7 +4373,7 @@ func (x *ActivityInfo_UseWorkflowBuildIdInfo) ProtoReflect() protoreflect.Messag // Deprecated: Use ActivityInfo_UseWorkflowBuildIdInfo.ProtoReflect.Descriptor instead. func (*ActivityInfo_UseWorkflowBuildIdInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16, 0} } func (x *ActivityInfo_UseWorkflowBuildIdInfo) GetLastUsedBuildId() string { @@ -4393,7 +4405,7 @@ type ActivityInfo_PauseInfo struct { func (x *ActivityInfo_PauseInfo) Reset() { *x = ActivityInfo_PauseInfo{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4405,7 +4417,7 @@ func (x *ActivityInfo_PauseInfo) String() string { func (*ActivityInfo_PauseInfo) ProtoMessage() {} func (x *ActivityInfo_PauseInfo) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4418,7 +4430,7 @@ func (x *ActivityInfo_PauseInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityInfo_PauseInfo.ProtoReflect.Descriptor instead. func (*ActivityInfo_PauseInfo) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16, 1} } func (x *ActivityInfo_PauseInfo) GetPauseTime() *timestamppb.Timestamp { @@ -4483,7 +4495,7 @@ type ActivityInfo_PauseInfo_Manual struct { func (x *ActivityInfo_PauseInfo_Manual) Reset() { *x = ActivityInfo_PauseInfo_Manual{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4495,7 +4507,7 @@ func (x *ActivityInfo_PauseInfo_Manual) String() string { func (*ActivityInfo_PauseInfo_Manual) ProtoMessage() {} func (x *ActivityInfo_PauseInfo_Manual) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4508,7 +4520,7 @@ func (x *ActivityInfo_PauseInfo_Manual) ProtoReflect() protoreflect.Message { // Deprecated: Use ActivityInfo_PauseInfo_Manual.ProtoReflect.Descriptor instead. func (*ActivityInfo_PauseInfo_Manual) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15, 1, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16, 1, 0} } func (x *ActivityInfo_PauseInfo_Manual) GetIdentity() string { @@ -4540,7 +4552,7 @@ type Callback_Nexus struct { func (x *Callback_Nexus) Reset() { *x = Callback_Nexus{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4552,7 +4564,7 @@ func (x *Callback_Nexus) String() string { func (*Callback_Nexus) ProtoMessage() {} func (x *Callback_Nexus) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[40] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[41] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4565,7 +4577,7 @@ func (x *Callback_Nexus) ProtoReflect() protoreflect.Message { // Deprecated: Use Callback_Nexus.ProtoReflect.Descriptor instead. func (*Callback_Nexus) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22, 0} } func (x *Callback_Nexus) GetUrl() string { @@ -4602,7 +4614,7 @@ type Callback_HSM struct { func (x *Callback_HSM) Reset() { *x = Callback_HSM{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[41] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[42] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4614,7 +4626,7 @@ func (x *Callback_HSM) String() string { func (*Callback_HSM) ProtoMessage() {} func (x *Callback_HSM) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[41] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[42] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4627,7 +4639,7 @@ func (x *Callback_HSM) ProtoReflect() protoreflect.Message { // Deprecated: Use Callback_HSM.ProtoReflect.Descriptor instead. func (*Callback_HSM) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22, 1} } func (x *Callback_HSM) GetNamespaceId() string { @@ -4674,7 +4686,7 @@ type CallbackInfo_WorkflowClosed struct { func (x *CallbackInfo_WorkflowClosed) Reset() { *x = CallbackInfo_WorkflowClosed{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4686,7 +4698,7 @@ func (x *CallbackInfo_WorkflowClosed) String() string { func (*CallbackInfo_WorkflowClosed) ProtoMessage() {} func (x *CallbackInfo_WorkflowClosed) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4699,7 +4711,7 @@ func (x *CallbackInfo_WorkflowClosed) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackInfo_WorkflowClosed.ProtoReflect.Descriptor instead. func (*CallbackInfo_WorkflowClosed) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24, 0} } type CallbackInfo_Trigger struct { @@ -4714,7 +4726,7 @@ type CallbackInfo_Trigger struct { func (x *CallbackInfo_Trigger) Reset() { *x = CallbackInfo_Trigger{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4726,7 +4738,7 @@ func (x *CallbackInfo_Trigger) String() string { func (*CallbackInfo_Trigger) ProtoMessage() {} func (x *CallbackInfo_Trigger) ProtoReflect() protoreflect.Message { - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[45] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4739,7 +4751,7 @@ func (x *CallbackInfo_Trigger) ProtoReflect() protoreflect.Message { // Deprecated: Use CallbackInfo_Trigger.ProtoReflect.Descriptor instead. func (*CallbackInfo_Trigger) Descriptor() ([]byte, []int) { - return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24, 1} } func (x *CallbackInfo_Trigger) GetVariant() isCallbackInfo_Trigger_Variant { @@ -4789,11 +4801,7 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\x03key\x18\x01 \x01(\x05R\x03key\x12D\n" + "\x05value\x18\x02 \x01(\v2..temporal.server.api.persistence.v1.QueueStateR\x05value:\x028\x01J\x04\b\x04\x10\x05J\x04\b\x05\x10\x06J\x04\b\b\x10\tJ\x04\b\t\x10\n" + "J\x04\b\n" + -<<<<<<< HEAD - "\x10\vJ\x04\b\v\x10\fJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11\"\xdbB\n" + -======= - "\x10\vJ\x04\b\v\x10\fJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11\"\xc1A\n" + ->>>>>>> 286ac49dc (timeskipping-poc: control plane) + "\x10\vJ\x04\b\v\x10\fJ\x04\b\f\x10\rJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11\"\xbfC\n" + "\x15WorkflowExecutionInfo\x12!\n" + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1f\n" + "\vworkflow_id\x18\x02 \x01(\tR\n" + @@ -4903,14 +4911,10 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\n" + "pause_info\x18j \x01(\v25.temporal.server.api.persistence.v1.WorkflowPauseInfoR\tpauseInfo\x12x\n" + " last_workflow_task_failure_cause\x18k \x01(\x0e2..temporal.api.enums.v1.WorkflowTaskFailedCauseH\x00R\x1clastWorkflowTaskFailureCause\x12m\n" + -<<<<<<< HEAD "!last_workflow_task_timed_out_type\x18l \x01(\x0e2\".temporal.api.enums.v1.TimeoutTypeH\x00R\x1clastWorkflowTaskTimedOutType\x12~\n" + "\x1clast_notified_target_version\x18q \x01(\v2=.temporal.server.api.persistence.v1.LastNotifiedTargetVersionR\x19lastNotifiedTargetVersion\x12|\n" + - "\x1fdeclined_target_version_upgrade\x18r \x01(\v25.temporal.api.history.v1.DeclinedTargetVersionUpgradeR\x1cdeclinedTargetVersionUpgrade\x1ad\n" + -======= - "!last_workflow_task_timed_out_type\x18l \x01(\x0e2\".temporal.api.enums.v1.TimeoutTypeH\x00R\x1clastWorkflowTaskTimedOutType\x12b\n" + + "\x1fdeclined_target_version_upgrade\x18r \x01(\v25.temporal.api.history.v1.DeclinedTargetVersionUpgradeR\x1cdeclinedTargetVersionUpgrade\x12b\n" + "\x12time_skipping_info\x18x \x01(\v24.temporal.server.api.persistence.v1.TimeSkippingInfoR\x10timeSkippingInfo\x1ad\n" + ->>>>>>> 286ac49dc (timeskipping-poc: control plane) "\x15SearchAttributesEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + "\x05value\x18\x02 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\x05value:\x028\x01\x1aX\n" + @@ -4926,28 +4930,17 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "&ChildrenInitializedPostResetPointEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12H\n" + "\x05value\x18\x02 \x01(\v22.temporal.server.api.persistence.v1.ResetChildInfoR\x05value:\x028\x01B\x1c\n" + -<<<<<<< HEAD -<<<<<<< HEAD "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"\x7f\n" + "\x19LastNotifiedTargetVersion\x12b\n" + - "\x12deployment_version\x18\x01 \x01(\v23.temporal.api.deployment.v1.WorkerDeploymentVersionR\x11deploymentVersion\"\x9d\x01\n" + -======= - "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"z\n" + - "\x10TimeSkippingInfo\x12\x18\n" + - "\aenabled\x18\x01 \x01(\bR\aenabled\x12L\n" + - "\x14skipped_time_offsets\x18\x04 \x03(\v2\x1a.google.protobuf.TimestampR\x12skippedTimeOffsets\"\x9d\x01\n" + ->>>>>>> 286ac49dc (timeskipping-poc: control plane) -======= - "\x1alast_workflow_task_failureJ\x04\b\b\x10\tJ\x04\b\x0e\x10\x0fJ\x04\b\x0f\x10\x10J\x04\b\x10\x10\x11J\x04\b,\x10-J\x04\b-\x10.J\x04\b/\x100J\x04\b0\x101J\x04\b1\x102J\x04\b2\x103\"\x96\x01\n" + + "\x12deployment_version\x18\x01 \x01(\v23.temporal.api.deployment.v1.WorkerDeploymentVersionR\x11deploymentVersion\"\x96\x01\n" + "\x10TimeSkippingInfo\x12\x18\n" + "\aenabled\x18\x01 \x01(\bR\aenabled\x12h\n" + - "\x14time_skipped_details\x18\x02 \x03(\v26.temporal.server.api.persistence.v1.TimeSkippedDetailsR\x12timeSkippedDetails\"\xef\x02\n" + - "\x12TimeSkippedDetails\x12Z\n" + - "\x1creal_time_point_when_skipped\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x18realTimePointWhenSkipped\x12`\n" + - "\x1fvirtual_time_point_when_skipped\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x1bvirtualTimePointWhenSkipped\x12D\n" + - "\x10duration_to_skip\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0edurationToSkip\x12U\n" + - "\x19target_virtual_time_point\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x16targetVirtualTimePoint\"\x9d\x01\n" + ->>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) + "\x14time_skipped_details\x18\x02 \x03(\v26.temporal.server.api.persistence.v1.TimeSkippedDetailsR\x12timeSkippedDetails\"\xce\x02\n" + + "\x12TimeSkippedDetails\x12O\n" + + "\x16real_time_when_skipped\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x13realTimeWhenSkipped\x12U\n" + + "\x19virtual_time_when_skipped\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x16virtualTimeWhenSkipped\x12D\n" + + "\x10duration_to_skip\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0edurationToSkip\x12J\n" + + "\x13target_virtual_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x11targetVirtualTime\"\x9d\x01\n" + "\x0eExecutionStats\x12!\n" + "\fhistory_size\x18\x01 \x01(\x03R\vhistorySize\x122\n" + "\x15external_payload_size\x18\x02 \x01(\x03R\x13externalPayloadSize\x124\n" + @@ -5282,633 +5275,258 @@ func file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP() []by return file_temporal_server_api_persistence_v1_executions_proto_rawDescData } -var file_temporal_server_api_persistence_v1_executions_proto_msgTypes = make([]protoimpl.MessageInfo, 45) +var file_temporal_server_api_persistence_v1_executions_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*ShardInfo)(nil), // 0: temporal.server.api.persistence.v1.ShardInfo (*WorkflowExecutionInfo)(nil), // 1: temporal.server.api.persistence.v1.WorkflowExecutionInfo -<<<<<<< HEAD (*LastNotifiedTargetVersion)(nil), // 2: temporal.server.api.persistence.v1.LastNotifiedTargetVersion -======= - (*TimeSkippingInfo)(nil), // 2: temporal.server.api.persistence.v1.TimeSkippingInfo -<<<<<<< HEAD ->>>>>>> 286ac49dc (timeskipping-poc: control plane) - (*ExecutionStats)(nil), // 3: temporal.server.api.persistence.v1.ExecutionStats - (*WorkflowExecutionState)(nil), // 4: temporal.server.api.persistence.v1.WorkflowExecutionState - (*RequestIDInfo)(nil), // 5: temporal.server.api.persistence.v1.RequestIDInfo - (*TransferTaskInfo)(nil), // 6: temporal.server.api.persistence.v1.TransferTaskInfo - (*ReplicationTaskInfo)(nil), // 7: temporal.server.api.persistence.v1.ReplicationTaskInfo - (*VisibilityTaskInfo)(nil), // 8: temporal.server.api.persistence.v1.VisibilityTaskInfo - (*TimerTaskInfo)(nil), // 9: temporal.server.api.persistence.v1.TimerTaskInfo - (*ArchivalTaskInfo)(nil), // 10: temporal.server.api.persistence.v1.ArchivalTaskInfo - (*OutboundTaskInfo)(nil), // 11: temporal.server.api.persistence.v1.OutboundTaskInfo - (*NexusInvocationTaskInfo)(nil), // 12: temporal.server.api.persistence.v1.NexusInvocationTaskInfo - (*NexusCancelationTaskInfo)(nil), // 13: temporal.server.api.persistence.v1.NexusCancelationTaskInfo - (*ActivityInfo)(nil), // 14: temporal.server.api.persistence.v1.ActivityInfo - (*TimerInfo)(nil), // 15: temporal.server.api.persistence.v1.TimerInfo - (*ChildExecutionInfo)(nil), // 16: temporal.server.api.persistence.v1.ChildExecutionInfo - (*RequestCancelInfo)(nil), // 17: temporal.server.api.persistence.v1.RequestCancelInfo - (*SignalInfo)(nil), // 18: temporal.server.api.persistence.v1.SignalInfo - (*Checksum)(nil), // 19: temporal.server.api.persistence.v1.Checksum - (*Callback)(nil), // 20: temporal.server.api.persistence.v1.Callback - (*HSMCompletionCallbackArg)(nil), // 21: temporal.server.api.persistence.v1.HSMCompletionCallbackArg - (*CallbackInfo)(nil), // 22: temporal.server.api.persistence.v1.CallbackInfo - (*NexusOperationInfo)(nil), // 23: temporal.server.api.persistence.v1.NexusOperationInfo - (*NexusOperationCancellationInfo)(nil), // 24: temporal.server.api.persistence.v1.NexusOperationCancellationInfo - (*ResetChildInfo)(nil), // 25: temporal.server.api.persistence.v1.ResetChildInfo - (*WorkflowPauseInfo)(nil), // 26: temporal.server.api.persistence.v1.WorkflowPauseInfo - nil, // 27: temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry - nil, // 28: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry - nil, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry - nil, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry - nil, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry - nil, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry - nil, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry - nil, // 34: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - (*TransferTaskInfo_CloseExecutionTaskDetails)(nil), // 35: temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - (*ActivityInfo_UseWorkflowBuildIdInfo)(nil), // 36: temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - (*ActivityInfo_PauseInfo)(nil), // 37: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - (*ActivityInfo_PauseInfo_Manual)(nil), // 38: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - (*Callback_Nexus)(nil), // 39: temporal.server.api.persistence.v1.Callback.Nexus - (*Callback_HSM)(nil), // 40: temporal.server.api.persistence.v1.Callback.HSM - nil, // 41: temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - (*CallbackInfo_WorkflowClosed)(nil), // 42: temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - (*CallbackInfo_Trigger)(nil), // 43: temporal.server.api.persistence.v1.CallbackInfo.Trigger - (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 45: google.protobuf.Duration - (v1.WorkflowTaskType)(0), // 46: temporal.server.api.enums.v1.WorkflowTaskType - (v11.SuggestContinueAsNewReason)(0), // 47: temporal.api.enums.v1.SuggestContinueAsNewReason - (*v12.ResetPoints)(nil), // 48: temporal.api.workflow.v1.ResetPoints - (*v14.VersionHistories)(nil), // 49: temporal.server.api.history.v1.VersionHistories - (*v15.VectorClock)(nil), // 50: temporal.server.api.clock.v1.VectorClock - (*v16.BaseExecutionInfo)(nil), // 51: temporal.server.api.workflow.v1.BaseExecutionInfo - (*v13.WorkerVersionStamp)(nil), // 52: temporal.api.common.v1.WorkerVersionStamp - (*VersionedTransition)(nil), // 53: temporal.server.api.persistence.v1.VersionedTransition - (*StateMachineTimerGroup)(nil), // 54: temporal.server.api.persistence.v1.StateMachineTimerGroup - (*StateMachineTombstoneBatch)(nil), // 55: temporal.server.api.persistence.v1.StateMachineTombstoneBatch - (*v12.WorkflowExecutionVersioningInfo)(nil), // 56: temporal.api.workflow.v1.WorkflowExecutionVersioningInfo - (*v13.Priority)(nil), // 57: temporal.api.common.v1.Priority - (v11.WorkflowTaskFailedCause)(0), // 58: temporal.api.enums.v1.WorkflowTaskFailedCause - (v11.TimeoutType)(0), // 59: temporal.api.enums.v1.TimeoutType -<<<<<<< HEAD - (*v17.DeclinedTargetVersionUpgrade)(nil), // 60: temporal.api.history.v1.DeclinedTargetVersionUpgrade - (*v18.WorkerDeploymentVersion)(nil), // 61: temporal.api.deployment.v1.WorkerDeploymentVersion - (v1.WorkflowExecutionState)(0), // 62: temporal.server.api.enums.v1.WorkflowExecutionState - (v11.WorkflowExecutionStatus)(0), // 63: temporal.api.enums.v1.WorkflowExecutionStatus - (v11.EventType)(0), // 64: temporal.api.enums.v1.EventType - (v1.TaskType)(0), // 65: temporal.server.api.enums.v1.TaskType - (*ChasmTaskInfo)(nil), // 66: temporal.server.api.persistence.v1.ChasmTaskInfo - (v1.TaskPriority)(0), // 67: temporal.server.api.enums.v1.TaskPriority - (*v14.VersionHistoryItem)(nil), // 68: temporal.server.api.history.v1.VersionHistoryItem - (v1.WorkflowBackoffType)(0), // 69: temporal.server.api.enums.v1.WorkflowBackoffType - (*StateMachineTaskInfo)(nil), // 70: temporal.server.api.persistence.v1.StateMachineTaskInfo - (*v19.Failure)(nil), // 71: temporal.api.failure.v1.Failure - (*v13.Payloads)(nil), // 72: temporal.api.common.v1.Payloads - (*v13.ActivityType)(nil), // 73: temporal.api.common.v1.ActivityType - (*v18.Deployment)(nil), // 74: temporal.api.deployment.v1.Deployment - (v11.ParentClosePolicy)(0), // 75: temporal.api.enums.v1.ParentClosePolicy - (v1.ChecksumFlavor)(0), // 76: temporal.server.api.enums.v1.ChecksumFlavor - (*v13.Link)(nil), // 77: temporal.api.common.v1.Link - (*v17.HistoryEvent)(nil), // 78: temporal.api.history.v1.HistoryEvent -======= - (*TimeSkippedDetails)(nil), // 3: temporal.server.api.persistence.v1.TimeSkippedDetails - (*ExecutionStats)(nil), // 4: temporal.server.api.persistence.v1.ExecutionStats - (*WorkflowExecutionState)(nil), // 5: temporal.server.api.persistence.v1.WorkflowExecutionState - (*RequestIDInfo)(nil), // 6: temporal.server.api.persistence.v1.RequestIDInfo - (*TransferTaskInfo)(nil), // 7: temporal.server.api.persistence.v1.TransferTaskInfo - (*ReplicationTaskInfo)(nil), // 8: temporal.server.api.persistence.v1.ReplicationTaskInfo - (*VisibilityTaskInfo)(nil), // 9: temporal.server.api.persistence.v1.VisibilityTaskInfo - (*TimerTaskInfo)(nil), // 10: temporal.server.api.persistence.v1.TimerTaskInfo - (*ArchivalTaskInfo)(nil), // 11: temporal.server.api.persistence.v1.ArchivalTaskInfo - (*OutboundTaskInfo)(nil), // 12: temporal.server.api.persistence.v1.OutboundTaskInfo - (*NexusInvocationTaskInfo)(nil), // 13: temporal.server.api.persistence.v1.NexusInvocationTaskInfo - (*NexusCancelationTaskInfo)(nil), // 14: temporal.server.api.persistence.v1.NexusCancelationTaskInfo - (*ActivityInfo)(nil), // 15: temporal.server.api.persistence.v1.ActivityInfo - (*TimerInfo)(nil), // 16: temporal.server.api.persistence.v1.TimerInfo - (*ChildExecutionInfo)(nil), // 17: temporal.server.api.persistence.v1.ChildExecutionInfo - (*RequestCancelInfo)(nil), // 18: temporal.server.api.persistence.v1.RequestCancelInfo - (*SignalInfo)(nil), // 19: temporal.server.api.persistence.v1.SignalInfo - (*Checksum)(nil), // 20: temporal.server.api.persistence.v1.Checksum - (*Callback)(nil), // 21: temporal.server.api.persistence.v1.Callback - (*HSMCompletionCallbackArg)(nil), // 22: temporal.server.api.persistence.v1.HSMCompletionCallbackArg - (*CallbackInfo)(nil), // 23: temporal.server.api.persistence.v1.CallbackInfo - (*NexusOperationInfo)(nil), // 24: temporal.server.api.persistence.v1.NexusOperationInfo - (*NexusOperationCancellationInfo)(nil), // 25: temporal.server.api.persistence.v1.NexusOperationCancellationInfo - (*ResetChildInfo)(nil), // 26: temporal.server.api.persistence.v1.ResetChildInfo - (*WorkflowPauseInfo)(nil), // 27: temporal.server.api.persistence.v1.WorkflowPauseInfo - nil, // 28: temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry - nil, // 29: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry - nil, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry - nil, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry - nil, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry - nil, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry - nil, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry - nil, // 35: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - (*TransferTaskInfo_CloseExecutionTaskDetails)(nil), // 36: temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - (*ActivityInfo_UseWorkflowBuildIdInfo)(nil), // 37: temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - (*ActivityInfo_PauseInfo)(nil), // 38: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - (*ActivityInfo_PauseInfo_Manual)(nil), // 39: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - (*Callback_Nexus)(nil), // 40: temporal.server.api.persistence.v1.Callback.Nexus - (*Callback_HSM)(nil), // 41: temporal.server.api.persistence.v1.Callback.HSM - nil, // 42: temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - (*CallbackInfo_WorkflowClosed)(nil), // 43: temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - (*CallbackInfo_Trigger)(nil), // 44: temporal.server.api.persistence.v1.CallbackInfo.Trigger - (*timestamppb.Timestamp)(nil), // 45: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 46: google.protobuf.Duration - (v1.WorkflowTaskType)(0), // 47: temporal.server.api.enums.v1.WorkflowTaskType - (v11.SuggestContinueAsNewReason)(0), // 48: temporal.api.enums.v1.SuggestContinueAsNewReason - (*v12.ResetPoints)(nil), // 49: temporal.api.workflow.v1.ResetPoints - (*v14.VersionHistories)(nil), // 50: temporal.server.api.history.v1.VersionHistories - (*v15.VectorClock)(nil), // 51: temporal.server.api.clock.v1.VectorClock - (*v16.BaseExecutionInfo)(nil), // 52: temporal.server.api.workflow.v1.BaseExecutionInfo - (*v13.WorkerVersionStamp)(nil), // 53: temporal.api.common.v1.WorkerVersionStamp - (*VersionedTransition)(nil), // 54: temporal.server.api.persistence.v1.VersionedTransition - (*StateMachineTimerGroup)(nil), // 55: temporal.server.api.persistence.v1.StateMachineTimerGroup - (*StateMachineTombstoneBatch)(nil), // 56: temporal.server.api.persistence.v1.StateMachineTombstoneBatch - (*v12.WorkflowExecutionVersioningInfo)(nil), // 57: temporal.api.workflow.v1.WorkflowExecutionVersioningInfo - (*v13.Priority)(nil), // 58: temporal.api.common.v1.Priority - (v11.WorkflowTaskFailedCause)(0), // 59: temporal.api.enums.v1.WorkflowTaskFailedCause - (v11.TimeoutType)(0), // 60: temporal.api.enums.v1.TimeoutType - (v1.WorkflowExecutionState)(0), // 61: temporal.server.api.enums.v1.WorkflowExecutionState - (v11.WorkflowExecutionStatus)(0), // 62: temporal.api.enums.v1.WorkflowExecutionStatus - (v11.EventType)(0), // 63: temporal.api.enums.v1.EventType - (v1.TaskType)(0), // 64: temporal.server.api.enums.v1.TaskType - (*ChasmTaskInfo)(nil), // 65: temporal.server.api.persistence.v1.ChasmTaskInfo - (v1.TaskPriority)(0), // 66: temporal.server.api.enums.v1.TaskPriority - (*v14.VersionHistoryItem)(nil), // 67: temporal.server.api.history.v1.VersionHistoryItem - (v1.WorkflowBackoffType)(0), // 68: temporal.server.api.enums.v1.WorkflowBackoffType - (*StateMachineTaskInfo)(nil), // 69: temporal.server.api.persistence.v1.StateMachineTaskInfo - (*v17.Failure)(nil), // 70: temporal.api.failure.v1.Failure - (*v13.Payloads)(nil), // 71: temporal.api.common.v1.Payloads - (*v13.ActivityType)(nil), // 72: temporal.api.common.v1.ActivityType - (*v18.Deployment)(nil), // 73: temporal.api.deployment.v1.Deployment - (*v18.WorkerDeploymentVersion)(nil), // 74: temporal.api.deployment.v1.WorkerDeploymentVersion - (v11.ParentClosePolicy)(0), // 75: temporal.api.enums.v1.ParentClosePolicy - (v1.ChecksumFlavor)(0), // 76: temporal.server.api.enums.v1.ChecksumFlavor - (*v13.Link)(nil), // 77: temporal.api.common.v1.Link - (*v19.HistoryEvent)(nil), // 78: temporal.api.history.v1.HistoryEvent ->>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) - (v1.CallbackState)(0), // 79: temporal.server.api.enums.v1.CallbackState - (v1.NexusOperationState)(0), // 80: temporal.server.api.enums.v1.NexusOperationState - (v11.NexusOperationCancellationState)(0), // 81: temporal.api.enums.v1.NexusOperationCancellationState - (*QueueState)(nil), // 82: temporal.server.api.persistence.v1.QueueState - (*v13.Payload)(nil), // 83: temporal.api.common.v1.Payload - (*UpdateInfo)(nil), // 84: temporal.server.api.persistence.v1.UpdateInfo - (*StateMachineMap)(nil), // 85: temporal.server.api.persistence.v1.StateMachineMap - (*StateMachineRef)(nil), // 86: temporal.server.api.persistence.v1.StateMachineRef -<<<<<<< HEAD -======= - (v1.WorkflowExecutionState)(0), // 60: temporal.server.api.enums.v1.WorkflowExecutionState - (v11.WorkflowExecutionStatus)(0), // 61: temporal.api.enums.v1.WorkflowExecutionStatus - (v11.EventType)(0), // 62: temporal.api.enums.v1.EventType - (v1.TaskType)(0), // 63: temporal.server.api.enums.v1.TaskType - (*ChasmTaskInfo)(nil), // 64: temporal.server.api.persistence.v1.ChasmTaskInfo - (v1.TaskPriority)(0), // 65: temporal.server.api.enums.v1.TaskPriority - (*v14.VersionHistoryItem)(nil), // 66: temporal.server.api.history.v1.VersionHistoryItem - (v1.WorkflowBackoffType)(0), // 67: temporal.server.api.enums.v1.WorkflowBackoffType - (*StateMachineTaskInfo)(nil), // 68: temporal.server.api.persistence.v1.StateMachineTaskInfo - (*v17.Failure)(nil), // 69: temporal.api.failure.v1.Failure - (*v13.Payloads)(nil), // 70: temporal.api.common.v1.Payloads - (*v13.ActivityType)(nil), // 71: temporal.api.common.v1.ActivityType - (*v18.Deployment)(nil), // 72: temporal.api.deployment.v1.Deployment - (*v18.WorkerDeploymentVersion)(nil), // 73: temporal.api.deployment.v1.WorkerDeploymentVersion - (v11.ParentClosePolicy)(0), // 74: temporal.api.enums.v1.ParentClosePolicy - (v1.ChecksumFlavor)(0), // 75: temporal.server.api.enums.v1.ChecksumFlavor - (*v13.Link)(nil), // 76: temporal.api.common.v1.Link - (*v19.HistoryEvent)(nil), // 77: temporal.api.history.v1.HistoryEvent - (v1.CallbackState)(0), // 78: temporal.server.api.enums.v1.CallbackState - (v1.NexusOperationState)(0), // 79: temporal.server.api.enums.v1.NexusOperationState - (v11.NexusOperationCancellationState)(0), // 80: temporal.api.enums.v1.NexusOperationCancellationState - (*QueueState)(nil), // 81: temporal.server.api.persistence.v1.QueueState - (*v13.Payload)(nil), // 82: temporal.api.common.v1.Payload - (*UpdateInfo)(nil), // 83: temporal.server.api.persistence.v1.UpdateInfo - (*StateMachineMap)(nil), // 84: temporal.server.api.persistence.v1.StateMachineMap - (*StateMachineRef)(nil), // 85: temporal.server.api.persistence.v1.StateMachineRef ->>>>>>> 286ac49dc (timeskipping-poc: control plane) + (*TimeSkippingInfo)(nil), // 3: temporal.server.api.persistence.v1.TimeSkippingInfo + (*TimeSkippedDetails)(nil), // 4: temporal.server.api.persistence.v1.TimeSkippedDetails + (*ExecutionStats)(nil), // 5: temporal.server.api.persistence.v1.ExecutionStats + (*WorkflowExecutionState)(nil), // 6: temporal.server.api.persistence.v1.WorkflowExecutionState + (*RequestIDInfo)(nil), // 7: temporal.server.api.persistence.v1.RequestIDInfo + (*TransferTaskInfo)(nil), // 8: temporal.server.api.persistence.v1.TransferTaskInfo + (*ReplicationTaskInfo)(nil), // 9: temporal.server.api.persistence.v1.ReplicationTaskInfo + (*VisibilityTaskInfo)(nil), // 10: temporal.server.api.persistence.v1.VisibilityTaskInfo + (*TimerTaskInfo)(nil), // 11: temporal.server.api.persistence.v1.TimerTaskInfo + (*ArchivalTaskInfo)(nil), // 12: temporal.server.api.persistence.v1.ArchivalTaskInfo + (*OutboundTaskInfo)(nil), // 13: temporal.server.api.persistence.v1.OutboundTaskInfo + (*NexusInvocationTaskInfo)(nil), // 14: temporal.server.api.persistence.v1.NexusInvocationTaskInfo + (*NexusCancelationTaskInfo)(nil), // 15: temporal.server.api.persistence.v1.NexusCancelationTaskInfo + (*ActivityInfo)(nil), // 16: temporal.server.api.persistence.v1.ActivityInfo + (*TimerInfo)(nil), // 17: temporal.server.api.persistence.v1.TimerInfo + (*ChildExecutionInfo)(nil), // 18: temporal.server.api.persistence.v1.ChildExecutionInfo + (*RequestCancelInfo)(nil), // 19: temporal.server.api.persistence.v1.RequestCancelInfo + (*SignalInfo)(nil), // 20: temporal.server.api.persistence.v1.SignalInfo + (*Checksum)(nil), // 21: temporal.server.api.persistence.v1.Checksum + (*Callback)(nil), // 22: temporal.server.api.persistence.v1.Callback + (*HSMCompletionCallbackArg)(nil), // 23: temporal.server.api.persistence.v1.HSMCompletionCallbackArg + (*CallbackInfo)(nil), // 24: temporal.server.api.persistence.v1.CallbackInfo + (*NexusOperationInfo)(nil), // 25: temporal.server.api.persistence.v1.NexusOperationInfo + (*NexusOperationCancellationInfo)(nil), // 26: temporal.server.api.persistence.v1.NexusOperationCancellationInfo + (*ResetChildInfo)(nil), // 27: temporal.server.api.persistence.v1.ResetChildInfo + (*WorkflowPauseInfo)(nil), // 28: temporal.server.api.persistence.v1.WorkflowPauseInfo + nil, // 29: temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry + nil, // 30: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry + nil, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry + nil, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry + nil, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry + nil, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry + nil, // 35: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry + nil, // 36: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + (*TransferTaskInfo_CloseExecutionTaskDetails)(nil), // 37: temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + (*ActivityInfo_UseWorkflowBuildIdInfo)(nil), // 38: temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo + (*ActivityInfo_PauseInfo)(nil), // 39: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo + (*ActivityInfo_PauseInfo_Manual)(nil), // 40: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual + (*Callback_Nexus)(nil), // 41: temporal.server.api.persistence.v1.Callback.Nexus + (*Callback_HSM)(nil), // 42: temporal.server.api.persistence.v1.Callback.HSM + nil, // 43: temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry + (*CallbackInfo_WorkflowClosed)(nil), // 44: temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed + (*CallbackInfo_Trigger)(nil), // 45: temporal.server.api.persistence.v1.CallbackInfo.Trigger + (*timestamppb.Timestamp)(nil), // 46: google.protobuf.Timestamp + (*durationpb.Duration)(nil), // 47: google.protobuf.Duration + (v1.WorkflowTaskType)(0), // 48: temporal.server.api.enums.v1.WorkflowTaskType + (v11.SuggestContinueAsNewReason)(0), // 49: temporal.api.enums.v1.SuggestContinueAsNewReason + (*v12.ResetPoints)(nil), // 50: temporal.api.workflow.v1.ResetPoints + (*v14.VersionHistories)(nil), // 51: temporal.server.api.history.v1.VersionHistories + (*v15.VectorClock)(nil), // 52: temporal.server.api.clock.v1.VectorClock + (*v16.BaseExecutionInfo)(nil), // 53: temporal.server.api.workflow.v1.BaseExecutionInfo + (*v13.WorkerVersionStamp)(nil), // 54: temporal.api.common.v1.WorkerVersionStamp + (*VersionedTransition)(nil), // 55: temporal.server.api.persistence.v1.VersionedTransition + (*StateMachineTimerGroup)(nil), // 56: temporal.server.api.persistence.v1.StateMachineTimerGroup + (*StateMachineTombstoneBatch)(nil), // 57: temporal.server.api.persistence.v1.StateMachineTombstoneBatch + (*v12.WorkflowExecutionVersioningInfo)(nil), // 58: temporal.api.workflow.v1.WorkflowExecutionVersioningInfo + (*v13.Priority)(nil), // 59: temporal.api.common.v1.Priority + (v11.WorkflowTaskFailedCause)(0), // 60: temporal.api.enums.v1.WorkflowTaskFailedCause + (v11.TimeoutType)(0), // 61: temporal.api.enums.v1.TimeoutType + (*v17.DeclinedTargetVersionUpgrade)(nil), // 62: temporal.api.history.v1.DeclinedTargetVersionUpgrade + (*v18.WorkerDeploymentVersion)(nil), // 63: temporal.api.deployment.v1.WorkerDeploymentVersion + (v1.WorkflowExecutionState)(0), // 64: temporal.server.api.enums.v1.WorkflowExecutionState + (v11.WorkflowExecutionStatus)(0), // 65: temporal.api.enums.v1.WorkflowExecutionStatus + (v11.EventType)(0), // 66: temporal.api.enums.v1.EventType + (v1.TaskType)(0), // 67: temporal.server.api.enums.v1.TaskType + (*ChasmTaskInfo)(nil), // 68: temporal.server.api.persistence.v1.ChasmTaskInfo + (v1.TaskPriority)(0), // 69: temporal.server.api.enums.v1.TaskPriority + (*v14.VersionHistoryItem)(nil), // 70: temporal.server.api.history.v1.VersionHistoryItem + (v1.WorkflowBackoffType)(0), // 71: temporal.server.api.enums.v1.WorkflowBackoffType + (*StateMachineTaskInfo)(nil), // 72: temporal.server.api.persistence.v1.StateMachineTaskInfo + (*v19.Failure)(nil), // 73: temporal.api.failure.v1.Failure + (*v13.Payloads)(nil), // 74: temporal.api.common.v1.Payloads + (*v13.ActivityType)(nil), // 75: temporal.api.common.v1.ActivityType + (*v18.Deployment)(nil), // 76: temporal.api.deployment.v1.Deployment + (v11.ParentClosePolicy)(0), // 77: temporal.api.enums.v1.ParentClosePolicy + (v1.ChecksumFlavor)(0), // 78: temporal.server.api.enums.v1.ChecksumFlavor + (*v13.Link)(nil), // 79: temporal.api.common.v1.Link + (*v17.HistoryEvent)(nil), // 80: temporal.api.history.v1.HistoryEvent + (v1.CallbackState)(0), // 81: temporal.server.api.enums.v1.CallbackState + (v1.NexusOperationState)(0), // 82: temporal.server.api.enums.v1.NexusOperationState + (v11.NexusOperationCancellationState)(0), // 83: temporal.api.enums.v1.NexusOperationCancellationState + (*QueueState)(nil), // 84: temporal.server.api.persistence.v1.QueueState + (*v13.Payload)(nil), // 85: temporal.api.common.v1.Payload + (*UpdateInfo)(nil), // 86: temporal.server.api.persistence.v1.UpdateInfo + (*StateMachineMap)(nil), // 87: temporal.server.api.persistence.v1.StateMachineMap + (*StateMachineRef)(nil), // 88: temporal.server.api.persistence.v1.StateMachineRef } var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ - 44, // 0: temporal.server.api.persistence.v1.ShardInfo.update_time:type_name -> google.protobuf.Timestamp - 27, // 1: temporal.server.api.persistence.v1.ShardInfo.replication_dlq_ack_level:type_name -> temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry - 28, // 2: temporal.server.api.persistence.v1.ShardInfo.queue_states:type_name -> temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry - 45, // 3: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_timeout:type_name -> google.protobuf.Duration - 45, // 4: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_timeout:type_name -> google.protobuf.Duration - 45, // 5: temporal.server.api.persistence.v1.WorkflowExecutionInfo.default_workflow_task_timeout:type_name -> google.protobuf.Duration - 44, // 6: temporal.server.api.persistence.v1.WorkflowExecutionInfo.start_time:type_name -> google.protobuf.Timestamp - 44, // 7: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_update_time:type_name -> google.protobuf.Timestamp - 45, // 8: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_timeout:type_name -> google.protobuf.Duration - 44, // 9: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_started_time:type_name -> google.protobuf.Timestamp - 44, // 10: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_scheduled_time:type_name -> google.protobuf.Timestamp - 44, // 11: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_original_scheduled_time:type_name -> google.protobuf.Timestamp - 46, // 12: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_type:type_name -> temporal.server.api.enums.v1.WorkflowTaskType - 47, // 13: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_suggest_continue_as_new_reasons:type_name -> temporal.api.enums.v1.SuggestContinueAsNewReason - 45, // 14: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sticky_schedule_to_start_timeout:type_name -> google.protobuf.Duration - 45, // 15: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 45, // 16: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 44, // 17: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_expiration_time:type_name -> google.protobuf.Timestamp - 48, // 18: temporal.server.api.persistence.v1.WorkflowExecutionInfo.auto_reset_points:type_name -> temporal.api.workflow.v1.ResetPoints - 29, // 19: temporal.server.api.persistence.v1.WorkflowExecutionInfo.search_attributes:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry - 30, // 20: temporal.server.api.persistence.v1.WorkflowExecutionInfo.memo:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry - 49, // 21: temporal.server.api.persistence.v1.WorkflowExecutionInfo.version_histories:type_name -> temporal.server.api.history.v1.VersionHistories - 3, // 22: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_stats:type_name -> temporal.server.api.persistence.v1.ExecutionStats - 44, // 23: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_expiration_time:type_name -> google.protobuf.Timestamp - 44, // 24: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_time:type_name -> google.protobuf.Timestamp - 50, // 25: temporal.server.api.persistence.v1.WorkflowExecutionInfo.parent_clock:type_name -> temporal.server.api.clock.v1.VectorClock - 44, // 26: temporal.server.api.persistence.v1.WorkflowExecutionInfo.close_time:type_name -> google.protobuf.Timestamp - 51, // 27: temporal.server.api.persistence.v1.WorkflowExecutionInfo.base_execution_info:type_name -> temporal.server.api.workflow.v1.BaseExecutionInfo - 52, // 28: temporal.server.api.persistence.v1.WorkflowExecutionInfo.most_recent_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 31, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.update_infos:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry - 53, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 32, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machines_by_type:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry - 54, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.state_machine_timers:type_name -> temporal.server.api.persistence.v1.StateMachineTimerGroup - 53, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 53, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.visibility_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 53, // 35: temporal.server.api.persistence.v1.WorkflowExecutionInfo.signal_request_ids_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 55, // 36: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machine_tombstone_batches:type_name -> temporal.server.api.persistence.v1.StateMachineTombstoneBatch - 56, // 37: temporal.server.api.persistence.v1.WorkflowExecutionInfo.versioning_info:type_name -> temporal.api.workflow.v1.WorkflowExecutionVersioningInfo - 53, // 38: temporal.server.api.persistence.v1.WorkflowExecutionInfo.previous_transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 53, // 39: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_transition_history_break_point:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 33, // 40: temporal.server.api.persistence.v1.WorkflowExecutionInfo.children_initialized_post_reset_point:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry - 57, // 41: temporal.server.api.persistence.v1.WorkflowExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 26, // 42: temporal.server.api.persistence.v1.WorkflowExecutionInfo.pause_info:type_name -> temporal.server.api.persistence.v1.WorkflowPauseInfo - 58, // 43: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_failure_cause:type_name -> temporal.api.enums.v1.WorkflowTaskFailedCause - 59, // 44: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_timed_out_type:type_name -> temporal.api.enums.v1.TimeoutType -<<<<<<< HEAD + 46, // 0: temporal.server.api.persistence.v1.ShardInfo.update_time:type_name -> google.protobuf.Timestamp + 29, // 1: temporal.server.api.persistence.v1.ShardInfo.replication_dlq_ack_level:type_name -> temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry + 30, // 2: temporal.server.api.persistence.v1.ShardInfo.queue_states:type_name -> temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry + 47, // 3: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_timeout:type_name -> google.protobuf.Duration + 47, // 4: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_timeout:type_name -> google.protobuf.Duration + 47, // 5: temporal.server.api.persistence.v1.WorkflowExecutionInfo.default_workflow_task_timeout:type_name -> google.protobuf.Duration + 46, // 6: temporal.server.api.persistence.v1.WorkflowExecutionInfo.start_time:type_name -> google.protobuf.Timestamp + 46, // 7: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_update_time:type_name -> google.protobuf.Timestamp + 47, // 8: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_timeout:type_name -> google.protobuf.Duration + 46, // 9: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_started_time:type_name -> google.protobuf.Timestamp + 46, // 10: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_scheduled_time:type_name -> google.protobuf.Timestamp + 46, // 11: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_original_scheduled_time:type_name -> google.protobuf.Timestamp + 48, // 12: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_type:type_name -> temporal.server.api.enums.v1.WorkflowTaskType + 49, // 13: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_suggest_continue_as_new_reasons:type_name -> temporal.api.enums.v1.SuggestContinueAsNewReason + 47, // 14: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sticky_schedule_to_start_timeout:type_name -> google.protobuf.Duration + 47, // 15: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_initial_interval:type_name -> google.protobuf.Duration + 47, // 16: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_maximum_interval:type_name -> google.protobuf.Duration + 46, // 17: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_expiration_time:type_name -> google.protobuf.Timestamp + 50, // 18: temporal.server.api.persistence.v1.WorkflowExecutionInfo.auto_reset_points:type_name -> temporal.api.workflow.v1.ResetPoints + 31, // 19: temporal.server.api.persistence.v1.WorkflowExecutionInfo.search_attributes:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry + 32, // 20: temporal.server.api.persistence.v1.WorkflowExecutionInfo.memo:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry + 51, // 21: temporal.server.api.persistence.v1.WorkflowExecutionInfo.version_histories:type_name -> temporal.server.api.history.v1.VersionHistories + 5, // 22: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_stats:type_name -> temporal.server.api.persistence.v1.ExecutionStats + 46, // 23: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_expiration_time:type_name -> google.protobuf.Timestamp + 46, // 24: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_time:type_name -> google.protobuf.Timestamp + 52, // 25: temporal.server.api.persistence.v1.WorkflowExecutionInfo.parent_clock:type_name -> temporal.server.api.clock.v1.VectorClock + 46, // 26: temporal.server.api.persistence.v1.WorkflowExecutionInfo.close_time:type_name -> google.protobuf.Timestamp + 53, // 27: temporal.server.api.persistence.v1.WorkflowExecutionInfo.base_execution_info:type_name -> temporal.server.api.workflow.v1.BaseExecutionInfo + 54, // 28: temporal.server.api.persistence.v1.WorkflowExecutionInfo.most_recent_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp + 33, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.update_infos:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry + 55, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 34, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machines_by_type:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry + 56, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.state_machine_timers:type_name -> temporal.server.api.persistence.v1.StateMachineTimerGroup + 55, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 55, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.visibility_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 55, // 35: temporal.server.api.persistence.v1.WorkflowExecutionInfo.signal_request_ids_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 57, // 36: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machine_tombstone_batches:type_name -> temporal.server.api.persistence.v1.StateMachineTombstoneBatch + 58, // 37: temporal.server.api.persistence.v1.WorkflowExecutionInfo.versioning_info:type_name -> temporal.api.workflow.v1.WorkflowExecutionVersioningInfo + 55, // 38: temporal.server.api.persistence.v1.WorkflowExecutionInfo.previous_transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 55, // 39: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_transition_history_break_point:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 35, // 40: temporal.server.api.persistence.v1.WorkflowExecutionInfo.children_initialized_post_reset_point:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry + 59, // 41: temporal.server.api.persistence.v1.WorkflowExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority + 28, // 42: temporal.server.api.persistence.v1.WorkflowExecutionInfo.pause_info:type_name -> temporal.server.api.persistence.v1.WorkflowPauseInfo + 60, // 43: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_failure_cause:type_name -> temporal.api.enums.v1.WorkflowTaskFailedCause + 61, // 44: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_timed_out_type:type_name -> temporal.api.enums.v1.TimeoutType 2, // 45: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_notified_target_version:type_name -> temporal.server.api.persistence.v1.LastNotifiedTargetVersion - 60, // 46: temporal.server.api.persistence.v1.WorkflowExecutionInfo.declined_target_version_upgrade:type_name -> temporal.api.history.v1.DeclinedTargetVersionUpgrade - 61, // 47: temporal.server.api.persistence.v1.LastNotifiedTargetVersion.deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 62, // 48: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState - 63, // 49: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus - 53, // 50: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 44, // 51: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp - 34, // 52: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - 64, // 53: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType - 65, // 54: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 55: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 35, // 56: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - 66, // 57: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 65, // 58: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 59: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 67, // 60: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority - 53, // 61: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 7, // 62: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo - 68, // 63: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem - 65, // 64: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 65: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 44, // 66: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp - 66, // 67: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 65, // 68: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 59, // 69: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType - 69, // 70: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType - 44, // 71: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 66, // 72: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 65, // 73: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 74: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 65, // 75: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 76: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 70, // 77: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo - 66, // 78: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 44, // 79: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 44, // 80: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp - 45, // 81: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 45, // 82: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 45, // 83: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 45, // 84: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration - 45, // 85: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 45, // 86: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 44, // 87: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp - 71, // 88: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure - 72, // 89: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads - 44, // 90: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp - 73, // 91: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType - 36, // 92: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - 52, // 93: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 53, // 94: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 44, // 95: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp - 44, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 74, // 97: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment - 61, // 98: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 57, // 99: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority - 37, // 100: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - 44, // 101: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp - 53, // 102: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 75, // 103: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy - 50, // 104: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock - 53, // 105: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 57, // 106: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 53, // 107: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 53, // 108: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 76, // 109: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor - 39, // 110: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus - 40, // 111: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM - 77, // 112: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link - 78, // 113: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent - 20, // 114: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback - 43, // 115: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger - 44, // 116: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp - 79, // 117: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState - 44, // 118: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 71, // 119: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 44, // 120: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 45, // 121: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 44, // 122: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 80, // 123: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState - 44, // 124: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 71, // 125: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 44, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 45, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 45, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 44, // 129: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp - 44, // 130: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp - 81, // 131: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState - 44, // 132: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 71, // 133: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 44, // 134: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 44, // 135: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 82, // 136: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState - 83, // 137: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload - 83, // 138: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload - 84, // 139: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo - 85, // 140: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap - 25, // 141: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo - 5, // 142: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo - 44, // 143: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 38, // 144: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - 41, // 145: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - 86, // 146: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef - 42, // 147: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - 148, // [148:148] is the sub-list for method output_type - 148, // [148:148] is the sub-list for method input_type - 148, // [148:148] is the sub-list for extension type_name - 148, // [148:148] is the sub-list for extension extendee - 0, // [0:148] is the sub-list for field type_name -======= - 2, // 45: temporal.server.api.persistence.v1.WorkflowExecutionInfo.time_skipping_info:type_name -> temporal.server.api.persistence.v1.TimeSkippingInfo - 44, // 46: temporal.server.api.persistence.v1.TimeSkippingInfo.skipped_time_offsets:type_name -> google.protobuf.Timestamp - 60, // 47: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState - 61, // 48: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus - 53, // 49: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 44, // 50: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp - 34, // 51: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - 62, // 52: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType - 63, // 53: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 54: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 35, // 55: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - 64, // 56: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 63, // 57: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 58: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 65, // 59: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority - 53, // 60: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 7, // 61: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo - 66, // 62: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem - 63, // 63: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 64: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 44, // 65: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp - 64, // 66: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 63, // 67: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 59, // 68: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType - 67, // 69: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType - 44, // 70: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 64, // 71: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 63, // 72: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 73: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 63, // 74: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 44, // 75: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 68, // 76: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo - 64, // 77: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 44, // 78: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 44, // 79: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp - 45, // 80: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 45, // 81: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 45, // 82: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 45, // 83: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration - 45, // 84: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 45, // 85: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 44, // 86: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp - 69, // 87: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure - 70, // 88: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads - 44, // 89: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp - 71, // 90: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType - 36, // 91: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - 52, // 92: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 53, // 93: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 44, // 94: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp - 44, // 95: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 72, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment - 73, // 97: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 57, // 98: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority - 37, // 99: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - 44, // 100: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp - 53, // 101: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 74, // 102: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy - 50, // 103: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock - 53, // 104: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 57, // 105: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 53, // 106: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 53, // 107: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 75, // 108: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor - 39, // 109: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus - 40, // 110: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM - 76, // 111: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link - 77, // 112: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent - 20, // 113: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback - 43, // 114: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger - 44, // 115: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp - 78, // 116: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState - 44, // 117: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 69, // 118: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 44, // 119: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 45, // 120: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 44, // 121: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 79, // 122: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState - 44, // 123: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 69, // 124: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 44, // 125: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 45, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 45, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 44, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp - 44, // 129: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp - 80, // 130: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState - 44, // 131: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 69, // 132: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 44, // 133: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 44, // 134: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 81, // 135: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState - 82, // 136: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload - 82, // 137: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload - 83, // 138: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo - 84, // 139: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap - 25, // 140: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo - 5, // 141: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo - 44, // 142: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 38, // 143: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - 41, // 144: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - 85, // 145: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef - 42, // 146: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - 147, // [147:147] is the sub-list for method output_type - 147, // [147:147] is the sub-list for method input_type - 147, // [147:147] is the sub-list for extension type_name - 147, // [147:147] is the sub-list for extension extendee - 0, // [0:147] is the sub-list for field type_name ->>>>>>> 286ac49dc (timeskipping-poc: control plane) -======= -} -var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ - 45, // 0: temporal.server.api.persistence.v1.ShardInfo.update_time:type_name -> google.protobuf.Timestamp - 28, // 1: temporal.server.api.persistence.v1.ShardInfo.replication_dlq_ack_level:type_name -> temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry - 29, // 2: temporal.server.api.persistence.v1.ShardInfo.queue_states:type_name -> temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry - 46, // 3: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_timeout:type_name -> google.protobuf.Duration - 46, // 4: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_timeout:type_name -> google.protobuf.Duration - 46, // 5: temporal.server.api.persistence.v1.WorkflowExecutionInfo.default_workflow_task_timeout:type_name -> google.protobuf.Duration - 45, // 6: temporal.server.api.persistence.v1.WorkflowExecutionInfo.start_time:type_name -> google.protobuf.Timestamp - 45, // 7: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_update_time:type_name -> google.protobuf.Timestamp - 46, // 8: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_timeout:type_name -> google.protobuf.Duration - 45, // 9: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_started_time:type_name -> google.protobuf.Timestamp - 45, // 10: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_scheduled_time:type_name -> google.protobuf.Timestamp - 45, // 11: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_original_scheduled_time:type_name -> google.protobuf.Timestamp - 47, // 12: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_type:type_name -> temporal.server.api.enums.v1.WorkflowTaskType - 48, // 13: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_suggest_continue_as_new_reasons:type_name -> temporal.api.enums.v1.SuggestContinueAsNewReason - 46, // 14: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sticky_schedule_to_start_timeout:type_name -> google.protobuf.Duration - 46, // 15: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 46, // 16: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 45, // 17: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_expiration_time:type_name -> google.protobuf.Timestamp - 49, // 18: temporal.server.api.persistence.v1.WorkflowExecutionInfo.auto_reset_points:type_name -> temporal.api.workflow.v1.ResetPoints - 30, // 19: temporal.server.api.persistence.v1.WorkflowExecutionInfo.search_attributes:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry - 31, // 20: temporal.server.api.persistence.v1.WorkflowExecutionInfo.memo:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry - 50, // 21: temporal.server.api.persistence.v1.WorkflowExecutionInfo.version_histories:type_name -> temporal.server.api.history.v1.VersionHistories - 4, // 22: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_stats:type_name -> temporal.server.api.persistence.v1.ExecutionStats - 45, // 23: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_expiration_time:type_name -> google.protobuf.Timestamp - 45, // 24: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_time:type_name -> google.protobuf.Timestamp - 51, // 25: temporal.server.api.persistence.v1.WorkflowExecutionInfo.parent_clock:type_name -> temporal.server.api.clock.v1.VectorClock - 45, // 26: temporal.server.api.persistence.v1.WorkflowExecutionInfo.close_time:type_name -> google.protobuf.Timestamp - 52, // 27: temporal.server.api.persistence.v1.WorkflowExecutionInfo.base_execution_info:type_name -> temporal.server.api.workflow.v1.BaseExecutionInfo - 53, // 28: temporal.server.api.persistence.v1.WorkflowExecutionInfo.most_recent_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 32, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.update_infos:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry - 54, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 33, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machines_by_type:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry - 55, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.state_machine_timers:type_name -> temporal.server.api.persistence.v1.StateMachineTimerGroup - 54, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 54, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.visibility_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 54, // 35: temporal.server.api.persistence.v1.WorkflowExecutionInfo.signal_request_ids_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 56, // 36: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machine_tombstone_batches:type_name -> temporal.server.api.persistence.v1.StateMachineTombstoneBatch - 57, // 37: temporal.server.api.persistence.v1.WorkflowExecutionInfo.versioning_info:type_name -> temporal.api.workflow.v1.WorkflowExecutionVersioningInfo - 54, // 38: temporal.server.api.persistence.v1.WorkflowExecutionInfo.previous_transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 54, // 39: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_transition_history_break_point:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 34, // 40: temporal.server.api.persistence.v1.WorkflowExecutionInfo.children_initialized_post_reset_point:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry - 58, // 41: temporal.server.api.persistence.v1.WorkflowExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 27, // 42: temporal.server.api.persistence.v1.WorkflowExecutionInfo.pause_info:type_name -> temporal.server.api.persistence.v1.WorkflowPauseInfo - 59, // 43: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_failure_cause:type_name -> temporal.api.enums.v1.WorkflowTaskFailedCause - 60, // 44: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_timed_out_type:type_name -> temporal.api.enums.v1.TimeoutType - 2, // 45: temporal.server.api.persistence.v1.WorkflowExecutionInfo.time_skipping_info:type_name -> temporal.server.api.persistence.v1.TimeSkippingInfo - 3, // 46: temporal.server.api.persistence.v1.TimeSkippingInfo.time_skipped_details:type_name -> temporal.server.api.persistence.v1.TimeSkippedDetails - 45, // 47: temporal.server.api.persistence.v1.TimeSkippedDetails.real_time_point_when_skipped:type_name -> google.protobuf.Timestamp - 45, // 48: temporal.server.api.persistence.v1.TimeSkippedDetails.virtual_time_point_when_skipped:type_name -> google.protobuf.Timestamp - 45, // 49: temporal.server.api.persistence.v1.TimeSkippedDetails.duration_to_skip:type_name -> google.protobuf.Timestamp - 45, // 50: temporal.server.api.persistence.v1.TimeSkippedDetails.target_virtual_time_point:type_name -> google.protobuf.Timestamp - 61, // 51: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState - 62, // 52: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus - 54, // 53: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 45, // 54: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp - 35, // 55: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - 63, // 56: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType - 64, // 57: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 45, // 58: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 36, // 59: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - 65, // 60: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 64, // 61: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 45, // 62: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 66, // 63: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority - 54, // 64: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 8, // 65: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo - 67, // 66: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem - 64, // 67: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 45, // 68: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 45, // 69: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp - 65, // 70: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 64, // 71: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 60, // 72: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType - 68, // 73: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType - 45, // 74: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 65, // 75: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 64, // 76: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 45, // 77: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 64, // 78: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 45, // 79: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 69, // 80: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo - 65, // 81: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 45, // 82: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 45, // 83: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp - 46, // 84: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 46, // 85: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 46, // 86: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 46, // 87: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration - 46, // 88: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 46, // 89: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 45, // 90: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp - 70, // 91: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure - 71, // 92: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads - 45, // 93: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp - 72, // 94: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType - 37, // 95: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - 53, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 54, // 97: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 45, // 98: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp - 45, // 99: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 73, // 100: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment - 74, // 101: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 58, // 102: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority - 38, // 103: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - 45, // 104: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp - 54, // 105: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 75, // 106: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy - 51, // 107: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock - 54, // 108: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 58, // 109: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 54, // 110: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 54, // 111: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 76, // 112: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor - 40, // 113: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus - 41, // 114: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM - 77, // 115: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link - 78, // 116: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent - 21, // 117: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback - 44, // 118: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger - 45, // 119: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp - 79, // 120: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState - 45, // 121: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 70, // 122: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 45, // 123: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 46, // 124: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 45, // 125: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 80, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState - 45, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 70, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 45, // 129: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 46, // 130: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 46, // 131: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 45, // 132: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp - 45, // 133: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp - 81, // 134: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState - 45, // 135: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 70, // 136: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 45, // 137: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 45, // 138: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 82, // 139: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState - 83, // 140: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload - 83, // 141: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload - 84, // 142: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo - 85, // 143: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap - 26, // 144: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo - 6, // 145: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo - 45, // 146: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 39, // 147: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - 42, // 148: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - 86, // 149: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef - 43, // 150: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - 151, // [151:151] is the sub-list for method output_type - 151, // [151:151] is the sub-list for method input_type - 151, // [151:151] is the sub-list for extension type_name - 151, // [151:151] is the sub-list for extension extendee - 0, // [0:151] is the sub-list for field type_name ->>>>>>> 858c94fe0 (time-skipping: core part of state manipulation) + 62, // 46: temporal.server.api.persistence.v1.WorkflowExecutionInfo.declined_target_version_upgrade:type_name -> temporal.api.history.v1.DeclinedTargetVersionUpgrade + 3, // 47: temporal.server.api.persistence.v1.WorkflowExecutionInfo.time_skipping_info:type_name -> temporal.server.api.persistence.v1.TimeSkippingInfo + 63, // 48: temporal.server.api.persistence.v1.LastNotifiedTargetVersion.deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion + 4, // 49: temporal.server.api.persistence.v1.TimeSkippingInfo.time_skipped_details:type_name -> temporal.server.api.persistence.v1.TimeSkippedDetails + 46, // 50: temporal.server.api.persistence.v1.TimeSkippedDetails.real_time_when_skipped:type_name -> google.protobuf.Timestamp + 46, // 51: temporal.server.api.persistence.v1.TimeSkippedDetails.virtual_time_when_skipped:type_name -> google.protobuf.Timestamp + 46, // 52: temporal.server.api.persistence.v1.TimeSkippedDetails.duration_to_skip:type_name -> google.protobuf.Timestamp + 46, // 53: temporal.server.api.persistence.v1.TimeSkippedDetails.target_virtual_time:type_name -> google.protobuf.Timestamp + 64, // 54: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState + 65, // 55: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus + 55, // 56: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 46, // 57: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp + 36, // 58: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + 66, // 59: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType + 67, // 60: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 61: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 37, // 62: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + 68, // 63: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 67, // 64: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 65: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 69, // 66: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority + 55, // 67: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 9, // 68: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo + 70, // 69: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem + 67, // 70: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 71: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 46, // 72: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp + 68, // 73: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 67, // 74: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 61, // 75: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType + 71, // 76: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType + 46, // 77: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 68, // 78: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 67, // 79: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 80: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 67, // 81: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 82: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 72, // 83: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo + 68, // 84: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 46, // 85: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 46, // 86: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp + 47, // 87: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 47, // 88: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 47, // 89: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 47, // 90: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration + 47, // 91: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration + 47, // 92: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration + 46, // 93: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp + 73, // 94: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure + 74, // 95: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads + 46, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp + 75, // 97: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType + 38, // 98: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo + 54, // 99: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp + 55, // 100: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 46, // 101: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp + 46, // 102: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 76, // 103: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment + 63, // 104: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion + 59, // 105: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority + 39, // 106: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo + 46, // 107: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp + 55, // 108: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 77, // 109: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy + 52, // 110: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock + 55, // 111: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 59, // 112: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority + 55, // 113: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 55, // 114: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 78, // 115: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor + 41, // 116: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus + 42, // 117: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM + 79, // 118: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link + 80, // 119: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent + 22, // 120: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback + 45, // 121: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger + 46, // 122: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp + 81, // 123: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState + 46, // 124: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 125: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 46, // 126: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 47, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 46, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 82, // 129: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState + 46, // 130: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 131: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 46, // 132: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 47, // 133: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 47, // 134: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 46, // 135: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp + 46, // 136: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp + 83, // 137: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState + 46, // 138: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 139: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 46, // 140: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 46, // 141: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 84, // 142: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState + 85, // 143: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload + 85, // 144: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload + 86, // 145: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo + 87, // 146: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap + 27, // 147: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo + 7, // 148: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo + 46, // 149: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 40, // 150: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual + 43, // 151: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry + 88, // 152: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef + 44, // 153: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed + 154, // [154:154] is the sub-list for method output_type + 154, // [154:154] is the sub-list for method input_type + 154, // [154:154] is the sub-list for extension type_name + 154, // [154:154] is the sub-list for extension extendee + 0, // [0:154] is the sub-list for field type_name } func init() { file_temporal_server_api_persistence_v1_executions_proto_init() } @@ -5924,33 +5542,33 @@ func file_temporal_server_api_persistence_v1_executions_proto_init() { (*WorkflowExecutionInfo_LastWorkflowTaskFailureCause)(nil), (*WorkflowExecutionInfo_LastWorkflowTaskTimedOutType)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[7].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[8].OneofWrappers = []any{ (*TransferTaskInfo_CloseExecutionTaskDetails_)(nil), (*TransferTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[9].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10].OneofWrappers = []any{ (*VisibilityTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11].OneofWrappers = []any{ (*TimerTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[12].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13].OneofWrappers = []any{ (*OutboundTaskInfo_StateMachineInfo)(nil), (*OutboundTaskInfo_ChasmTaskInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[15].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[16].OneofWrappers = []any{ (*ActivityInfo_UseWorkflowBuildIdInfo_)(nil), (*ActivityInfo_LastIndependentlyAssignedBuildId)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[21].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[22].OneofWrappers = []any{ (*Callback_Nexus_)(nil), (*Callback_Hsm)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[39].OneofWrappers = []any{ (*ActivityInfo_PauseInfo_Manual_)(nil), (*ActivityInfo_PauseInfo_RuleId)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[44].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[45].OneofWrappers = []any{ (*CallbackInfo_Trigger_WorkflowClosed)(nil), } type x struct{} @@ -5959,7 +5577,7 @@ func file_temporal_server_api_persistence_v1_executions_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_api_persistence_v1_executions_proto_rawDesc), len(file_temporal_server_api_persistence_v1_executions_proto_rawDesc)), NumEnums: 0, - NumMessages: 45, + NumMessages: 46, NumExtensions: 0, NumServices: 0, }, diff --git a/chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go b/chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go new file mode 100644 index 0000000000..a765e20868 --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/activity_state.go-helpers.pb.go @@ -0,0 +1,292 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package activitypb + +import ( + "fmt" + + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type ActivityState to the protobuf v3 wire format +func (val *ActivityState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityState from the protobuf v3 wire format +func (val *ActivityState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityState + switch t := that.(type) { + case *ActivityState: + that1 = t + case ActivityState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ActivityCancelState to the protobuf v3 wire format +func (val *ActivityCancelState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityCancelState from the protobuf v3 wire format +func (val *ActivityCancelState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityCancelState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityCancelState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityCancelState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityCancelState + switch t := that.(type) { + case *ActivityCancelState: + that1 = t + case ActivityCancelState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ActivityTerminateState to the protobuf v3 wire format +func (val *ActivityTerminateState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityTerminateState from the protobuf v3 wire format +func (val *ActivityTerminateState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityTerminateState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityTerminateState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityTerminateState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityTerminateState + switch t := that.(type) { + case *ActivityTerminateState: + that1 = t + case ActivityTerminateState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ActivityAttemptState to the protobuf v3 wire format +func (val *ActivityAttemptState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityAttemptState from the protobuf v3 wire format +func (val *ActivityAttemptState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityAttemptState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityAttemptState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityAttemptState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityAttemptState + switch t := that.(type) { + case *ActivityAttemptState: + that1 = t + case ActivityAttemptState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ActivityHeartbeatState to the protobuf v3 wire format +func (val *ActivityHeartbeatState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityHeartbeatState from the protobuf v3 wire format +func (val *ActivityHeartbeatState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityHeartbeatState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityHeartbeatState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityHeartbeatState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityHeartbeatState + switch t := that.(type) { + case *ActivityHeartbeatState: + that1 = t + case ActivityHeartbeatState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ActivityRequestData to the protobuf v3 wire format +func (val *ActivityRequestData) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityRequestData from the protobuf v3 wire format +func (val *ActivityRequestData) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityRequestData) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityRequestData values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityRequestData) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityRequestData + switch t := that.(type) { + case *ActivityRequestData: + that1 = t + case ActivityRequestData: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ActivityOutcome to the protobuf v3 wire format +func (val *ActivityOutcome) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityOutcome from the protobuf v3 wire format +func (val *ActivityOutcome) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityOutcome) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityOutcome values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityOutcome) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityOutcome + switch t := that.(type) { + case *ActivityOutcome: + that1 = t + case ActivityOutcome: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +var ( + ActivityExecutionStatus_shorthandValue = map[string]int32{ + "Unspecified": 0, + "Scheduled": 1, + "Started": 2, + "CancelRequested": 3, + "Completed": 4, + "Failed": 5, + "Canceled": 6, + "Terminated": 7, + "TimedOut": 8, + } +) + +// ActivityExecutionStatusFromString parses a ActivityExecutionStatus value from either the protojson +// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to ActivityExecutionStatus +func ActivityExecutionStatusFromString(s string) (ActivityExecutionStatus, error) { + if v, ok := ActivityExecutionStatus_value[s]; ok { + return ActivityExecutionStatus(v), nil + } else if v, ok := ActivityExecutionStatus_shorthandValue[s]; ok { + return ActivityExecutionStatus(v), nil + } + return ActivityExecutionStatus(0), fmt.Errorf("%s is not a valid ActivityExecutionStatus", s) +} diff --git a/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go b/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go new file mode 100644 index 0000000000..4b0d3ea9e6 --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/activity_state.pb.go @@ -0,0 +1,1061 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/activity/proto/v1/activity_state.proto + +package activitypb + +import ( + reflect "reflect" + "strconv" + sync "sync" + unsafe "unsafe" + + v1 "go.temporal.io/api/common/v1" + v12 "go.temporal.io/api/deployment/v1" + v14 "go.temporal.io/api/failure/v1" + v13 "go.temporal.io/api/sdk/v1" + v11 "go.temporal.io/api/taskqueue/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ActivityExecutionStatus int32 + +const ( + ACTIVITY_EXECUTION_STATUS_UNSPECIFIED ActivityExecutionStatus = 0 + // The activity has been scheduled, but a worker has not accepted the task for the current + // attempt. The activity may be backing off between attempts or waiting for a worker to pick it + // up. + ACTIVITY_EXECUTION_STATUS_SCHEDULED ActivityExecutionStatus = 1 + // A worker has accepted a task for the current attempt. + ACTIVITY_EXECUTION_STATUS_STARTED ActivityExecutionStatus = 2 + // A caller has requested cancellation of the activity. + ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED ActivityExecutionStatus = 3 + // The activity completed successfully. + ACTIVITY_EXECUTION_STATUS_COMPLETED ActivityExecutionStatus = 4 + // The activity completed with failure. + ACTIVITY_EXECUTION_STATUS_FAILED ActivityExecutionStatus = 5 + // The activity completed as canceled. + // Requesting to cancel an activity does not automatically transition the activity to canceled status. If the worker + // responds to cancel the activity after requesting cancellation, the status will transition to cancelled. If the + // activity completes, fails, times out or terminates after cancel is requested and before the worker responds with + // cancelled. The activity will be stay in the terminal non-cancelled status. + ACTIVITY_EXECUTION_STATUS_CANCELED ActivityExecutionStatus = 6 + // The activity was terminated. Termination does not reach the worker and the activity code cannot react to it. + // A terminated activity may have a running attempt and will be requested to be canceled by the server when it + // heartbeats. + ACTIVITY_EXECUTION_STATUS_TERMINATED ActivityExecutionStatus = 7 + // The activity has timed out by reaching the specified schedule-to-start or schedule-to-close timeouts. + // Additionally, after all retries are exhausted for start-to-close or heartbeat timeouts, the activity will also + // transition to timed out status. + ACTIVITY_EXECUTION_STATUS_TIMED_OUT ActivityExecutionStatus = 8 +) + +// Enum value maps for ActivityExecutionStatus. +var ( + ActivityExecutionStatus_name = map[int32]string{ + 0: "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED", + 1: "ACTIVITY_EXECUTION_STATUS_SCHEDULED", + 2: "ACTIVITY_EXECUTION_STATUS_STARTED", + 3: "ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED", + 4: "ACTIVITY_EXECUTION_STATUS_COMPLETED", + 5: "ACTIVITY_EXECUTION_STATUS_FAILED", + 6: "ACTIVITY_EXECUTION_STATUS_CANCELED", + 7: "ACTIVITY_EXECUTION_STATUS_TERMINATED", + 8: "ACTIVITY_EXECUTION_STATUS_TIMED_OUT", + } + ActivityExecutionStatus_value = map[string]int32{ + "ACTIVITY_EXECUTION_STATUS_UNSPECIFIED": 0, + "ACTIVITY_EXECUTION_STATUS_SCHEDULED": 1, + "ACTIVITY_EXECUTION_STATUS_STARTED": 2, + "ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED": 3, + "ACTIVITY_EXECUTION_STATUS_COMPLETED": 4, + "ACTIVITY_EXECUTION_STATUS_FAILED": 5, + "ACTIVITY_EXECUTION_STATUS_CANCELED": 6, + "ACTIVITY_EXECUTION_STATUS_TERMINATED": 7, + "ACTIVITY_EXECUTION_STATUS_TIMED_OUT": 8, + } +) + +func (x ActivityExecutionStatus) Enum() *ActivityExecutionStatus { + p := new(ActivityExecutionStatus) + *p = x + return p +} + +func (x ActivityExecutionStatus) String() string { + switch x { + case ACTIVITY_EXECUTION_STATUS_UNSPECIFIED: + return "Unspecified" + case ACTIVITY_EXECUTION_STATUS_SCHEDULED: + return "Scheduled" + case ACTIVITY_EXECUTION_STATUS_STARTED: + return "Started" + case ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED: + return "CancelRequested" + case ACTIVITY_EXECUTION_STATUS_COMPLETED: + return "Completed" + case ACTIVITY_EXECUTION_STATUS_FAILED: + return "Failed" + case ACTIVITY_EXECUTION_STATUS_CANCELED: + return "Canceled" + case ACTIVITY_EXECUTION_STATUS_TERMINATED: + return "Terminated" + case ACTIVITY_EXECUTION_STATUS_TIMED_OUT: + return "TimedOut" + + // Deprecated: Use ActivityExecutionStatus.Descriptor instead. + default: + return strconv.Itoa(int(x)) + } + +} + +func (ActivityExecutionStatus) Descriptor() protoreflect.EnumDescriptor { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes[0].Descriptor() +} + +func (ActivityExecutionStatus) Type() protoreflect.EnumType { + return &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes[0] +} + +func (x ActivityExecutionStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (ActivityExecutionStatus) EnumDescriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{0} +} + +type ActivityState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The type of the activity, a string that maps to a registered activity on a worker. + ActivityType *v1.ActivityType `protobuf:"bytes,1,opt,name=activity_type,json=activityType,proto3" json:"activity_type,omitempty"` + TaskQueue *v11.TaskQueue `protobuf:"bytes,2,opt,name=task_queue,json=taskQueue,proto3" json:"task_queue,omitempty"` + // Indicates how long the caller is willing to wait for an activity completion. Limits how long + // retries will be attempted. Either this or `start_to_close_timeout` must be specified. + // + // (-- api-linter: core::0140::prepositions=disabled + // + // aip.dev/not-precedent: "to" is used to indicate interval. --) + ScheduleToCloseTimeout *durationpb.Duration `protobuf:"bytes,3,opt,name=schedule_to_close_timeout,json=scheduleToCloseTimeout,proto3" json:"schedule_to_close_timeout,omitempty"` + // Limits time an activity task can stay in a task queue before a worker picks it up. This + // timeout is always non retryable, as all a retry would achieve is to put it back into the same + // queue. Defaults to `schedule_to_close_timeout` or workflow execution timeout if not + // specified. + // + // (-- api-linter: core::0140::prepositions=disabled + // + // aip.dev/not-precedent: "to" is used to indicate interval. --) + ScheduleToStartTimeout *durationpb.Duration `protobuf:"bytes,4,opt,name=schedule_to_start_timeout,json=scheduleToStartTimeout,proto3" json:"schedule_to_start_timeout,omitempty"` + // Maximum time an activity is allowed to execute after being picked up by a worker. This + // timeout is always retryable. Either this or `schedule_to_close_timeout` must be + // specified. + // + // (-- api-linter: core::0140::prepositions=disabled + // + // aip.dev/not-precedent: "to" is used to indicate interval. --) + StartToCloseTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=start_to_close_timeout,json=startToCloseTimeout,proto3" json:"start_to_close_timeout,omitempty"` + // Maximum permitted time between successful worker heartbeats. + HeartbeatTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=heartbeat_timeout,json=heartbeatTimeout,proto3" json:"heartbeat_timeout,omitempty"` + // The retry policy for the activity. Will never exceed `schedule_to_close_timeout`. + RetryPolicy *v1.RetryPolicy `protobuf:"bytes,7,opt,name=retry_policy,json=retryPolicy,proto3" json:"retry_policy,omitempty"` + // All of the possible activity statuses (covers both the public ActivityExecutionStatus and PendingActivityState). + // TODO: consider moving this into ActivityAttemptState and renaming that message. This could save mutating two + // components on each attempt transition. + Status ActivityExecutionStatus `protobuf:"varint,8,opt,name=status,proto3,enum=temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatus" json:"status,omitempty"` + // Time the activity was originally scheduled via a StartActivityExecution request. + ScheduleTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` + // Priority metadata. + Priority *v1.Priority `protobuf:"bytes,10,opt,name=priority,proto3" json:"priority,omitempty"` + // Set if activity cancellation was requested. + CancelState *ActivityCancelState `protobuf:"bytes,11,opt,name=cancel_state,json=cancelState,proto3" json:"cancel_state,omitempty"` + // Set if the activity was terminated + TerminateState *ActivityTerminateState `protobuf:"bytes,12,opt,name=terminate_state,json=terminateState,proto3" json:"terminate_state,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityState) Reset() { + *x = ActivityState{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityState) ProtoMessage() {} + +func (x *ActivityState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityState.ProtoReflect.Descriptor instead. +func (*ActivityState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{0} +} + +func (x *ActivityState) GetActivityType() *v1.ActivityType { + if x != nil { + return x.ActivityType + } + return nil +} + +func (x *ActivityState) GetTaskQueue() *v11.TaskQueue { + if x != nil { + return x.TaskQueue + } + return nil +} + +func (x *ActivityState) GetScheduleToCloseTimeout() *durationpb.Duration { + if x != nil { + return x.ScheduleToCloseTimeout + } + return nil +} + +func (x *ActivityState) GetScheduleToStartTimeout() *durationpb.Duration { + if x != nil { + return x.ScheduleToStartTimeout + } + return nil +} + +func (x *ActivityState) GetStartToCloseTimeout() *durationpb.Duration { + if x != nil { + return x.StartToCloseTimeout + } + return nil +} + +func (x *ActivityState) GetHeartbeatTimeout() *durationpb.Duration { + if x != nil { + return x.HeartbeatTimeout + } + return nil +} + +func (x *ActivityState) GetRetryPolicy() *v1.RetryPolicy { + if x != nil { + return x.RetryPolicy + } + return nil +} + +func (x *ActivityState) GetStatus() ActivityExecutionStatus { + if x != nil { + return x.Status + } + return ACTIVITY_EXECUTION_STATUS_UNSPECIFIED +} + +func (x *ActivityState) GetScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.ScheduleTime + } + return nil +} + +func (x *ActivityState) GetPriority() *v1.Priority { + if x != nil { + return x.Priority + } + return nil +} + +func (x *ActivityState) GetCancelState() *ActivityCancelState { + if x != nil { + return x.CancelState + } + return nil +} + +func (x *ActivityState) GetTerminateState() *ActivityTerminateState { + if x != nil { + return x.TerminateState + } + return nil +} + +type ActivityCancelState struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + RequestTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=request_time,json=requestTime,proto3" json:"request_time,omitempty"` + Identity string `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` + Reason string `protobuf:"bytes,4,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityCancelState) Reset() { + *x = ActivityCancelState{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityCancelState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityCancelState) ProtoMessage() {} + +func (x *ActivityCancelState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityCancelState.ProtoReflect.Descriptor instead. +func (*ActivityCancelState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{1} +} + +func (x *ActivityCancelState) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *ActivityCancelState) GetRequestTime() *timestamppb.Timestamp { + if x != nil { + return x.RequestTime + } + return nil +} + +func (x *ActivityCancelState) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *ActivityCancelState) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type ActivityTerminateState struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityTerminateState) Reset() { + *x = ActivityTerminateState{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityTerminateState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityTerminateState) ProtoMessage() {} + +func (x *ActivityTerminateState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityTerminateState.ProtoReflect.Descriptor instead. +func (*ActivityTerminateState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{2} +} + +func (x *ActivityTerminateState) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type ActivityAttemptState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The attempt this activity is currently on. + // Incremented each time a new attempt is scheduled. A newly created activity will immediately be scheduled, and + // the count is set to 1. + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` + // Time from the last attempt failure to the next activity retry. + // If the activity is currently running, this represents the next retry interval in case the attempt fails. + // If activity is currently backing off between attempt, this represents the current retry interval. + // If there is no next retry allowed, this field will be null. + // This interval is typically calculated from the specified retry policy, but may be modified if an activity fails + // with a retryable application failure specifying a retry delay. + CurrentRetryInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=current_retry_interval,json=currentRetryInterval,proto3" json:"current_retry_interval,omitempty"` + // Time the last attempt was started. + StartedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=started_time,json=startedTime,proto3" json:"started_time,omitempty"` + // The time when the last activity attempt completed. If activity has not been completed yet, it will be null. + CompleteTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=complete_time,json=completeTime,proto3" json:"complete_time,omitempty"` + // Details about the last failure. This will only be updated when an activity attempt fails, + // including start-to-close timeout. Activity success, termination, schedule-to-start and schedule-to-close timeouts + // will not reset it. + LastFailureDetails *ActivityAttemptState_LastFailureDetails `protobuf:"bytes,5,opt,name=last_failure_details,json=lastFailureDetails,proto3" json:"last_failure_details,omitempty"` + // An incremental version number used to validate tasks. + // Initially this only verifies that a task belong to the current attempt. + // Later on this stamp will be used to also invalidate tasks when the activity is paused, reset, or has its options + // updated. + Stamp int32 `protobuf:"varint,6,opt,name=stamp,proto3" json:"stamp,omitempty"` + LastWorkerIdentity string `protobuf:"bytes,7,opt,name=last_worker_identity,json=lastWorkerIdentity,proto3" json:"last_worker_identity,omitempty"` + // The Worker Deployment Version this activity was dispatched to most recently. + // If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker. + LastDeploymentVersion *v12.WorkerDeploymentVersion `protobuf:"bytes,8,opt,name=last_deployment_version,json=lastDeploymentVersion,proto3" json:"last_deployment_version,omitempty"` + // The request ID that came from matching's RecordActivityTaskStarted API call. Used to make this API idempotent in + // case of implicit retries. + StartRequestId string `protobuf:"bytes,9,opt,name=start_request_id,json=startRequestId,proto3" json:"start_request_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityAttemptState) Reset() { + *x = ActivityAttemptState{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityAttemptState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityAttemptState) ProtoMessage() {} + +func (x *ActivityAttemptState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityAttemptState.ProtoReflect.Descriptor instead. +func (*ActivityAttemptState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{3} +} + +func (x *ActivityAttemptState) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *ActivityAttemptState) GetCurrentRetryInterval() *durationpb.Duration { + if x != nil { + return x.CurrentRetryInterval + } + return nil +} + +func (x *ActivityAttemptState) GetStartedTime() *timestamppb.Timestamp { + if x != nil { + return x.StartedTime + } + return nil +} + +func (x *ActivityAttemptState) GetCompleteTime() *timestamppb.Timestamp { + if x != nil { + return x.CompleteTime + } + return nil +} + +func (x *ActivityAttemptState) GetLastFailureDetails() *ActivityAttemptState_LastFailureDetails { + if x != nil { + return x.LastFailureDetails + } + return nil +} + +func (x *ActivityAttemptState) GetStamp() int32 { + if x != nil { + return x.Stamp + } + return 0 +} + +func (x *ActivityAttemptState) GetLastWorkerIdentity() string { + if x != nil { + return x.LastWorkerIdentity + } + return "" +} + +func (x *ActivityAttemptState) GetLastDeploymentVersion() *v12.WorkerDeploymentVersion { + if x != nil { + return x.LastDeploymentVersion + } + return nil +} + +func (x *ActivityAttemptState) GetStartRequestId() string { + if x != nil { + return x.StartRequestId + } + return "" +} + +type ActivityHeartbeatState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Details provided in the last recorded activity heartbeat. + Details *v1.Payloads `protobuf:"bytes,1,opt,name=details,proto3" json:"details,omitempty"` + // Time the last heartbeat was recorded. + RecordedTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=recorded_time,json=recordedTime,proto3" json:"recorded_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityHeartbeatState) Reset() { + *x = ActivityHeartbeatState{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityHeartbeatState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityHeartbeatState) ProtoMessage() {} + +func (x *ActivityHeartbeatState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityHeartbeatState.ProtoReflect.Descriptor instead. +func (*ActivityHeartbeatState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{4} +} + +func (x *ActivityHeartbeatState) GetDetails() *v1.Payloads { + if x != nil { + return x.Details + } + return nil +} + +func (x *ActivityHeartbeatState) GetRecordedTime() *timestamppb.Timestamp { + if x != nil { + return x.RecordedTime + } + return nil +} + +type ActivityRequestData struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Serialized activity input, passed as arguments to the activity function. + Input *v1.Payloads `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + Header *v1.Header `protobuf:"bytes,2,opt,name=header,proto3" json:"header,omitempty"` + // Metadata for use by user interfaces to display the fixed as-of-start summary and details of the activity. + UserMetadata *v13.UserMetadata `protobuf:"bytes,3,opt,name=user_metadata,json=userMetadata,proto3" json:"user_metadata,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityRequestData) Reset() { + *x = ActivityRequestData{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityRequestData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityRequestData) ProtoMessage() {} + +func (x *ActivityRequestData) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityRequestData.ProtoReflect.Descriptor instead. +func (*ActivityRequestData) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{5} +} + +func (x *ActivityRequestData) GetInput() *v1.Payloads { + if x != nil { + return x.Input + } + return nil +} + +func (x *ActivityRequestData) GetHeader() *v1.Header { + if x != nil { + return x.Header + } + return nil +} + +func (x *ActivityRequestData) GetUserMetadata() *v13.UserMetadata { + if x != nil { + return x.UserMetadata + } + return nil +} + +type ActivityOutcome struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *ActivityOutcome_Successful_ + // *ActivityOutcome_Failed_ + Variant isActivityOutcome_Variant `protobuf_oneof:"variant"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityOutcome) Reset() { + *x = ActivityOutcome{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityOutcome) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityOutcome) ProtoMessage() {} + +func (x *ActivityOutcome) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityOutcome.ProtoReflect.Descriptor instead. +func (*ActivityOutcome) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{6} +} + +func (x *ActivityOutcome) GetVariant() isActivityOutcome_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *ActivityOutcome) GetSuccessful() *ActivityOutcome_Successful { + if x != nil { + if x, ok := x.Variant.(*ActivityOutcome_Successful_); ok { + return x.Successful + } + } + return nil +} + +func (x *ActivityOutcome) GetFailed() *ActivityOutcome_Failed { + if x != nil { + if x, ok := x.Variant.(*ActivityOutcome_Failed_); ok { + return x.Failed + } + } + return nil +} + +type isActivityOutcome_Variant interface { + isActivityOutcome_Variant() +} + +type ActivityOutcome_Successful_ struct { + Successful *ActivityOutcome_Successful `protobuf:"bytes,1,opt,name=successful,proto3,oneof"` +} + +type ActivityOutcome_Failed_ struct { + Failed *ActivityOutcome_Failed `protobuf:"bytes,2,opt,name=failed,proto3,oneof"` +} + +func (*ActivityOutcome_Successful_) isActivityOutcome_Variant() {} + +func (*ActivityOutcome_Failed_) isActivityOutcome_Variant() {} + +type ActivityAttemptState_LastFailureDetails struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The last time the activity attempt failed. + Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"` + // Failure details from the last failed attempt. + Failure *v14.Failure `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityAttemptState_LastFailureDetails) Reset() { + *x = ActivityAttemptState_LastFailureDetails{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityAttemptState_LastFailureDetails) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityAttemptState_LastFailureDetails) ProtoMessage() {} + +func (x *ActivityAttemptState_LastFailureDetails) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityAttemptState_LastFailureDetails.ProtoReflect.Descriptor instead. +func (*ActivityAttemptState_LastFailureDetails) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{3, 0} +} + +func (x *ActivityAttemptState_LastFailureDetails) GetTime() *timestamppb.Timestamp { + if x != nil { + return x.Time + } + return nil +} + +func (x *ActivityAttemptState_LastFailureDetails) GetFailure() *v14.Failure { + if x != nil { + return x.Failure + } + return nil +} + +type ActivityOutcome_Successful struct { + state protoimpl.MessageState `protogen:"open.v1"` + Output *v1.Payloads `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityOutcome_Successful) Reset() { + *x = ActivityOutcome_Successful{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityOutcome_Successful) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityOutcome_Successful) ProtoMessage() {} + +func (x *ActivityOutcome_Successful) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityOutcome_Successful.ProtoReflect.Descriptor instead. +func (*ActivityOutcome_Successful) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{6, 0} +} + +func (x *ActivityOutcome_Successful) GetOutput() *v1.Payloads { + if x != nil { + return x.Output + } + return nil +} + +type ActivityOutcome_Failed struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Only filled on schedule-to-start timeouts, schedule-to-close timeouts or terminations. All other attempt + // failures will be recorded in ActivityAttemptState.last_failure_details. + Failure *v14.Failure `protobuf:"bytes,1,opt,name=failure,proto3" json:"failure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityOutcome_Failed) Reset() { + *x = ActivityOutcome_Failed{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityOutcome_Failed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityOutcome_Failed) ProtoMessage() {} + +func (x *ActivityOutcome_Failed) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityOutcome_Failed.ProtoReflect.Descriptor instead. +func (*ActivityOutcome_Failed) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP(), []int{6, 1} +} + +func (x *ActivityOutcome_Failed) GetFailure() *v14.Failure { + if x != nil { + return x.Failure + } + return nil +} + +var File_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc = "" + + "\n" + + "@temporal/server/chasm/lib/activity/proto/v1/activity_state.proto\x12+temporal.server.chasm.lib.activity.proto.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a(temporal/api/deployment/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a'temporal/api/sdk/v1/user_metadata.proto\x1a'temporal/api/taskqueue/v1/message.proto\"\xdb\a\n" + + "\rActivityState\x12I\n" + + "\ractivity_type\x18\x01 \x01(\v2$.temporal.api.common.v1.ActivityTypeR\factivityType\x12C\n" + + "\n" + + "task_queue\x18\x02 \x01(\v2$.temporal.api.taskqueue.v1.TaskQueueR\ttaskQueue\x12T\n" + + "\x19schedule_to_close_timeout\x18\x03 \x01(\v2\x19.google.protobuf.DurationR\x16scheduleToCloseTimeout\x12T\n" + + "\x19schedule_to_start_timeout\x18\x04 \x01(\v2\x19.google.protobuf.DurationR\x16scheduleToStartTimeout\x12N\n" + + "\x16start_to_close_timeout\x18\x05 \x01(\v2\x19.google.protobuf.DurationR\x13startToCloseTimeout\x12F\n" + + "\x11heartbeat_timeout\x18\x06 \x01(\v2\x19.google.protobuf.DurationR\x10heartbeatTimeout\x12F\n" + + "\fretry_policy\x18\a \x01(\v2#.temporal.api.common.v1.RetryPolicyR\vretryPolicy\x12\\\n" + + "\x06status\x18\b \x01(\x0e2D.temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatusR\x06status\x12?\n" + + "\rschedule_time\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\fscheduleTime\x12<\n" + + "\bpriority\x18\n" + + " \x01(\v2 .temporal.api.common.v1.PriorityR\bpriority\x12c\n" + + "\fcancel_state\x18\v \x01(\v2@.temporal.server.chasm.lib.activity.proto.v1.ActivityCancelStateR\vcancelState\x12l\n" + + "\x0fterminate_state\x18\f \x01(\v2C.temporal.server.chasm.lib.activity.proto.v1.ActivityTerminateStateR\x0eterminateState\"\xa7\x01\n" + + "\x13ActivityCancelState\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\tR\trequestId\x12=\n" + + "\frequest_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\vrequestTime\x12\x1a\n" + + "\bidentity\x18\x03 \x01(\tR\bidentity\x12\x16\n" + + "\x06reason\x18\x04 \x01(\tR\x06reason\"7\n" + + "\x16ActivityTerminateState\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\tR\trequestId\"\xe8\x05\n" + + "\x14ActivityAttemptState\x12\x14\n" + + "\x05count\x18\x01 \x01(\x05R\x05count\x12O\n" + + "\x16current_retry_interval\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x14currentRetryInterval\x12=\n" + + "\fstarted_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\vstartedTime\x12?\n" + + "\rcomplete_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\fcompleteTime\x12\x86\x01\n" + + "\x14last_failure_details\x18\x05 \x01(\v2T.temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetailsR\x12lastFailureDetails\x12\x14\n" + + "\x05stamp\x18\x06 \x01(\x05R\x05stamp\x120\n" + + "\x14last_worker_identity\x18\a \x01(\tR\x12lastWorkerIdentity\x12k\n" + + "\x17last_deployment_version\x18\b \x01(\v23.temporal.api.deployment.v1.WorkerDeploymentVersionR\x15lastDeploymentVersion\x12(\n" + + "\x10start_request_id\x18\t \x01(\tR\x0estartRequestId\x1a\x80\x01\n" + + "\x12LastFailureDetails\x12.\n" + + "\x04time\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x04time\x12:\n" + + "\afailure\x18\x02 \x01(\v2 .temporal.api.failure.v1.FailureR\afailure\"\x95\x01\n" + + "\x16ActivityHeartbeatState\x12:\n" + + "\adetails\x18\x01 \x01(\v2 .temporal.api.common.v1.PayloadsR\adetails\x12?\n" + + "\rrecorded_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\frecordedTime\"\xcd\x01\n" + + "\x13ActivityRequestData\x126\n" + + "\x05input\x18\x01 \x01(\v2 .temporal.api.common.v1.PayloadsR\x05input\x126\n" + + "\x06header\x18\x02 \x01(\v2\x1e.temporal.api.common.v1.HeaderR\x06header\x12F\n" + + "\ruser_metadata\x18\x03 \x01(\v2!.temporal.api.sdk.v1.UserMetadataR\fuserMetadata\"\xf4\x02\n" + + "\x0fActivityOutcome\x12i\n" + + "\n" + + "successful\x18\x01 \x01(\v2G.temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.SuccessfulH\x00R\n" + + "successful\x12]\n" + + "\x06failed\x18\x02 \x01(\v2C.temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.FailedH\x00R\x06failed\x1aF\n" + + "\n" + + "Successful\x128\n" + + "\x06output\x18\x01 \x01(\v2 .temporal.api.common.v1.PayloadsR\x06output\x1aD\n" + + "\x06Failed\x12:\n" + + "\afailure\x18\x01 \x01(\v2 .temporal.api.failure.v1.FailureR\afailureB\t\n" + + "\avariant*\x8e\x03\n" + + "\x17ActivityExecutionStatus\x12)\n" + + "%ACTIVITY_EXECUTION_STATUS_UNSPECIFIED\x10\x00\x12'\n" + + "#ACTIVITY_EXECUTION_STATUS_SCHEDULED\x10\x01\x12%\n" + + "!ACTIVITY_EXECUTION_STATUS_STARTED\x10\x02\x12.\n" + + "*ACTIVITY_EXECUTION_STATUS_CANCEL_REQUESTED\x10\x03\x12'\n" + + "#ACTIVITY_EXECUTION_STATUS_COMPLETED\x10\x04\x12$\n" + + " ACTIVITY_EXECUTION_STATUS_FAILED\x10\x05\x12&\n" + + "\"ACTIVITY_EXECUTION_STATUS_CANCELED\x10\x06\x12(\n" + + "$ACTIVITY_EXECUTION_STATUS_TERMINATED\x10\a\x12'\n" + + "#ACTIVITY_EXECUTION_STATUS_TIMED_OUT\x10\bBDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDescData +} + +var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_goTypes = []any{ + (ActivityExecutionStatus)(0), // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatus + (*ActivityState)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.ActivityState + (*ActivityCancelState)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.ActivityCancelState + (*ActivityTerminateState)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.ActivityTerminateState + (*ActivityAttemptState)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState + (*ActivityHeartbeatState)(nil), // 5: temporal.server.chasm.lib.activity.proto.v1.ActivityHeartbeatState + (*ActivityRequestData)(nil), // 6: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData + (*ActivityOutcome)(nil), // 7: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome + (*ActivityAttemptState_LastFailureDetails)(nil), // 8: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails + (*ActivityOutcome_Successful)(nil), // 9: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Successful + (*ActivityOutcome_Failed)(nil), // 10: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Failed + (*v1.ActivityType)(nil), // 11: temporal.api.common.v1.ActivityType + (*v11.TaskQueue)(nil), // 12: temporal.api.taskqueue.v1.TaskQueue + (*durationpb.Duration)(nil), // 13: google.protobuf.Duration + (*v1.RetryPolicy)(nil), // 14: temporal.api.common.v1.RetryPolicy + (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp + (*v1.Priority)(nil), // 16: temporal.api.common.v1.Priority + (*v12.WorkerDeploymentVersion)(nil), // 17: temporal.api.deployment.v1.WorkerDeploymentVersion + (*v1.Payloads)(nil), // 18: temporal.api.common.v1.Payloads + (*v1.Header)(nil), // 19: temporal.api.common.v1.Header + (*v13.UserMetadata)(nil), // 20: temporal.api.sdk.v1.UserMetadata + (*v14.Failure)(nil), // 21: temporal.api.failure.v1.Failure +} +var file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_depIdxs = []int32{ + 11, // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityState.activity_type:type_name -> temporal.api.common.v1.ActivityType + 12, // 1: temporal.server.chasm.lib.activity.proto.v1.ActivityState.task_queue:type_name -> temporal.api.taskqueue.v1.TaskQueue + 13, // 2: temporal.server.chasm.lib.activity.proto.v1.ActivityState.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 13, // 3: temporal.server.chasm.lib.activity.proto.v1.ActivityState.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 13, // 4: temporal.server.chasm.lib.activity.proto.v1.ActivityState.start_to_close_timeout:type_name -> google.protobuf.Duration + 13, // 5: temporal.server.chasm.lib.activity.proto.v1.ActivityState.heartbeat_timeout:type_name -> google.protobuf.Duration + 14, // 6: temporal.server.chasm.lib.activity.proto.v1.ActivityState.retry_policy:type_name -> temporal.api.common.v1.RetryPolicy + 0, // 7: temporal.server.chasm.lib.activity.proto.v1.ActivityState.status:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityExecutionStatus + 15, // 8: temporal.server.chasm.lib.activity.proto.v1.ActivityState.schedule_time:type_name -> google.protobuf.Timestamp + 16, // 9: temporal.server.chasm.lib.activity.proto.v1.ActivityState.priority:type_name -> temporal.api.common.v1.Priority + 2, // 10: temporal.server.chasm.lib.activity.proto.v1.ActivityState.cancel_state:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityCancelState + 3, // 11: temporal.server.chasm.lib.activity.proto.v1.ActivityState.terminate_state:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityTerminateState + 15, // 12: temporal.server.chasm.lib.activity.proto.v1.ActivityCancelState.request_time:type_name -> google.protobuf.Timestamp + 13, // 13: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.current_retry_interval:type_name -> google.protobuf.Duration + 15, // 14: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.started_time:type_name -> google.protobuf.Timestamp + 15, // 15: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.complete_time:type_name -> google.protobuf.Timestamp + 8, // 16: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.last_failure_details:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails + 17, // 17: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion + 18, // 18: temporal.server.chasm.lib.activity.proto.v1.ActivityHeartbeatState.details:type_name -> temporal.api.common.v1.Payloads + 15, // 19: temporal.server.chasm.lib.activity.proto.v1.ActivityHeartbeatState.recorded_time:type_name -> google.protobuf.Timestamp + 18, // 20: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData.input:type_name -> temporal.api.common.v1.Payloads + 19, // 21: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData.header:type_name -> temporal.api.common.v1.Header + 20, // 22: temporal.server.chasm.lib.activity.proto.v1.ActivityRequestData.user_metadata:type_name -> temporal.api.sdk.v1.UserMetadata + 9, // 23: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.successful:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Successful + 10, // 24: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.failed:type_name -> temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Failed + 15, // 25: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails.time:type_name -> google.protobuf.Timestamp + 21, // 26: temporal.server.chasm.lib.activity.proto.v1.ActivityAttemptState.LastFailureDetails.failure:type_name -> temporal.api.failure.v1.Failure + 18, // 27: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Successful.output:type_name -> temporal.api.common.v1.Payloads + 21, // 28: temporal.server.chasm.lib.activity.proto.v1.ActivityOutcome.Failed.failure:type_name -> temporal.api.failure.v1.Failure + 29, // [29:29] is the sub-list for method output_type + 29, // [29:29] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_init() } +func file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_init() { + if File_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto != nil { + return + } + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes[6].OneofWrappers = []any{ + (*ActivityOutcome_Successful_)(nil), + (*ActivityOutcome_Failed_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_rawDesc)), + NumEnums: 1, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_depIdxs, + EnumInfos: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_enumTypes, + MessageInfos: file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto = out.File + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_goTypes = nil + file_temporal_server_chasm_lib_activity_proto_v1_activity_state_proto_depIdxs = nil +} diff --git a/chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go b/chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go new file mode 100644 index 0000000000..517287dc3e --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/request_response.go-helpers.pb.go @@ -0,0 +1,450 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package activitypb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type StartActivityExecutionRequest to the protobuf v3 wire format +func (val *StartActivityExecutionRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type StartActivityExecutionRequest from the protobuf v3 wire format +func (val *StartActivityExecutionRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *StartActivityExecutionRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two StartActivityExecutionRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *StartActivityExecutionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *StartActivityExecutionRequest + switch t := that.(type) { + case *StartActivityExecutionRequest: + that1 = t + case StartActivityExecutionRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type StartActivityExecutionResponse to the protobuf v3 wire format +func (val *StartActivityExecutionResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type StartActivityExecutionResponse from the protobuf v3 wire format +func (val *StartActivityExecutionResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *StartActivityExecutionResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two StartActivityExecutionResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *StartActivityExecutionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *StartActivityExecutionResponse + switch t := that.(type) { + case *StartActivityExecutionResponse: + that1 = t + case StartActivityExecutionResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type DescribeActivityExecutionRequest to the protobuf v3 wire format +func (val *DescribeActivityExecutionRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type DescribeActivityExecutionRequest from the protobuf v3 wire format +func (val *DescribeActivityExecutionRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *DescribeActivityExecutionRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two DescribeActivityExecutionRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *DescribeActivityExecutionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *DescribeActivityExecutionRequest + switch t := that.(type) { + case *DescribeActivityExecutionRequest: + that1 = t + case DescribeActivityExecutionRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type DescribeActivityExecutionResponse to the protobuf v3 wire format +func (val *DescribeActivityExecutionResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type DescribeActivityExecutionResponse from the protobuf v3 wire format +func (val *DescribeActivityExecutionResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *DescribeActivityExecutionResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two DescribeActivityExecutionResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *DescribeActivityExecutionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *DescribeActivityExecutionResponse + switch t := that.(type) { + case *DescribeActivityExecutionResponse: + that1 = t + case DescribeActivityExecutionResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type PollActivityExecutionRequest to the protobuf v3 wire format +func (val *PollActivityExecutionRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type PollActivityExecutionRequest from the protobuf v3 wire format +func (val *PollActivityExecutionRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *PollActivityExecutionRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two PollActivityExecutionRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *PollActivityExecutionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *PollActivityExecutionRequest + switch t := that.(type) { + case *PollActivityExecutionRequest: + that1 = t + case PollActivityExecutionRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type PollActivityExecutionResponse to the protobuf v3 wire format +func (val *PollActivityExecutionResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type PollActivityExecutionResponse from the protobuf v3 wire format +func (val *PollActivityExecutionResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *PollActivityExecutionResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two PollActivityExecutionResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *PollActivityExecutionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *PollActivityExecutionResponse + switch t := that.(type) { + case *PollActivityExecutionResponse: + that1 = t + case PollActivityExecutionResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type TerminateActivityExecutionRequest to the protobuf v3 wire format +func (val *TerminateActivityExecutionRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TerminateActivityExecutionRequest from the protobuf v3 wire format +func (val *TerminateActivityExecutionRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TerminateActivityExecutionRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TerminateActivityExecutionRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TerminateActivityExecutionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TerminateActivityExecutionRequest + switch t := that.(type) { + case *TerminateActivityExecutionRequest: + that1 = t + case TerminateActivityExecutionRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type TerminateActivityExecutionResponse to the protobuf v3 wire format +func (val *TerminateActivityExecutionResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TerminateActivityExecutionResponse from the protobuf v3 wire format +func (val *TerminateActivityExecutionResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TerminateActivityExecutionResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TerminateActivityExecutionResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TerminateActivityExecutionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TerminateActivityExecutionResponse + switch t := that.(type) { + case *TerminateActivityExecutionResponse: + that1 = t + case TerminateActivityExecutionResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type RequestCancelActivityExecutionRequest to the protobuf v3 wire format +func (val *RequestCancelActivityExecutionRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type RequestCancelActivityExecutionRequest from the protobuf v3 wire format +func (val *RequestCancelActivityExecutionRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *RequestCancelActivityExecutionRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two RequestCancelActivityExecutionRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *RequestCancelActivityExecutionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *RequestCancelActivityExecutionRequest + switch t := that.(type) { + case *RequestCancelActivityExecutionRequest: + that1 = t + case RequestCancelActivityExecutionRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type RequestCancelActivityExecutionResponse to the protobuf v3 wire format +func (val *RequestCancelActivityExecutionResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type RequestCancelActivityExecutionResponse from the protobuf v3 wire format +func (val *RequestCancelActivityExecutionResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *RequestCancelActivityExecutionResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two RequestCancelActivityExecutionResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *RequestCancelActivityExecutionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *RequestCancelActivityExecutionResponse + switch t := that.(type) { + case *RequestCancelActivityExecutionResponse: + that1 = t + case RequestCancelActivityExecutionResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type DeleteActivityExecutionRequest to the protobuf v3 wire format +func (val *DeleteActivityExecutionRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type DeleteActivityExecutionRequest from the protobuf v3 wire format +func (val *DeleteActivityExecutionRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *DeleteActivityExecutionRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two DeleteActivityExecutionRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *DeleteActivityExecutionRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *DeleteActivityExecutionRequest + switch t := that.(type) { + case *DeleteActivityExecutionRequest: + that1 = t + case DeleteActivityExecutionRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type DeleteActivityExecutionResponse to the protobuf v3 wire format +func (val *DeleteActivityExecutionResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type DeleteActivityExecutionResponse from the protobuf v3 wire format +func (val *DeleteActivityExecutionResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *DeleteActivityExecutionResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two DeleteActivityExecutionResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *DeleteActivityExecutionResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *DeleteActivityExecutionResponse + switch t := that.(type) { + case *DeleteActivityExecutionResponse: + that1 = t + case DeleteActivityExecutionResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/activity/gen/activitypb/v1/request_response.pb.go b/chasm/lib/activity/gen/activitypb/v1/request_response.pb.go new file mode 100644 index 0000000000..0407199486 --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/request_response.pb.go @@ -0,0 +1,686 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/activity/proto/v1/request_response.proto + +package activitypb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + v1 "go.temporal.io/api/workflowservice/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type StartActivityExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + FrontendRequest *v1.StartActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartActivityExecutionRequest) Reset() { + *x = StartActivityExecutionRequest{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartActivityExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartActivityExecutionRequest) ProtoMessage() {} + +func (x *StartActivityExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartActivityExecutionRequest.ProtoReflect.Descriptor instead. +func (*StartActivityExecutionRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{0} +} + +func (x *StartActivityExecutionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *StartActivityExecutionRequest) GetFrontendRequest() *v1.StartActivityExecutionRequest { + if x != nil { + return x.FrontendRequest + } + return nil +} + +type StartActivityExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + FrontendResponse *v1.StartActivityExecutionResponse `protobuf:"bytes,1,opt,name=frontend_response,json=frontendResponse,proto3" json:"frontend_response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartActivityExecutionResponse) Reset() { + *x = StartActivityExecutionResponse{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartActivityExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartActivityExecutionResponse) ProtoMessage() {} + +func (x *StartActivityExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartActivityExecutionResponse.ProtoReflect.Descriptor instead. +func (*StartActivityExecutionResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{1} +} + +func (x *StartActivityExecutionResponse) GetFrontendResponse() *v1.StartActivityExecutionResponse { + if x != nil { + return x.FrontendResponse + } + return nil +} + +type DescribeActivityExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + FrontendRequest *v1.DescribeActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeActivityExecutionRequest) Reset() { + *x = DescribeActivityExecutionRequest{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeActivityExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeActivityExecutionRequest) ProtoMessage() {} + +func (x *DescribeActivityExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeActivityExecutionRequest.ProtoReflect.Descriptor instead. +func (*DescribeActivityExecutionRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{2} +} + +func (x *DescribeActivityExecutionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *DescribeActivityExecutionRequest) GetFrontendRequest() *v1.DescribeActivityExecutionRequest { + if x != nil { + return x.FrontendRequest + } + return nil +} + +type DescribeActivityExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + FrontendResponse *v1.DescribeActivityExecutionResponse `protobuf:"bytes,1,opt,name=frontend_response,json=frontendResponse,proto3" json:"frontend_response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DescribeActivityExecutionResponse) Reset() { + *x = DescribeActivityExecutionResponse{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DescribeActivityExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DescribeActivityExecutionResponse) ProtoMessage() {} + +func (x *DescribeActivityExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DescribeActivityExecutionResponse.ProtoReflect.Descriptor instead. +func (*DescribeActivityExecutionResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{3} +} + +func (x *DescribeActivityExecutionResponse) GetFrontendResponse() *v1.DescribeActivityExecutionResponse { + if x != nil { + return x.FrontendResponse + } + return nil +} + +type PollActivityExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + FrontendRequest *v1.PollActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PollActivityExecutionRequest) Reset() { + *x = PollActivityExecutionRequest{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PollActivityExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PollActivityExecutionRequest) ProtoMessage() {} + +func (x *PollActivityExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PollActivityExecutionRequest.ProtoReflect.Descriptor instead. +func (*PollActivityExecutionRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{4} +} + +func (x *PollActivityExecutionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *PollActivityExecutionRequest) GetFrontendRequest() *v1.PollActivityExecutionRequest { + if x != nil { + return x.FrontendRequest + } + return nil +} + +type PollActivityExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + FrontendResponse *v1.PollActivityExecutionResponse `protobuf:"bytes,1,opt,name=frontend_response,json=frontendResponse,proto3" json:"frontend_response,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PollActivityExecutionResponse) Reset() { + *x = PollActivityExecutionResponse{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PollActivityExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PollActivityExecutionResponse) ProtoMessage() {} + +func (x *PollActivityExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PollActivityExecutionResponse.ProtoReflect.Descriptor instead. +func (*PollActivityExecutionResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{5} +} + +func (x *PollActivityExecutionResponse) GetFrontendResponse() *v1.PollActivityExecutionResponse { + if x != nil { + return x.FrontendResponse + } + return nil +} + +type TerminateActivityExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + FrontendRequest *v1.TerminateActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TerminateActivityExecutionRequest) Reset() { + *x = TerminateActivityExecutionRequest{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TerminateActivityExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateActivityExecutionRequest) ProtoMessage() {} + +func (x *TerminateActivityExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateActivityExecutionRequest.ProtoReflect.Descriptor instead. +func (*TerminateActivityExecutionRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{6} +} + +func (x *TerminateActivityExecutionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *TerminateActivityExecutionRequest) GetFrontendRequest() *v1.TerminateActivityExecutionRequest { + if x != nil { + return x.FrontendRequest + } + return nil +} + +type TerminateActivityExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TerminateActivityExecutionResponse) Reset() { + *x = TerminateActivityExecutionResponse{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TerminateActivityExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TerminateActivityExecutionResponse) ProtoMessage() {} + +func (x *TerminateActivityExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TerminateActivityExecutionResponse.ProtoReflect.Descriptor instead. +func (*TerminateActivityExecutionResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{7} +} + +type RequestCancelActivityExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + FrontendRequest *v1.RequestCancelActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestCancelActivityExecutionRequest) Reset() { + *x = RequestCancelActivityExecutionRequest{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestCancelActivityExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestCancelActivityExecutionRequest) ProtoMessage() {} + +func (x *RequestCancelActivityExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestCancelActivityExecutionRequest.ProtoReflect.Descriptor instead. +func (*RequestCancelActivityExecutionRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{8} +} + +func (x *RequestCancelActivityExecutionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *RequestCancelActivityExecutionRequest) GetFrontendRequest() *v1.RequestCancelActivityExecutionRequest { + if x != nil { + return x.FrontendRequest + } + return nil +} + +type RequestCancelActivityExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RequestCancelActivityExecutionResponse) Reset() { + *x = RequestCancelActivityExecutionResponse{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RequestCancelActivityExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RequestCancelActivityExecutionResponse) ProtoMessage() {} + +func (x *RequestCancelActivityExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RequestCancelActivityExecutionResponse.ProtoReflect.Descriptor instead. +func (*RequestCancelActivityExecutionResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{9} +} + +type DeleteActivityExecutionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + FrontendRequest *v1.DeleteActivityExecutionRequest `protobuf:"bytes,2,opt,name=frontend_request,json=frontendRequest,proto3" json:"frontend_request,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteActivityExecutionRequest) Reset() { + *x = DeleteActivityExecutionRequest{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteActivityExecutionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteActivityExecutionRequest) ProtoMessage() {} + +func (x *DeleteActivityExecutionRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteActivityExecutionRequest.ProtoReflect.Descriptor instead. +func (*DeleteActivityExecutionRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteActivityExecutionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *DeleteActivityExecutionRequest) GetFrontendRequest() *v1.DeleteActivityExecutionRequest { + if x != nil { + return x.FrontendRequest + } + return nil +} + +type DeleteActivityExecutionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteActivityExecutionResponse) Reset() { + *x = DeleteActivityExecutionResponse{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteActivityExecutionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteActivityExecutionResponse) ProtoMessage() {} + +func (x *DeleteActivityExecutionResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteActivityExecutionResponse.ProtoReflect.Descriptor instead. +func (*DeleteActivityExecutionResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP(), []int{11} +} + +var File_temporal_server_chasm_lib_activity_proto_v1_request_response_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc = "" + + "\n" + + "Btemporal/server/chasm/lib/activity/proto/v1/request_response.proto\x12+temporal.server.chasm.lib.activity.proto.v1\x1a6temporal/api/workflowservice/v1/request_response.proto\"\xad\x01\n" + + "\x1dStartActivityExecutionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12i\n" + + "\x10frontend_request\x18\x02 \x01(\v2>.temporal.api.workflowservice.v1.StartActivityExecutionRequestR\x0ffrontendRequest\"\x8e\x01\n" + + "\x1eStartActivityExecutionResponse\x12l\n" + + "\x11frontend_response\x18\x01 \x01(\v2?.temporal.api.workflowservice.v1.StartActivityExecutionResponseR\x10frontendResponse\"\xb3\x01\n" + + " DescribeActivityExecutionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12l\n" + + "\x10frontend_request\x18\x02 \x01(\v2A.temporal.api.workflowservice.v1.DescribeActivityExecutionRequestR\x0ffrontendRequest\"\x94\x01\n" + + "!DescribeActivityExecutionResponse\x12o\n" + + "\x11frontend_response\x18\x01 \x01(\v2B.temporal.api.workflowservice.v1.DescribeActivityExecutionResponseR\x10frontendResponse\"\xab\x01\n" + + "\x1cPollActivityExecutionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12h\n" + + "\x10frontend_request\x18\x02 \x01(\v2=.temporal.api.workflowservice.v1.PollActivityExecutionRequestR\x0ffrontendRequest\"\x8c\x01\n" + + "\x1dPollActivityExecutionResponse\x12k\n" + + "\x11frontend_response\x18\x01 \x01(\v2>.temporal.api.workflowservice.v1.PollActivityExecutionResponseR\x10frontendResponse\"\xb5\x01\n" + + "!TerminateActivityExecutionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12m\n" + + "\x10frontend_request\x18\x02 \x01(\v2B.temporal.api.workflowservice.v1.TerminateActivityExecutionRequestR\x0ffrontendRequest\"$\n" + + "\"TerminateActivityExecutionResponse\"\xbd\x01\n" + + "%RequestCancelActivityExecutionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12q\n" + + "\x10frontend_request\x18\x02 \x01(\v2F.temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequestR\x0ffrontendRequest\"(\n" + + "&RequestCancelActivityExecutionResponse\"\xaf\x01\n" + + "\x1eDeleteActivityExecutionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12j\n" + + "\x10frontend_request\x18\x02 \x01(\v2?.temporal.api.workflowservice.v1.DeleteActivityExecutionRequestR\x0ffrontendRequest\"!\n" + + "\x1fDeleteActivityExecutionResponseBDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDescData +} + +var file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_goTypes = []any{ + (*StartActivityExecutionRequest)(nil), // 0: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest + (*StartActivityExecutionResponse)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse + (*DescribeActivityExecutionRequest)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest + (*DescribeActivityExecutionResponse)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse + (*PollActivityExecutionRequest)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest + (*PollActivityExecutionResponse)(nil), // 5: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse + (*TerminateActivityExecutionRequest)(nil), // 6: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest + (*TerminateActivityExecutionResponse)(nil), // 7: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse + (*RequestCancelActivityExecutionRequest)(nil), // 8: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest + (*RequestCancelActivityExecutionResponse)(nil), // 9: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse + (*DeleteActivityExecutionRequest)(nil), // 10: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest + (*DeleteActivityExecutionResponse)(nil), // 11: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse + (*v1.StartActivityExecutionRequest)(nil), // 12: temporal.api.workflowservice.v1.StartActivityExecutionRequest + (*v1.StartActivityExecutionResponse)(nil), // 13: temporal.api.workflowservice.v1.StartActivityExecutionResponse + (*v1.DescribeActivityExecutionRequest)(nil), // 14: temporal.api.workflowservice.v1.DescribeActivityExecutionRequest + (*v1.DescribeActivityExecutionResponse)(nil), // 15: temporal.api.workflowservice.v1.DescribeActivityExecutionResponse + (*v1.PollActivityExecutionRequest)(nil), // 16: temporal.api.workflowservice.v1.PollActivityExecutionRequest + (*v1.PollActivityExecutionResponse)(nil), // 17: temporal.api.workflowservice.v1.PollActivityExecutionResponse + (*v1.TerminateActivityExecutionRequest)(nil), // 18: temporal.api.workflowservice.v1.TerminateActivityExecutionRequest + (*v1.RequestCancelActivityExecutionRequest)(nil), // 19: temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest + (*v1.DeleteActivityExecutionRequest)(nil), // 20: temporal.api.workflowservice.v1.DeleteActivityExecutionRequest +} +var file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_depIdxs = []int32{ + 12, // 0: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.StartActivityExecutionRequest + 13, // 1: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse.frontend_response:type_name -> temporal.api.workflowservice.v1.StartActivityExecutionResponse + 14, // 2: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.DescribeActivityExecutionRequest + 15, // 3: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse.frontend_response:type_name -> temporal.api.workflowservice.v1.DescribeActivityExecutionResponse + 16, // 4: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.PollActivityExecutionRequest + 17, // 5: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse.frontend_response:type_name -> temporal.api.workflowservice.v1.PollActivityExecutionResponse + 18, // 6: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.TerminateActivityExecutionRequest + 19, // 7: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.RequestCancelActivityExecutionRequest + 20, // 8: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest.frontend_request:type_name -> temporal.api.workflowservice.v1.DeleteActivityExecutionRequest + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_init() } +func file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_init() { + if File_temporal_server_chasm_lib_activity_proto_v1_request_response_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_activity_proto_v1_request_response_proto = out.File + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_goTypes = nil + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_depIdxs = nil +} diff --git a/chasm/lib/activity/gen/activitypb/v1/service.pb.go b/chasm/lib/activity/gen/activitypb/v1/service.pb.go new file mode 100644 index 0000000000..06e80b0010 --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/service.pb.go @@ -0,0 +1,96 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/activity/proto/v1/service.proto + +package activitypb + +import ( + reflect "reflect" + unsafe "unsafe" + + _ "go.temporal.io/server/api/common/v1" + _ "go.temporal.io/server/api/routing/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_temporal_server_chasm_lib_activity_proto_v1_service_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_activity_proto_v1_service_proto_rawDesc = "" + + "\n" + + "9temporal/server/chasm/lib/activity/proto/v1/service.proto\x12+temporal.server.chasm.lib.activity.proto.v1\x1aBtemporal/server/chasm/lib/activity/proto/v1/request_response.proto\x1a.temporal/server/api/routing/v1/extension.proto\x1a0temporal/server/api/common/v1/api_category.proto2\xf2\n" + + "\n" + + "\x0fActivityService\x12\xdb\x01\n" + + "\x16StartActivityExecution\x12J.temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest\x1aK.temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xe4\x01\n" + + "\x19DescribeActivityExecution\x12M.temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest\x1aN.temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xd8\x01\n" + + "\x15PollActivityExecution\x12I.temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest\x1aJ.temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x02\x12\xe7\x01\n" + + "\x1aTerminateActivityExecution\x12N.temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest\x1aO.temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xf3\x01\n" + + "\x1eRequestCancelActivityExecution\x12R.temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest\x1aS.temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01\x12\xde\x01\n" + + "\x17DeleteActivityExecution\x12K.temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest\x1aL.temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse\"(\x92\xc4\x03\x1e\x1a\x1cfrontend_request.activity_id\x8a\xb5\x18\x02\b\x01BDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" + +var file_temporal_server_chasm_lib_activity_proto_v1_service_proto_goTypes = []any{ + (*StartActivityExecutionRequest)(nil), // 0: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest + (*DescribeActivityExecutionRequest)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest + (*PollActivityExecutionRequest)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest + (*TerminateActivityExecutionRequest)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest + (*RequestCancelActivityExecutionRequest)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest + (*DeleteActivityExecutionRequest)(nil), // 5: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest + (*StartActivityExecutionResponse)(nil), // 6: temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse + (*DescribeActivityExecutionResponse)(nil), // 7: temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse + (*PollActivityExecutionResponse)(nil), // 8: temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse + (*TerminateActivityExecutionResponse)(nil), // 9: temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse + (*RequestCancelActivityExecutionResponse)(nil), // 10: temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse + (*DeleteActivityExecutionResponse)(nil), // 11: temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse +} +var file_temporal_server_chasm_lib_activity_proto_v1_service_proto_depIdxs = []int32{ + 0, // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityService.StartActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionRequest + 1, // 1: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DescribeActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionRequest + 2, // 2: temporal.server.chasm.lib.activity.proto.v1.ActivityService.PollActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionRequest + 3, // 3: temporal.server.chasm.lib.activity.proto.v1.ActivityService.TerminateActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionRequest + 4, // 4: temporal.server.chasm.lib.activity.proto.v1.ActivityService.RequestCancelActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionRequest + 5, // 5: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DeleteActivityExecution:input_type -> temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionRequest + 6, // 6: temporal.server.chasm.lib.activity.proto.v1.ActivityService.StartActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.StartActivityExecutionResponse + 7, // 7: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DescribeActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.DescribeActivityExecutionResponse + 8, // 8: temporal.server.chasm.lib.activity.proto.v1.ActivityService.PollActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.PollActivityExecutionResponse + 9, // 9: temporal.server.chasm.lib.activity.proto.v1.ActivityService.TerminateActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.TerminateActivityExecutionResponse + 10, // 10: temporal.server.chasm.lib.activity.proto.v1.ActivityService.RequestCancelActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.RequestCancelActivityExecutionResponse + 11, // 11: temporal.server.chasm.lib.activity.proto.v1.ActivityService.DeleteActivityExecution:output_type -> temporal.server.chasm.lib.activity.proto.v1.DeleteActivityExecutionResponse + 6, // [6:12] is the sub-list for method output_type + 0, // [0:6] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_activity_proto_v1_service_proto_init() } +func file_temporal_server_chasm_lib_activity_proto_v1_service_proto_init() { + if File_temporal_server_chasm_lib_activity_proto_v1_service_proto != nil { + return + } + file_temporal_server_chasm_lib_activity_proto_v1_request_response_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_service_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_service_proto_rawDesc)), + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_service_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_service_proto_depIdxs, + }.Build() + File_temporal_server_chasm_lib_activity_proto_v1_service_proto = out.File + file_temporal_server_chasm_lib_activity_proto_v1_service_proto_goTypes = nil + file_temporal_server_chasm_lib_activity_proto_v1_service_proto_depIdxs = nil +} diff --git a/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go b/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go new file mode 100644 index 0000000000..b1d80f018f --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/service_client.pb.go @@ -0,0 +1,318 @@ +// Code generated by protoc-gen-go-chasm. DO NOT EDIT. +package activitypb + +import ( + "context" + "time" + + "go.temporal.io/server/client/history" + "go.temporal.io/server/common" + "go.temporal.io/server/common/backoff" + "go.temporal.io/server/common/config" + "go.temporal.io/server/common/dynamicconfig" + "go.temporal.io/server/common/headers" + "go.temporal.io/server/common/log" + "go.temporal.io/server/common/membership" + "go.temporal.io/server/common/metrics" + "go.temporal.io/server/common/primitives" + "google.golang.org/grpc" +) + +// ActivityServiceLayeredClient is a client for ActivityService. +type ActivityServiceLayeredClient struct { + metricsHandler metrics.Handler + numShards int32 + redirector history.Redirector[ActivityServiceClient] + retryPolicy backoff.RetryPolicy +} + +// NewActivityServiceLayeredClient initializes a new ActivityServiceLayeredClient. +func NewActivityServiceLayeredClient( + dc *dynamicconfig.Collection, + rpcFactory common.RPCFactory, + monitor membership.Monitor, + config *config.Persistence, + logger log.Logger, + metricsHandler metrics.Handler, +) (ActivityServiceClient, error) { + resolver, err := monitor.GetResolver(primitives.HistoryService) + if err != nil { + return nil, err + } + connections := history.NewConnectionPool(resolver, rpcFactory, NewActivityServiceClient) + var redirector history.Redirector[ActivityServiceClient] + if dynamicconfig.HistoryClientOwnershipCachingEnabled.Get(dc)() { + redirector = history.NewCachingRedirector( + connections, + resolver, + logger, + dynamicconfig.HistoryClientOwnershipCachingStaleTTL.Get(dc), + ) + } else { + redirector = history.NewBasicRedirector(connections, resolver) + } + return &ActivityServiceLayeredClient{ + metricsHandler: metricsHandler, + redirector: redirector, + numShards: config.NumHistoryShards, + retryPolicy: common.CreateHistoryClientRetryPolicy(), + }, nil +} +func (c *ActivityServiceLayeredClient) callStartActivityExecutionNoRetry( + ctx context.Context, + request *StartActivityExecutionRequest, + opts ...grpc.CallOption, +) (*StartActivityExecutionResponse, error) { + var response *StartActivityExecutionResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("ActivityService.StartActivityExecution"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) + op := func(ctx context.Context, client ActivityServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.StartActivityExecution(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *ActivityServiceLayeredClient) StartActivityExecution( + ctx context.Context, + request *StartActivityExecutionRequest, + opts ...grpc.CallOption, +) (*StartActivityExecutionResponse, error) { + call := func(ctx context.Context) (*StartActivityExecutionResponse, error) { + return c.callStartActivityExecutionNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} +func (c *ActivityServiceLayeredClient) callDescribeActivityExecutionNoRetry( + ctx context.Context, + request *DescribeActivityExecutionRequest, + opts ...grpc.CallOption, +) (*DescribeActivityExecutionResponse, error) { + var response *DescribeActivityExecutionResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("ActivityService.DescribeActivityExecution"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) + op := func(ctx context.Context, client ActivityServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.DescribeActivityExecution(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *ActivityServiceLayeredClient) DescribeActivityExecution( + ctx context.Context, + request *DescribeActivityExecutionRequest, + opts ...grpc.CallOption, +) (*DescribeActivityExecutionResponse, error) { + call := func(ctx context.Context) (*DescribeActivityExecutionResponse, error) { + return c.callDescribeActivityExecutionNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} +func (c *ActivityServiceLayeredClient) callPollActivityExecutionNoRetry( + ctx context.Context, + request *PollActivityExecutionRequest, + opts ...grpc.CallOption, +) (*PollActivityExecutionResponse, error) { + var response *PollActivityExecutionResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("ActivityService.PollActivityExecution"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) + op := func(ctx context.Context, client ActivityServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.PollActivityExecution(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *ActivityServiceLayeredClient) PollActivityExecution( + ctx context.Context, + request *PollActivityExecutionRequest, + opts ...grpc.CallOption, +) (*PollActivityExecutionResponse, error) { + call := func(ctx context.Context) (*PollActivityExecutionResponse, error) { + return c.callPollActivityExecutionNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} +func (c *ActivityServiceLayeredClient) callTerminateActivityExecutionNoRetry( + ctx context.Context, + request *TerminateActivityExecutionRequest, + opts ...grpc.CallOption, +) (*TerminateActivityExecutionResponse, error) { + var response *TerminateActivityExecutionResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("ActivityService.TerminateActivityExecution"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) + op := func(ctx context.Context, client ActivityServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.TerminateActivityExecution(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *ActivityServiceLayeredClient) TerminateActivityExecution( + ctx context.Context, + request *TerminateActivityExecutionRequest, + opts ...grpc.CallOption, +) (*TerminateActivityExecutionResponse, error) { + call := func(ctx context.Context) (*TerminateActivityExecutionResponse, error) { + return c.callTerminateActivityExecutionNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} +func (c *ActivityServiceLayeredClient) callRequestCancelActivityExecutionNoRetry( + ctx context.Context, + request *RequestCancelActivityExecutionRequest, + opts ...grpc.CallOption, +) (*RequestCancelActivityExecutionResponse, error) { + var response *RequestCancelActivityExecutionResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("ActivityService.RequestCancelActivityExecution"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) + op := func(ctx context.Context, client ActivityServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.RequestCancelActivityExecution(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *ActivityServiceLayeredClient) RequestCancelActivityExecution( + ctx context.Context, + request *RequestCancelActivityExecutionRequest, + opts ...grpc.CallOption, +) (*RequestCancelActivityExecutionResponse, error) { + call := func(ctx context.Context) (*RequestCancelActivityExecutionResponse, error) { + return c.callRequestCancelActivityExecutionNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} +func (c *ActivityServiceLayeredClient) callDeleteActivityExecutionNoRetry( + ctx context.Context, + request *DeleteActivityExecutionRequest, + opts ...grpc.CallOption, +) (*DeleteActivityExecutionResponse, error) { + var response *DeleteActivityExecutionResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("ActivityService.DeleteActivityExecution"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := common.WorkflowIDToHistoryShard(request.GetNamespaceId(), request.GetFrontendRequest().GetActivityId(), c.numShards) + op := func(ctx context.Context, client ActivityServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.DeleteActivityExecution(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *ActivityServiceLayeredClient) DeleteActivityExecution( + ctx context.Context, + request *DeleteActivityExecutionRequest, + opts ...grpc.CallOption, +) (*DeleteActivityExecutionResponse, error) { + call := func(ctx context.Context) (*DeleteActivityExecutionResponse, error) { + return c.callDeleteActivityExecutionNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} diff --git a/chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go b/chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go new file mode 100644 index 0000000000..f02184fbd4 --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/service_grpc.pb.go @@ -0,0 +1,295 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// plugins: +// - protoc-gen-go-grpc +// - protoc +// source: temporal/server/chasm/lib/activity/proto/v1/service.proto + +package activitypb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ActivityService_StartActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/StartActivityExecution" + ActivityService_DescribeActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/DescribeActivityExecution" + ActivityService_PollActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/PollActivityExecution" + ActivityService_TerminateActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/TerminateActivityExecution" + ActivityService_RequestCancelActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/RequestCancelActivityExecution" + ActivityService_DeleteActivityExecution_FullMethodName = "/temporal.server.chasm.lib.activity.proto.v1.ActivityService/DeleteActivityExecution" +) + +// ActivityServiceClient is the client API for ActivityService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ActivityServiceClient interface { + StartActivityExecution(ctx context.Context, in *StartActivityExecutionRequest, opts ...grpc.CallOption) (*StartActivityExecutionResponse, error) + DescribeActivityExecution(ctx context.Context, in *DescribeActivityExecutionRequest, opts ...grpc.CallOption) (*DescribeActivityExecutionResponse, error) + PollActivityExecution(ctx context.Context, in *PollActivityExecutionRequest, opts ...grpc.CallOption) (*PollActivityExecutionResponse, error) + TerminateActivityExecution(ctx context.Context, in *TerminateActivityExecutionRequest, opts ...grpc.CallOption) (*TerminateActivityExecutionResponse, error) + RequestCancelActivityExecution(ctx context.Context, in *RequestCancelActivityExecutionRequest, opts ...grpc.CallOption) (*RequestCancelActivityExecutionResponse, error) + DeleteActivityExecution(ctx context.Context, in *DeleteActivityExecutionRequest, opts ...grpc.CallOption) (*DeleteActivityExecutionResponse, error) +} + +type activityServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewActivityServiceClient(cc grpc.ClientConnInterface) ActivityServiceClient { + return &activityServiceClient{cc} +} + +func (c *activityServiceClient) StartActivityExecution(ctx context.Context, in *StartActivityExecutionRequest, opts ...grpc.CallOption) (*StartActivityExecutionResponse, error) { + out := new(StartActivityExecutionResponse) + err := c.cc.Invoke(ctx, ActivityService_StartActivityExecution_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *activityServiceClient) DescribeActivityExecution(ctx context.Context, in *DescribeActivityExecutionRequest, opts ...grpc.CallOption) (*DescribeActivityExecutionResponse, error) { + out := new(DescribeActivityExecutionResponse) + err := c.cc.Invoke(ctx, ActivityService_DescribeActivityExecution_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *activityServiceClient) PollActivityExecution(ctx context.Context, in *PollActivityExecutionRequest, opts ...grpc.CallOption) (*PollActivityExecutionResponse, error) { + out := new(PollActivityExecutionResponse) + err := c.cc.Invoke(ctx, ActivityService_PollActivityExecution_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *activityServiceClient) TerminateActivityExecution(ctx context.Context, in *TerminateActivityExecutionRequest, opts ...grpc.CallOption) (*TerminateActivityExecutionResponse, error) { + out := new(TerminateActivityExecutionResponse) + err := c.cc.Invoke(ctx, ActivityService_TerminateActivityExecution_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *activityServiceClient) RequestCancelActivityExecution(ctx context.Context, in *RequestCancelActivityExecutionRequest, opts ...grpc.CallOption) (*RequestCancelActivityExecutionResponse, error) { + out := new(RequestCancelActivityExecutionResponse) + err := c.cc.Invoke(ctx, ActivityService_RequestCancelActivityExecution_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *activityServiceClient) DeleteActivityExecution(ctx context.Context, in *DeleteActivityExecutionRequest, opts ...grpc.CallOption) (*DeleteActivityExecutionResponse, error) { + out := new(DeleteActivityExecutionResponse) + err := c.cc.Invoke(ctx, ActivityService_DeleteActivityExecution_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ActivityServiceServer is the server API for ActivityService service. +// All implementations must embed UnimplementedActivityServiceServer +// for forward compatibility +type ActivityServiceServer interface { + StartActivityExecution(context.Context, *StartActivityExecutionRequest) (*StartActivityExecutionResponse, error) + DescribeActivityExecution(context.Context, *DescribeActivityExecutionRequest) (*DescribeActivityExecutionResponse, error) + PollActivityExecution(context.Context, *PollActivityExecutionRequest) (*PollActivityExecutionResponse, error) + TerminateActivityExecution(context.Context, *TerminateActivityExecutionRequest) (*TerminateActivityExecutionResponse, error) + RequestCancelActivityExecution(context.Context, *RequestCancelActivityExecutionRequest) (*RequestCancelActivityExecutionResponse, error) + DeleteActivityExecution(context.Context, *DeleteActivityExecutionRequest) (*DeleteActivityExecutionResponse, error) + mustEmbedUnimplementedActivityServiceServer() +} + +// UnimplementedActivityServiceServer must be embedded to have forward compatible implementations. +type UnimplementedActivityServiceServer struct { +} + +func (UnimplementedActivityServiceServer) StartActivityExecution(context.Context, *StartActivityExecutionRequest) (*StartActivityExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StartActivityExecution not implemented") +} +func (UnimplementedActivityServiceServer) DescribeActivityExecution(context.Context, *DescribeActivityExecutionRequest) (*DescribeActivityExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DescribeActivityExecution not implemented") +} +func (UnimplementedActivityServiceServer) PollActivityExecution(context.Context, *PollActivityExecutionRequest) (*PollActivityExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PollActivityExecution not implemented") +} +func (UnimplementedActivityServiceServer) TerminateActivityExecution(context.Context, *TerminateActivityExecutionRequest) (*TerminateActivityExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TerminateActivityExecution not implemented") +} +func (UnimplementedActivityServiceServer) RequestCancelActivityExecution(context.Context, *RequestCancelActivityExecutionRequest) (*RequestCancelActivityExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RequestCancelActivityExecution not implemented") +} +func (UnimplementedActivityServiceServer) DeleteActivityExecution(context.Context, *DeleteActivityExecutionRequest) (*DeleteActivityExecutionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteActivityExecution not implemented") +} +func (UnimplementedActivityServiceServer) mustEmbedUnimplementedActivityServiceServer() {} + +// UnsafeActivityServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ActivityServiceServer will +// result in compilation errors. +type UnsafeActivityServiceServer interface { + mustEmbedUnimplementedActivityServiceServer() +} + +func RegisterActivityServiceServer(s grpc.ServiceRegistrar, srv ActivityServiceServer) { + s.RegisterService(&ActivityService_ServiceDesc, srv) +} + +func _ActivityService_StartActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StartActivityExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityServiceServer).StartActivityExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityService_StartActivityExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityServiceServer).StartActivityExecution(ctx, req.(*StartActivityExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActivityService_DescribeActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DescribeActivityExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityServiceServer).DescribeActivityExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityService_DescribeActivityExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityServiceServer).DescribeActivityExecution(ctx, req.(*DescribeActivityExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActivityService_PollActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PollActivityExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityServiceServer).PollActivityExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityService_PollActivityExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityServiceServer).PollActivityExecution(ctx, req.(*PollActivityExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActivityService_TerminateActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TerminateActivityExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityServiceServer).TerminateActivityExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityService_TerminateActivityExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityServiceServer).TerminateActivityExecution(ctx, req.(*TerminateActivityExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActivityService_RequestCancelActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RequestCancelActivityExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityServiceServer).RequestCancelActivityExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityService_RequestCancelActivityExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityServiceServer).RequestCancelActivityExecution(ctx, req.(*RequestCancelActivityExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ActivityService_DeleteActivityExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteActivityExecutionRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ActivityServiceServer).DeleteActivityExecution(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ActivityService_DeleteActivityExecution_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ActivityServiceServer).DeleteActivityExecution(ctx, req.(*DeleteActivityExecutionRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ActivityService_ServiceDesc is the grpc.ServiceDesc for ActivityService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ActivityService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "temporal.server.chasm.lib.activity.proto.v1.ActivityService", + HandlerType: (*ActivityServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "StartActivityExecution", + Handler: _ActivityService_StartActivityExecution_Handler, + }, + { + MethodName: "DescribeActivityExecution", + Handler: _ActivityService_DescribeActivityExecution_Handler, + }, + { + MethodName: "PollActivityExecution", + Handler: _ActivityService_PollActivityExecution_Handler, + }, + { + MethodName: "TerminateActivityExecution", + Handler: _ActivityService_TerminateActivityExecution_Handler, + }, + { + MethodName: "RequestCancelActivityExecution", + Handler: _ActivityService_RequestCancelActivityExecution_Handler, + }, + { + MethodName: "DeleteActivityExecution", + Handler: _ActivityService_DeleteActivityExecution_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "temporal/server/chasm/lib/activity/proto/v1/service.proto", +} diff --git a/chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go b/chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go new file mode 100644 index 0000000000..d7628a6e9e --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/tasks.go-helpers.pb.go @@ -0,0 +1,191 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package activitypb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type ActivityDispatchTask to the protobuf v3 wire format +func (val *ActivityDispatchTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityDispatchTask from the protobuf v3 wire format +func (val *ActivityDispatchTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityDispatchTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityDispatchTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ActivityDispatchTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityDispatchTask + switch t := that.(type) { + case *ActivityDispatchTask: + that1 = t + case ActivityDispatchTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ScheduleToStartTimeoutTask to the protobuf v3 wire format +func (val *ScheduleToStartTimeoutTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ScheduleToStartTimeoutTask from the protobuf v3 wire format +func (val *ScheduleToStartTimeoutTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ScheduleToStartTimeoutTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ScheduleToStartTimeoutTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ScheduleToStartTimeoutTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ScheduleToStartTimeoutTask + switch t := that.(type) { + case *ScheduleToStartTimeoutTask: + that1 = t + case ScheduleToStartTimeoutTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type ScheduleToCloseTimeoutTask to the protobuf v3 wire format +func (val *ScheduleToCloseTimeoutTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ScheduleToCloseTimeoutTask from the protobuf v3 wire format +func (val *ScheduleToCloseTimeoutTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ScheduleToCloseTimeoutTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ScheduleToCloseTimeoutTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *ScheduleToCloseTimeoutTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ScheduleToCloseTimeoutTask + switch t := that.(type) { + case *ScheduleToCloseTimeoutTask: + that1 = t + case ScheduleToCloseTimeoutTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type StartToCloseTimeoutTask to the protobuf v3 wire format +func (val *StartToCloseTimeoutTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type StartToCloseTimeoutTask from the protobuf v3 wire format +func (val *StartToCloseTimeoutTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *StartToCloseTimeoutTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two StartToCloseTimeoutTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *StartToCloseTimeoutTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *StartToCloseTimeoutTask + switch t := that.(type) { + case *StartToCloseTimeoutTask: + that1 = t + case StartToCloseTimeoutTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type HeartbeatTimeoutTask to the protobuf v3 wire format +func (val *HeartbeatTimeoutTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type HeartbeatTimeoutTask from the protobuf v3 wire format +func (val *HeartbeatTimeoutTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *HeartbeatTimeoutTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two HeartbeatTimeoutTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *HeartbeatTimeoutTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *HeartbeatTimeoutTask + switch t := that.(type) { + case *HeartbeatTimeoutTask: + that1 = t + case HeartbeatTimeoutTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/activity/gen/activitypb/v1/tasks.pb.go b/chasm/lib/activity/gen/activitypb/v1/tasks.pb.go new file mode 100644 index 0000000000..796574e7db --- /dev/null +++ b/chasm/lib/activity/gen/activitypb/v1/tasks.pb.go @@ -0,0 +1,307 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/activity/proto/v1/tasks.proto + +package activitypb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ActivityDispatchTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. + Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityDispatchTask) Reset() { + *x = ActivityDispatchTask{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityDispatchTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityDispatchTask) ProtoMessage() {} + +func (x *ActivityDispatchTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityDispatchTask.ProtoReflect.Descriptor instead. +func (*ActivityDispatchTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{0} +} + +func (x *ActivityDispatchTask) GetStamp() int32 { + if x != nil { + return x.Stamp + } + return 0 +} + +type ScheduleToStartTimeoutTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. + Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleToStartTimeoutTask) Reset() { + *x = ScheduleToStartTimeoutTask{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleToStartTimeoutTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleToStartTimeoutTask) ProtoMessage() {} + +func (x *ScheduleToStartTimeoutTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleToStartTimeoutTask.ProtoReflect.Descriptor instead. +func (*ScheduleToStartTimeoutTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{1} +} + +func (x *ScheduleToStartTimeoutTask) GetStamp() int32 { + if x != nil { + return x.Stamp + } + return 0 +} + +type ScheduleToCloseTimeoutTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ScheduleToCloseTimeoutTask) Reset() { + *x = ScheduleToCloseTimeoutTask{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ScheduleToCloseTimeoutTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ScheduleToCloseTimeoutTask) ProtoMessage() {} + +func (x *ScheduleToCloseTimeoutTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ScheduleToCloseTimeoutTask.ProtoReflect.Descriptor instead. +func (*ScheduleToCloseTimeoutTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{2} +} + +type StartToCloseTimeoutTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. + Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StartToCloseTimeoutTask) Reset() { + *x = StartToCloseTimeoutTask{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StartToCloseTimeoutTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StartToCloseTimeoutTask) ProtoMessage() {} + +func (x *StartToCloseTimeoutTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StartToCloseTimeoutTask.ProtoReflect.Descriptor instead. +func (*StartToCloseTimeoutTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{3} +} + +func (x *StartToCloseTimeoutTask) GetStamp() int32 { + if x != nil { + return x.Stamp + } + return 0 +} + +// HeartbeatTimeoutTask is a pure task that enforces heartbeat timeouts. +type HeartbeatTimeoutTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The current stamp for this activity execution. Used for task validation. See also [ActivityAttemptState]. + Stamp int32 `protobuf:"varint,1,opt,name=stamp,proto3" json:"stamp,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *HeartbeatTimeoutTask) Reset() { + *x = HeartbeatTimeoutTask{} + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *HeartbeatTimeoutTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*HeartbeatTimeoutTask) ProtoMessage() {} + +func (x *HeartbeatTimeoutTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use HeartbeatTimeoutTask.ProtoReflect.Descriptor instead. +func (*HeartbeatTimeoutTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP(), []int{4} +} + +func (x *HeartbeatTimeoutTask) GetStamp() int32 { + if x != nil { + return x.Stamp + } + return 0 +} + +var File_temporal_server_chasm_lib_activity_proto_v1_tasks_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc = "" + + "\n" + + "7temporal/server/chasm/lib/activity/proto/v1/tasks.proto\x12+temporal.server.chasm.lib.activity.proto.v1\",\n" + + "\x14ActivityDispatchTask\x12\x14\n" + + "\x05stamp\x18\x01 \x01(\x05R\x05stamp\"2\n" + + "\x1aScheduleToStartTimeoutTask\x12\x14\n" + + "\x05stamp\x18\x01 \x01(\x05R\x05stamp\"\x1c\n" + + "\x1aScheduleToCloseTimeoutTask\"/\n" + + "\x17StartToCloseTimeoutTask\x12\x14\n" + + "\x05stamp\x18\x01 \x01(\x05R\x05stamp\",\n" + + "\x14HeartbeatTimeoutTask\x12\x14\n" + + "\x05stamp\x18\x01 \x01(\x05R\x05stampBDZBgo.temporal.io/server/chasm/lib/activity/gen/activitypb;activitypbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDescData +} + +var file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_goTypes = []any{ + (*ActivityDispatchTask)(nil), // 0: temporal.server.chasm.lib.activity.proto.v1.ActivityDispatchTask + (*ScheduleToStartTimeoutTask)(nil), // 1: temporal.server.chasm.lib.activity.proto.v1.ScheduleToStartTimeoutTask + (*ScheduleToCloseTimeoutTask)(nil), // 2: temporal.server.chasm.lib.activity.proto.v1.ScheduleToCloseTimeoutTask + (*StartToCloseTimeoutTask)(nil), // 3: temporal.server.chasm.lib.activity.proto.v1.StartToCloseTimeoutTask + (*HeartbeatTimeoutTask)(nil), // 4: temporal.server.chasm.lib.activity.proto.v1.HeartbeatTimeoutTask +} +var file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_init() } +func file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_init() { + if File_temporal_server_chasm_lib_activity_proto_v1_tasks_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_activity_proto_v1_tasks_proto = out.File + file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_goTypes = nil + file_temporal_server_chasm_lib_activity_proto_v1_tasks_proto_depIdxs = nil +} diff --git a/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go b/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go new file mode 100644 index 0000000000..4e8000266a --- /dev/null +++ b/chasm/lib/callback/gen/callbackpb/v1/message.go-helpers.pb.go @@ -0,0 +1,104 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package callbackspb + +import ( + "fmt" + + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type CallbackState to the protobuf v3 wire format +func (val *CallbackState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type CallbackState from the protobuf v3 wire format +func (val *CallbackState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *CallbackState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two CallbackState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *CallbackState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *CallbackState + switch t := that.(type) { + case *CallbackState: + that1 = t + case CallbackState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type Callback to the protobuf v3 wire format +func (val *Callback) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type Callback from the protobuf v3 wire format +func (val *Callback) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *Callback) Size() int { + return proto.Size(val) +} + +// Equal returns whether two Callback values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *Callback) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *Callback + switch t := that.(type) { + case *Callback: + that1 = t + case Callback: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +var ( + CallbackStatus_shorthandValue = map[string]int32{ + "Unspecified": 0, + "Standby": 1, + "Scheduled": 2, + "BackingOff": 3, + "Failed": 4, + "Succeeded": 5, + } +) + +// CallbackStatusFromString parses a CallbackStatus value from either the protojson +// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to CallbackStatus +func CallbackStatusFromString(s string) (CallbackStatus, error) { + if v, ok := CallbackStatus_value[s]; ok { + return CallbackStatus(v), nil + } else if v, ok := CallbackStatus_shorthandValue[s]; ok { + return CallbackStatus(v), nil + } + return CallbackStatus(0), fmt.Errorf("%s is not a valid CallbackStatus", s) +} diff --git a/chasm/lib/callback/gen/callbackpb/v1/message.pb.go b/chasm/lib/callback/gen/callbackpb/v1/message.pb.go new file mode 100644 index 0000000000..d998ef3fc8 --- /dev/null +++ b/chasm/lib/callback/gen/callbackpb/v1/message.pb.go @@ -0,0 +1,490 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/callback/proto/v1/message.proto + +package callbackspb + +import ( + reflect "reflect" + "strconv" + sync "sync" + unsafe "unsafe" + + v11 "go.temporal.io/api/common/v1" + v1 "go.temporal.io/api/failure/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Status of a callback. +type CallbackStatus int32 + +const ( + // Default value, unspecified state. + CALLBACK_STATUS_UNSPECIFIED CallbackStatus = 0 + // Callback is standing by, waiting to be triggered. + CALLBACK_STATUS_STANDBY CallbackStatus = 1 + // Callback is in the queue waiting to be executed or is currently executing. + CALLBACK_STATUS_SCHEDULED CallbackStatus = 2 + // Callback has failed with a retryable error and is backing off before the next attempt. + CALLBACK_STATUS_BACKING_OFF CallbackStatus = 3 + // Callback has failed. + CALLBACK_STATUS_FAILED CallbackStatus = 4 + // Callback has succeeded. + CALLBACK_STATUS_SUCCEEDED CallbackStatus = 5 +) + +// Enum value maps for CallbackStatus. +var ( + CallbackStatus_name = map[int32]string{ + 0: "CALLBACK_STATUS_UNSPECIFIED", + 1: "CALLBACK_STATUS_STANDBY", + 2: "CALLBACK_STATUS_SCHEDULED", + 3: "CALLBACK_STATUS_BACKING_OFF", + 4: "CALLBACK_STATUS_FAILED", + 5: "CALLBACK_STATUS_SUCCEEDED", + } + CallbackStatus_value = map[string]int32{ + "CALLBACK_STATUS_UNSPECIFIED": 0, + "CALLBACK_STATUS_STANDBY": 1, + "CALLBACK_STATUS_SCHEDULED": 2, + "CALLBACK_STATUS_BACKING_OFF": 3, + "CALLBACK_STATUS_FAILED": 4, + "CALLBACK_STATUS_SUCCEEDED": 5, + } +) + +func (x CallbackStatus) Enum() *CallbackStatus { + p := new(CallbackStatus) + *p = x + return p +} + +func (x CallbackStatus) String() string { + switch x { + case CALLBACK_STATUS_UNSPECIFIED: + return "Unspecified" + case CALLBACK_STATUS_STANDBY: + return "Standby" + case CALLBACK_STATUS_SCHEDULED: + return "Scheduled" + case CALLBACK_STATUS_BACKING_OFF: + return "BackingOff" + case CALLBACK_STATUS_FAILED: + return "Failed" + case CALLBACK_STATUS_SUCCEEDED: + return "Succeeded" + default: + return strconv.Itoa(int(x)) + } + +} + +func (CallbackStatus) Descriptor() protoreflect.EnumDescriptor { + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes[0].Descriptor() +} + +func (CallbackStatus) Type() protoreflect.EnumType { + return &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes[0] +} + +func (x CallbackStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CallbackStatus.Descriptor instead. +func (CallbackStatus) EnumDescriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{0} +} + +type CallbackState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Information on how this callback should be invoked (e.g. its URL and type). + Callback *Callback `protobuf:"bytes,1,opt,name=callback,proto3" json:"callback,omitempty"` + // The time when the callback was registered. + RegistrationTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=registration_time,json=registrationTime,proto3" json:"registration_time,omitempty"` + Status CallbackStatus `protobuf:"varint,4,opt,name=status,proto3,enum=temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatus" json:"status,omitempty"` + // The number of attempts made to deliver the callback. + // This number represents a minimum bound since the attempt is incremented after the callback request completes. + Attempt int32 `protobuf:"varint,5,opt,name=attempt,proto3" json:"attempt,omitempty"` + // The time when the last attempt completed. + LastAttemptCompleteTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=last_attempt_complete_time,json=lastAttemptCompleteTime,proto3" json:"last_attempt_complete_time,omitempty"` + // The last attempt's failure, if any. + LastAttemptFailure *v1.Failure `protobuf:"bytes,7,opt,name=last_attempt_failure,json=lastAttemptFailure,proto3" json:"last_attempt_failure,omitempty"` + // The time when the next attempt is scheduled. + // NOTE (seankane): this field might go away in the future, discussion: + // https://github.com/temporalio/temporal/pull/8473#discussion_r2427348436 + NextAttemptScheduleTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=next_attempt_schedule_time,json=nextAttemptScheduleTime,proto3" json:"next_attempt_schedule_time,omitempty"` + // Request ID that added the callback. + RequestId string `protobuf:"bytes,9,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallbackState) Reset() { + *x = CallbackState{} + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallbackState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallbackState) ProtoMessage() {} + +func (x *CallbackState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallbackState.ProtoReflect.Descriptor instead. +func (*CallbackState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{0} +} + +func (x *CallbackState) GetCallback() *Callback { + if x != nil { + return x.Callback + } + return nil +} + +func (x *CallbackState) GetRegistrationTime() *timestamppb.Timestamp { + if x != nil { + return x.RegistrationTime + } + return nil +} + +func (x *CallbackState) GetStatus() CallbackStatus { + if x != nil { + return x.Status + } + return CALLBACK_STATUS_UNSPECIFIED +} + +func (x *CallbackState) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +func (x *CallbackState) GetLastAttemptCompleteTime() *timestamppb.Timestamp { + if x != nil { + return x.LastAttemptCompleteTime + } + return nil +} + +func (x *CallbackState) GetLastAttemptFailure() *v1.Failure { + if x != nil { + return x.LastAttemptFailure + } + return nil +} + +func (x *CallbackState) GetNextAttemptScheduleTime() *timestamppb.Timestamp { + if x != nil { + return x.NextAttemptScheduleTime + } + return nil +} + +func (x *CallbackState) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type Callback struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Variant: + // + // *Callback_Nexus_ + Variant isCallback_Variant `protobuf_oneof:"variant"` + Links []*v11.Link `protobuf:"bytes,100,rep,name=links,proto3" json:"links,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Callback) Reset() { + *x = Callback{} + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Callback) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Callback) ProtoMessage() {} + +func (x *Callback) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Callback.ProtoReflect.Descriptor instead. +func (*Callback) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{1} +} + +func (x *Callback) GetVariant() isCallback_Variant { + if x != nil { + return x.Variant + } + return nil +} + +func (x *Callback) GetNexus() *Callback_Nexus { + if x != nil { + if x, ok := x.Variant.(*Callback_Nexus_); ok { + return x.Nexus + } + } + return nil +} + +func (x *Callback) GetLinks() []*v11.Link { + if x != nil { + return x.Links + } + return nil +} + +type isCallback_Variant interface { + isCallback_Variant() +} + +type Callback_Nexus_ struct { + Nexus *Callback_Nexus `protobuf:"bytes,2,opt,name=nexus,proto3,oneof"` +} + +func (*Callback_Nexus_) isCallback_Variant() {} + +// Trigger for when the workflow is closed. +type CallbackState_WorkflowClosed struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallbackState_WorkflowClosed) Reset() { + *x = CallbackState_WorkflowClosed{} + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallbackState_WorkflowClosed) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallbackState_WorkflowClosed) ProtoMessage() {} + +func (x *CallbackState_WorkflowClosed) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallbackState_WorkflowClosed.ProtoReflect.Descriptor instead. +func (*CallbackState_WorkflowClosed) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{0, 0} +} + +type Callback_Nexus struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Callback URL. + // (-- api-linter: core::0140::uri=disabled + // + // aip.dev/not-precedent: Not respecting aip here. --) + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + // Header to attach to callback request. + Header map[string]string `protobuf:"bytes,2,rep,name=header,proto3" json:"header,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Callback_Nexus) Reset() { + *x = Callback_Nexus{} + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Callback_Nexus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Callback_Nexus) ProtoMessage() {} + +func (x *Callback_Nexus) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Callback_Nexus.ProtoReflect.Descriptor instead. +func (*Callback_Nexus) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP(), []int{1, 0} +} + +func (x *Callback_Nexus) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Callback_Nexus) GetHeader() map[string]string { + if x != nil { + return x.Header + } + return nil +} + +var File_temporal_server_chasm_lib_callback_proto_v1_message_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc = "" + + "\n" + + "9temporal/server/chasm/lib/callback/proto/v1/message.proto\x12,temporal.server.chasm.lib.callbacks.proto.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\"\xd3\x04\n" + + "\rCallbackState\x12R\n" + + "\bcallback\x18\x01 \x01(\v26.temporal.server.chasm.lib.callbacks.proto.v1.CallbackR\bcallback\x12G\n" + + "\x11registration_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x10registrationTime\x12T\n" + + "\x06status\x18\x04 \x01(\x0e2<.temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatusR\x06status\x12\x18\n" + + "\aattempt\x18\x05 \x01(\x05R\aattempt\x12W\n" + + "\x1alast_attempt_complete_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x17lastAttemptCompleteTime\x12R\n" + + "\x14last_attempt_failure\x18\a \x01(\v2 .temporal.api.failure.v1.FailureR\x12lastAttemptFailure\x12W\n" + + "\x1anext_attempt_schedule_time\x18\b \x01(\v2\x1a.google.protobuf.TimestampR\x17nextAttemptScheduleTime\x12\x1d\n" + + "\n" + + "request_id\x18\t \x01(\tR\trequestId\x1a\x10\n" + + "\x0eWorkflowClosed\"\xde\x02\n" + + "\bCallback\x12T\n" + + "\x05nexus\x18\x02 \x01(\v2<.temporal.server.chasm.lib.callbacks.proto.v1.Callback.NexusH\x00R\x05nexus\x122\n" + + "\x05links\x18d \x03(\v2\x1c.temporal.api.common.v1.LinkR\x05links\x1a\xb6\x01\n" + + "\x05Nexus\x12\x10\n" + + "\x03url\x18\x01 \x01(\tR\x03url\x12`\n" + + "\x06header\x18\x02 \x03(\v2H.temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.HeaderEntryR\x06header\x1a9\n" + + "\vHeaderEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\t\n" + + "\avariantJ\x04\b\x01\x10\x02*\xc9\x01\n" + + "\x0eCallbackStatus\x12\x1f\n" + + "\x1bCALLBACK_STATUS_UNSPECIFIED\x10\x00\x12\x1b\n" + + "\x17CALLBACK_STATUS_STANDBY\x10\x01\x12\x1d\n" + + "\x19CALLBACK_STATUS_SCHEDULED\x10\x02\x12\x1f\n" + + "\x1bCALLBACK_STATUS_BACKING_OFF\x10\x03\x12\x1a\n" + + "\x16CALLBACK_STATUS_FAILED\x10\x04\x12\x1d\n" + + "\x19CALLBACK_STATUS_SUCCEEDED\x10\x05BGZEgo.temporal.io/server/chasm/lib/callbacks/gen/callbackspb;callbackspbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDescData +} + +var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_goTypes = []any{ + (CallbackStatus)(0), // 0: temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatus + (*CallbackState)(nil), // 1: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState + (*Callback)(nil), // 2: temporal.server.chasm.lib.callbacks.proto.v1.Callback + (*CallbackState_WorkflowClosed)(nil), // 3: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.WorkflowClosed + (*Callback_Nexus)(nil), // 4: temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus + nil, // 5: temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.HeaderEntry + (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp + (*v1.Failure)(nil), // 7: temporal.api.failure.v1.Failure + (*v11.Link)(nil), // 8: temporal.api.common.v1.Link +} +var file_temporal_server_chasm_lib_callback_proto_v1_message_proto_depIdxs = []int32{ + 2, // 0: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.callback:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.Callback + 6, // 1: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.registration_time:type_name -> google.protobuf.Timestamp + 0, // 2: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.status:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.CallbackStatus + 6, // 3: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 7, // 4: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 6, // 5: temporal.server.chasm.lib.callbacks.proto.v1.CallbackState.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 4, // 6: temporal.server.chasm.lib.callbacks.proto.v1.Callback.nexus:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus + 8, // 7: temporal.server.chasm.lib.callbacks.proto.v1.Callback.links:type_name -> temporal.api.common.v1.Link + 5, // 8: temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.header:type_name -> temporal.server.chasm.lib.callbacks.proto.v1.Callback.Nexus.HeaderEntry + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_callback_proto_v1_message_proto_init() } +func file_temporal_server_chasm_lib_callback_proto_v1_message_proto_init() { + if File_temporal_server_chasm_lib_callback_proto_v1_message_proto != nil { + return + } + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes[1].OneofWrappers = []any{ + (*Callback_Nexus_)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_message_proto_rawDesc)), + NumEnums: 1, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_depIdxs, + EnumInfos: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_enumTypes, + MessageInfos: file_temporal_server_chasm_lib_callback_proto_v1_message_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_callback_proto_v1_message_proto = out.File + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_goTypes = nil + file_temporal_server_chasm_lib_callback_proto_v1_message_proto_depIdxs = nil +} diff --git a/chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go b/chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go new file mode 100644 index 0000000000..a0181447c6 --- /dev/null +++ b/chasm/lib/callback/gen/callbackpb/v1/tasks.go-helpers.pb.go @@ -0,0 +1,80 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package callbackspb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type InvocationTask to the protobuf v3 wire format +func (val *InvocationTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvocationTask from the protobuf v3 wire format +func (val *InvocationTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvocationTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvocationTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvocationTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvocationTask + switch t := that.(type) { + case *InvocationTask: + that1 = t + case InvocationTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type BackoffTask to the protobuf v3 wire format +func (val *BackoffTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type BackoffTask from the protobuf v3 wire format +func (val *BackoffTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *BackoffTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two BackoffTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *BackoffTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *BackoffTask + switch t := that.(type) { + case *BackoffTask: + that1 = t + case BackoffTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go b/chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go new file mode 100644 index 0000000000..7354a359c8 --- /dev/null +++ b/chasm/lib/callback/gen/callbackpb/v1/tasks.pb.go @@ -0,0 +1,172 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/callback/proto/v1/tasks.proto + +package callbackspb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InvocationTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The attempt number for this invocation. + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvocationTask) Reset() { + *x = InvocationTask{} + mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvocationTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvocationTask) ProtoMessage() {} + +func (x *InvocationTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvocationTask.ProtoReflect.Descriptor instead. +func (*InvocationTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescGZIP(), []int{0} +} + +func (x *InvocationTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +type BackoffTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The attempt number for this invocation. + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackoffTask) Reset() { + *x = BackoffTask{} + mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackoffTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackoffTask) ProtoMessage() {} + +func (x *BackoffTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackoffTask.ProtoReflect.Descriptor instead. +func (*BackoffTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescGZIP(), []int{1} +} + +func (x *BackoffTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +var File_temporal_server_chasm_lib_callback_proto_v1_tasks_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc = "" + + "\n" + + "7temporal/server/chasm/lib/callback/proto/v1/tasks.proto\x12,temporal.server.chasm.lib.callbacks.proto.v1\"*\n" + + "\x0eInvocationTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattempt\"'\n" + + "\vBackoffTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattemptBGZEgo.temporal.io/server/chasm/lib/callbacks/gen/callbackspb;callbackspbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDescData +} + +var file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_goTypes = []any{ + (*InvocationTask)(nil), // 0: temporal.server.chasm.lib.callbacks.proto.v1.InvocationTask + (*BackoffTask)(nil), // 1: temporal.server.chasm.lib.callbacks.proto.v1.BackoffTask +} +var file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_init() } +func file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_init() { + if File_temporal_server_chasm_lib_callback_proto_v1_tasks_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_callback_proto_v1_tasks_proto = out.File + file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_goTypes = nil + file_temporal_server_chasm_lib_callback_proto_v1_tasks_proto_depIdxs = nil +} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go new file mode 100644 index 0000000000..ea15136ec8 --- /dev/null +++ b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.go-helpers.pb.go @@ -0,0 +1,129 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package nexusoperationpb + +import ( + "fmt" + + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type OperationState to the protobuf v3 wire format +func (val *OperationState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type OperationState from the protobuf v3 wire format +func (val *OperationState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *OperationState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two OperationState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *OperationState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *OperationState + switch t := that.(type) { + case *OperationState: + that1 = t + case OperationState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type CancellationState to the protobuf v3 wire format +func (val *CancellationState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type CancellationState from the protobuf v3 wire format +func (val *CancellationState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *CancellationState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two CancellationState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *CancellationState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *CancellationState + switch t := that.(type) { + case *CancellationState: + that1 = t + case CancellationState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +var ( + OperationStatus_shorthandValue = map[string]int32{ + "Unspecified": 0, + "Scheduled": 1, + "BackingOff": 2, + "Started": 3, + "Succeeded": 4, + "Failed": 5, + "Canceled": 6, + "TimedOut": 7, + } +) + +// OperationStatusFromString parses a OperationStatus value from either the protojson +// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to OperationStatus +func OperationStatusFromString(s string) (OperationStatus, error) { + if v, ok := OperationStatus_value[s]; ok { + return OperationStatus(v), nil + } else if v, ok := OperationStatus_shorthandValue[s]; ok { + return OperationStatus(v), nil + } + return OperationStatus(0), fmt.Errorf("%s is not a valid OperationStatus", s) +} + +var ( + CancellationStatus_shorthandValue = map[string]int32{ + "Unspecified": 0, + "Scheduled": 1, + "BackingOff": 2, + "Succeeded": 3, + "Failed": 4, + "TimedOut": 5, + "Blocked": 6, + } +) + +// CancellationStatusFromString parses a CancellationStatus value from either the protojson +// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to CancellationStatus +func CancellationStatusFromString(s string) (CancellationStatus, error) { + if v, ok := CancellationStatus_value[s]; ok { + return CancellationStatus(v), nil + } else if v, ok := CancellationStatus_shorthandValue[s]; ok { + return CancellationStatus(v), nil + } + return CancellationStatus(0), fmt.Errorf("%s is not a valid CancellationStatus", s) +} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go new file mode 100644 index 0000000000..4b6f8fd371 --- /dev/null +++ b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/operation.pb.go @@ -0,0 +1,375 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/nexusoperation/proto/v1/operation.proto + +package nexusoperationpb + +import ( + reflect "reflect" + "strconv" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type OperationStatus int32 + +const ( + // Default value, unspecified status. + OPERATION_STATUS_UNSPECIFIED OperationStatus = 0 + // Operation is in the queue waiting to be executed or is currently executing. + OPERATION_STATUS_SCHEDULED OperationStatus = 1 + // Operation has failed with a retryable error and is backing off before the next attempt. + OPERATION_STATUS_BACKING_OFF OperationStatus = 2 + // Operation was started and will complete asynchronously. + OPERATION_STATUS_STARTED OperationStatus = 3 + // Operation succeeded. + // This may happen either as a response to a start request or as reported via callback. + OPERATION_STATUS_SUCCEEDED OperationStatus = 4 + // Operation failed either when a start request encounters a non-retryable error or as reported via callback. + OPERATION_STATUS_FAILED OperationStatus = 5 + // Operation completed as canceled (may have not ever been delivered). + // This may happen either as a response to a start request or as reported via callback. + OPERATION_STATUS_CANCELED OperationStatus = 6 + // Operation timed out - exceeded the user supplied schedule-to-close timeout. + // Any attempts to complete the operation in this status will be ignored. + OPERATION_STATUS_TIMED_OUT OperationStatus = 7 +) + +// Enum value maps for OperationStatus. +var ( + OperationStatus_name = map[int32]string{ + 0: "OPERATION_STATUS_UNSPECIFIED", + 1: "OPERATION_STATUS_SCHEDULED", + 2: "OPERATION_STATUS_BACKING_OFF", + 3: "OPERATION_STATUS_STARTED", + 4: "OPERATION_STATUS_SUCCEEDED", + 5: "OPERATION_STATUS_FAILED", + 6: "OPERATION_STATUS_CANCELED", + 7: "OPERATION_STATUS_TIMED_OUT", + } + OperationStatus_value = map[string]int32{ + "OPERATION_STATUS_UNSPECIFIED": 0, + "OPERATION_STATUS_SCHEDULED": 1, + "OPERATION_STATUS_BACKING_OFF": 2, + "OPERATION_STATUS_STARTED": 3, + "OPERATION_STATUS_SUCCEEDED": 4, + "OPERATION_STATUS_FAILED": 5, + "OPERATION_STATUS_CANCELED": 6, + "OPERATION_STATUS_TIMED_OUT": 7, + } +) + +func (x OperationStatus) Enum() *OperationStatus { + p := new(OperationStatus) + *p = x + return p +} + +func (x OperationStatus) String() string { + switch x { + case OPERATION_STATUS_UNSPECIFIED: + return "Unspecified" + case OPERATION_STATUS_SCHEDULED: + return "Scheduled" + case OPERATION_STATUS_BACKING_OFF: + return "BackingOff" + case OPERATION_STATUS_STARTED: + return "Started" + case OPERATION_STATUS_SUCCEEDED: + return "Succeeded" + case OPERATION_STATUS_FAILED: + return "Failed" + case OPERATION_STATUS_CANCELED: + return "Canceled" + case OPERATION_STATUS_TIMED_OUT: + return "TimedOut" + default: + return strconv.Itoa(int(x)) + } + +} + +func (OperationStatus) Descriptor() protoreflect.EnumDescriptor { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[0].Descriptor() +} + +func (OperationStatus) Type() protoreflect.EnumType { + return &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[0] +} + +func (x OperationStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use OperationStatus.Descriptor instead. +func (OperationStatus) EnumDescriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{0} +} + +type CancellationStatus int32 + +const ( + // Default value, unspecified status. + CANCELLATION_STATUS_UNSPECIFIED CancellationStatus = 0 + // Cancellation request is in the queue waiting to be executed or is currently executing. + CANCELLATION_STATUS_SCHEDULED CancellationStatus = 1 + // Cancellation request has failed with a retryable error and is backing off before the next attempt. + CANCELLATION_STATUS_BACKING_OFF CancellationStatus = 2 + // Cancellation request succeeded. + CANCELLATION_STATUS_SUCCEEDED CancellationStatus = 3 + // Cancellation request failed with a non-retryable error. + CANCELLATION_STATUS_FAILED CancellationStatus = 4 + // The associated operation timed out - exceeded the user supplied schedule-to-close timeout. + CANCELLATION_STATUS_TIMED_OUT CancellationStatus = 5 + // Cancellation request is blocked (eg: by circuit breaker). + CANCELLATION_STATUS_BLOCKED CancellationStatus = 6 +) + +// Enum value maps for CancellationStatus. +var ( + CancellationStatus_name = map[int32]string{ + 0: "CANCELLATION_STATUS_UNSPECIFIED", + 1: "CANCELLATION_STATUS_SCHEDULED", + 2: "CANCELLATION_STATUS_BACKING_OFF", + 3: "CANCELLATION_STATUS_SUCCEEDED", + 4: "CANCELLATION_STATUS_FAILED", + 5: "CANCELLATION_STATUS_TIMED_OUT", + 6: "CANCELLATION_STATUS_BLOCKED", + } + CancellationStatus_value = map[string]int32{ + "CANCELLATION_STATUS_UNSPECIFIED": 0, + "CANCELLATION_STATUS_SCHEDULED": 1, + "CANCELLATION_STATUS_BACKING_OFF": 2, + "CANCELLATION_STATUS_SUCCEEDED": 3, + "CANCELLATION_STATUS_FAILED": 4, + "CANCELLATION_STATUS_TIMED_OUT": 5, + "CANCELLATION_STATUS_BLOCKED": 6, + } +) + +func (x CancellationStatus) Enum() *CancellationStatus { + p := new(CancellationStatus) + *p = x + return p +} + +func (x CancellationStatus) String() string { + switch x { + case CANCELLATION_STATUS_UNSPECIFIED: + return "Unspecified" + case CANCELLATION_STATUS_SCHEDULED: + return "Scheduled" + case CANCELLATION_STATUS_BACKING_OFF: + return "BackingOff" + case CANCELLATION_STATUS_SUCCEEDED: + return "Succeeded" + case CANCELLATION_STATUS_FAILED: + return "Failed" + case CANCELLATION_STATUS_TIMED_OUT: + return "TimedOut" + case CANCELLATION_STATUS_BLOCKED: + return "Blocked" + default: + return strconv.Itoa(int(x)) + } + +} + +func (CancellationStatus) Descriptor() protoreflect.EnumDescriptor { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[1].Descriptor() +} + +func (CancellationStatus) Type() protoreflect.EnumType { + return &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes[1] +} + +func (x CancellationStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use CancellationStatus.Descriptor instead. +func (CancellationStatus) EnumDescriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{1} +} + +type OperationState struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status OperationStatus `protobuf:"varint,1,opt,name=status,proto3,enum=temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatus" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OperationState) Reset() { + *x = OperationState{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OperationState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OperationState) ProtoMessage() {} + +func (x *OperationState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OperationState.ProtoReflect.Descriptor instead. +func (*OperationState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{0} +} + +func (x *OperationState) GetStatus() OperationStatus { + if x != nil { + return x.Status + } + return OPERATION_STATUS_UNSPECIFIED +} + +type CancellationState struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status CancellationStatus `protobuf:"varint,1,opt,name=status,proto3,enum=temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatus" json:"status,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancellationState) Reset() { + *x = CancellationState{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancellationState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancellationState) ProtoMessage() {} + +func (x *CancellationState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancellationState.ProtoReflect.Descriptor instead. +func (*CancellationState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP(), []int{1} +} + +func (x *CancellationState) GetStatus() CancellationStatus { + if x != nil { + return x.Status + } + return CANCELLATION_STATUS_UNSPECIFIED +} + +var File_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc = "" + + "\n" + + "Atemporal/server/chasm/lib/nexusoperation/proto/v1/operation.proto\x121temporal.server.chasm.lib.nexusoperation.proto.v1\"l\n" + + "\x0eOperationState\x12Z\n" + + "\x06status\x18\x01 \x01(\x0e2B.temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatusR\x06status\"r\n" + + "\x11CancellationState\x12]\n" + + "\x06status\x18\x01 \x01(\x0e2E.temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatusR\x06status*\x8f\x02\n" + + "\x0fOperationStatus\x12 \n" + + "\x1cOPERATION_STATUS_UNSPECIFIED\x10\x00\x12\x1e\n" + + "\x1aOPERATION_STATUS_SCHEDULED\x10\x01\x12 \n" + + "\x1cOPERATION_STATUS_BACKING_OFF\x10\x02\x12\x1c\n" + + "\x18OPERATION_STATUS_STARTED\x10\x03\x12\x1e\n" + + "\x1aOPERATION_STATUS_SUCCEEDED\x10\x04\x12\x1b\n" + + "\x17OPERATION_STATUS_FAILED\x10\x05\x12\x1d\n" + + "\x19OPERATION_STATUS_CANCELED\x10\x06\x12\x1e\n" + + "\x1aOPERATION_STATUS_TIMED_OUT\x10\a*\x88\x02\n" + + "\x12CancellationStatus\x12#\n" + + "\x1fCANCELLATION_STATUS_UNSPECIFIED\x10\x00\x12!\n" + + "\x1dCANCELLATION_STATUS_SCHEDULED\x10\x01\x12#\n" + + "\x1fCANCELLATION_STATUS_BACKING_OFF\x10\x02\x12!\n" + + "\x1dCANCELLATION_STATUS_SUCCEEDED\x10\x03\x12\x1e\n" + + "\x1aCANCELLATION_STATUS_FAILED\x10\x04\x12!\n" + + "\x1dCANCELLATION_STATUS_TIMED_OUT\x10\x05\x12\x1f\n" + + "\x1bCANCELLATION_STATUS_BLOCKED\x10\x06BVZTgo.temporal.io/server/chasm/lib/nexusoperation/gen/nexusoperationpb;nexusoperationpbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDescData +} + +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_goTypes = []any{ + (OperationStatus)(0), // 0: temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatus + (CancellationStatus)(0), // 1: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatus + (*OperationState)(nil), // 2: temporal.server.chasm.lib.nexusoperation.proto.v1.OperationState + (*CancellationState)(nil), // 3: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationState +} +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_depIdxs = []int32{ + 0, // 0: temporal.server.chasm.lib.nexusoperation.proto.v1.OperationState.status:type_name -> temporal.server.chasm.lib.nexusoperation.proto.v1.OperationStatus + 1, // 1: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationState.status:type_name -> temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationStatus + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_init() } +func file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_init() { + if File_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_rawDesc)), + NumEnums: 2, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_depIdxs, + EnumInfos: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_enumTypes, + MessageInfos: file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto = out.File + file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_goTypes = nil + file_temporal_server_chasm_lib_nexusoperation_proto_v1_operation_proto_depIdxs = nil +} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go new file mode 100644 index 0000000000..7538ebde64 --- /dev/null +++ b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.go-helpers.pb.go @@ -0,0 +1,191 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package nexusoperationpb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type InvocationTask to the protobuf v3 wire format +func (val *InvocationTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvocationTask from the protobuf v3 wire format +func (val *InvocationTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvocationTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvocationTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvocationTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvocationTask + switch t := that.(type) { + case *InvocationTask: + that1 = t + case InvocationTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type InvocationTimeoutTask to the protobuf v3 wire format +func (val *InvocationTimeoutTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvocationTimeoutTask from the protobuf v3 wire format +func (val *InvocationTimeoutTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvocationTimeoutTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvocationTimeoutTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvocationTimeoutTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvocationTimeoutTask + switch t := that.(type) { + case *InvocationTimeoutTask: + that1 = t + case InvocationTimeoutTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type InvocationBackoffTask to the protobuf v3 wire format +func (val *InvocationBackoffTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvocationBackoffTask from the protobuf v3 wire format +func (val *InvocationBackoffTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvocationBackoffTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvocationBackoffTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvocationBackoffTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvocationBackoffTask + switch t := that.(type) { + case *InvocationBackoffTask: + that1 = t + case InvocationBackoffTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type CancellationTask to the protobuf v3 wire format +func (val *CancellationTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type CancellationTask from the protobuf v3 wire format +func (val *CancellationTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *CancellationTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two CancellationTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *CancellationTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *CancellationTask + switch t := that.(type) { + case *CancellationTask: + that1 = t + case CancellationTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type CancellationBackoffTask to the protobuf v3 wire format +func (val *CancellationBackoffTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type CancellationBackoffTask from the protobuf v3 wire format +func (val *CancellationBackoffTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *CancellationBackoffTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two CancellationBackoffTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *CancellationBackoffTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *CancellationBackoffTask + switch t := that.(type) { + case *CancellationBackoffTask: + that1 = t + case CancellationBackoffTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go new file mode 100644 index 0000000000..77b2d7b70d --- /dev/null +++ b/chasm/lib/nexusoperation/gen/nexusoperationpb/v1/tasks.pb.go @@ -0,0 +1,311 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/nexusoperation/proto/v1/tasks.proto + +package nexusoperationpb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type InvocationTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvocationTask) Reset() { + *x = InvocationTask{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvocationTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvocationTask) ProtoMessage() {} + +func (x *InvocationTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvocationTask.ProtoReflect.Descriptor instead. +func (*InvocationTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{0} +} + +func (x *InvocationTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +type InvocationTimeoutTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvocationTimeoutTask) Reset() { + *x = InvocationTimeoutTask{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvocationTimeoutTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvocationTimeoutTask) ProtoMessage() {} + +func (x *InvocationTimeoutTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvocationTimeoutTask.ProtoReflect.Descriptor instead. +func (*InvocationTimeoutTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{1} +} + +func (x *InvocationTimeoutTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +type InvocationBackoffTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvocationBackoffTask) Reset() { + *x = InvocationBackoffTask{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvocationBackoffTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvocationBackoffTask) ProtoMessage() {} + +func (x *InvocationBackoffTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvocationBackoffTask.ProtoReflect.Descriptor instead. +func (*InvocationBackoffTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{2} +} + +func (x *InvocationBackoffTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +type CancellationTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancellationTask) Reset() { + *x = CancellationTask{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancellationTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancellationTask) ProtoMessage() {} + +func (x *CancellationTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancellationTask.ProtoReflect.Descriptor instead. +func (*CancellationTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{3} +} + +func (x *CancellationTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +type CancellationBackoffTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CancellationBackoffTask) Reset() { + *x = CancellationBackoffTask{} + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CancellationBackoffTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CancellationBackoffTask) ProtoMessage() {} + +func (x *CancellationBackoffTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CancellationBackoffTask.ProtoReflect.Descriptor instead. +func (*CancellationBackoffTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP(), []int{4} +} + +func (x *CancellationBackoffTask) GetAttempt() int32 { + if x != nil { + return x.Attempt + } + return 0 +} + +var File_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc = "" + + "\n" + + "=temporal/server/chasm/lib/nexusoperation/proto/v1/tasks.proto\x121temporal.server.chasm.lib.nexusoperation.proto.v1\"*\n" + + "\x0eInvocationTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattempt\"1\n" + + "\x15InvocationTimeoutTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattempt\"1\n" + + "\x15InvocationBackoffTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattempt\",\n" + + "\x10CancellationTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattempt\"3\n" + + "\x17CancellationBackoffTask\x12\x18\n" + + "\aattempt\x18\x01 \x01(\x05R\aattemptBVZTgo.temporal.io/server/chasm/lib/nexusoperation/gen/nexusoperationpb;nexusoperationpbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDescData +} + +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_goTypes = []any{ + (*InvocationTask)(nil), // 0: temporal.server.chasm.lib.nexusoperation.proto.v1.InvocationTask + (*InvocationTimeoutTask)(nil), // 1: temporal.server.chasm.lib.nexusoperation.proto.v1.InvocationTimeoutTask + (*InvocationBackoffTask)(nil), // 2: temporal.server.chasm.lib.nexusoperation.proto.v1.InvocationBackoffTask + (*CancellationTask)(nil), // 3: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationTask + (*CancellationBackoffTask)(nil), // 4: temporal.server.chasm.lib.nexusoperation.proto.v1.CancellationBackoffTask +} +var file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_init() } +func file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_init() { + if File_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_rawDesc)), + NumEnums: 0, + NumMessages: 5, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto = out.File + file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_goTypes = nil + file_temporal_server_chasm_lib_nexusoperation_proto_v1_tasks_proto_depIdxs = nil +} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go new file mode 100644 index 0000000000..202513f298 --- /dev/null +++ b/chasm/lib/scheduler/gen/schedulerpb/v1/message.go-helpers.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package schedulerpb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type SchedulerState to the protobuf v3 wire format +func (val *SchedulerState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type SchedulerState from the protobuf v3 wire format +func (val *SchedulerState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *SchedulerState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two SchedulerState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *SchedulerState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *SchedulerState + switch t := that.(type) { + case *SchedulerState: + that1 = t + case SchedulerState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type WorkflowMigrationState to the protobuf v3 wire format +func (val *WorkflowMigrationState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type WorkflowMigrationState from the protobuf v3 wire format +func (val *WorkflowMigrationState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *WorkflowMigrationState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two WorkflowMigrationState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *WorkflowMigrationState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *WorkflowMigrationState + switch t := that.(type) { + case *WorkflowMigrationState: + that1 = t + case WorkflowMigrationState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type GeneratorState to the protobuf v3 wire format +func (val *GeneratorState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type GeneratorState from the protobuf v3 wire format +func (val *GeneratorState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *GeneratorState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two GeneratorState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *GeneratorState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *GeneratorState + switch t := that.(type) { + case *GeneratorState: + that1 = t + case GeneratorState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type InvokerState to the protobuf v3 wire format +func (val *InvokerState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvokerState from the protobuf v3 wire format +func (val *InvokerState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvokerState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvokerState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvokerState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvokerState + switch t := that.(type) { + case *InvokerState: + that1 = t + case InvokerState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type BackfillerState to the protobuf v3 wire format +func (val *BackfillerState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type BackfillerState from the protobuf v3 wire format +func (val *BackfillerState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *BackfillerState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two BackfillerState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *BackfillerState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *BackfillerState + switch t := that.(type) { + case *BackfillerState: + that1 = t + case BackfillerState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type LastCompletionResult to the protobuf v3 wire format +func (val *LastCompletionResult) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type LastCompletionResult from the protobuf v3 wire format +func (val *LastCompletionResult) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *LastCompletionResult) Size() int { + return proto.Size(val) +} + +// Equal returns whether two LastCompletionResult values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *LastCompletionResult) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *LastCompletionResult + switch t := that.(type) { + case *LastCompletionResult: + that1 = t + case LastCompletionResult: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type SchedulerMigrationState to the protobuf v3 wire format +func (val *SchedulerMigrationState) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type SchedulerMigrationState from the protobuf v3 wire format +func (val *SchedulerMigrationState) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *SchedulerMigrationState) Size() int { + return proto.Size(val) +} + +// Equal returns whether two SchedulerMigrationState values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *SchedulerMigrationState) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *SchedulerMigrationState + switch t := that.(type) { + case *SchedulerMigrationState: + that1 = t + case SchedulerMigrationState: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go new file mode 100644 index 0000000000..dad02f948a --- /dev/null +++ b/chasm/lib/scheduler/gen/schedulerpb/v1/message.pb.go @@ -0,0 +1,749 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/scheduler/proto/v1/message.proto + +package schedulerpb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + v12 "go.temporal.io/api/common/v1" + v13 "go.temporal.io/api/failure/v1" + v1 "go.temporal.io/api/schedule/v1" + v11 "go.temporal.io/server/api/schedule/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// CHASM scheduler top-level state. +type SchedulerState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Scheduler request parameters and metadata. + Schedule *v1.Schedule `protobuf:"bytes,2,opt,name=schedule,proto3" json:"schedule,omitempty"` + Info *v1.ScheduleInfo `protobuf:"bytes,3,opt,name=info,proto3" json:"info,omitempty"` + // State common to all generators is stored in the top-level machine. + Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` + NamespaceId string `protobuf:"bytes,6,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + ScheduleId string `protobuf:"bytes,7,opt,name=schedule_id,json=scheduleId,proto3" json:"schedule_id,omitempty"` + // Implemented as a sequence number. Used for optimistic locking against + // update requests. + ConflictToken int64 `protobuf:"varint,8,opt,name=conflict_token,json=conflictToken,proto3" json:"conflict_token,omitempty"` + // The closed flag is set true after a schedule completes, and the idle timer + // expires. + Closed bool `protobuf:"varint,9,opt,name=closed,proto3" json:"closed,omitempty"` + // When true, this scheduler is a sentinel that exists only to reserve the + // schedule ID. All API operations return NotFound. + Sentinel bool `protobuf:"varint,10,opt,name=sentinel,proto3" json:"sentinel,omitempty"` + // Set when a migration to workflow-backed scheduler (V1) is pending. + // Unpause operations are blocked while this is set. + WorkflowMigration *WorkflowMigrationState `protobuf:"bytes,11,opt,name=workflow_migration,json=workflowMigration,proto3" json:"workflow_migration,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SchedulerState) Reset() { + *x = SchedulerState{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SchedulerState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchedulerState) ProtoMessage() {} + +func (x *SchedulerState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchedulerState.ProtoReflect.Descriptor instead. +func (*SchedulerState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{0} +} + +func (x *SchedulerState) GetSchedule() *v1.Schedule { + if x != nil { + return x.Schedule + } + return nil +} + +func (x *SchedulerState) GetInfo() *v1.ScheduleInfo { + if x != nil { + return x.Info + } + return nil +} + +func (x *SchedulerState) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *SchedulerState) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *SchedulerState) GetScheduleId() string { + if x != nil { + return x.ScheduleId + } + return "" +} + +func (x *SchedulerState) GetConflictToken() int64 { + if x != nil { + return x.ConflictToken + } + return 0 +} + +func (x *SchedulerState) GetClosed() bool { + if x != nil { + return x.Closed + } + return false +} + +func (x *SchedulerState) GetSentinel() bool { + if x != nil { + return x.Sentinel + } + return false +} + +func (x *SchedulerState) GetWorkflowMigration() *WorkflowMigrationState { + if x != nil { + return x.WorkflowMigration + } + return nil +} + +// WorkflowMigrationState tracks the state of an in-progress V2-to-V1 migration. +type WorkflowMigrationState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The schedule's paused state before migration was initiated. Used to + // restore the correct paused state when passing state to the V1 workflow. + PreMigrationPaused bool `protobuf:"varint,1,opt,name=pre_migration_paused,json=preMigrationPaused,proto3" json:"pre_migration_paused,omitempty"` + // The schedule's notes before migration was initiated. + PreMigrationNotes string `protobuf:"bytes,2,opt,name=pre_migration_notes,json=preMigrationNotes,proto3" json:"pre_migration_notes,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkflowMigrationState) Reset() { + *x = WorkflowMigrationState{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkflowMigrationState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowMigrationState) ProtoMessage() {} + +func (x *WorkflowMigrationState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowMigrationState.ProtoReflect.Descriptor instead. +func (*WorkflowMigrationState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{1} +} + +func (x *WorkflowMigrationState) GetPreMigrationPaused() bool { + if x != nil { + return x.PreMigrationPaused + } + return false +} + +func (x *WorkflowMigrationState) GetPreMigrationNotes() string { + if x != nil { + return x.PreMigrationNotes + } + return "" +} + +// CHASM scheduler's Generator internal state. +type GeneratorState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // High water mark. + LastProcessedTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=last_processed_time,json=lastProcessedTime,proto3" json:"last_processed_time,omitempty"` + // A list of upcoming times an action will be triggered. + FutureActionTimes []*timestamppb.Timestamp `protobuf:"bytes,4,rep,name=future_action_times,json=futureActionTimes,proto3" json:"future_action_times,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GeneratorState) Reset() { + *x = GeneratorState{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GeneratorState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeneratorState) ProtoMessage() {} + +func (x *GeneratorState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GeneratorState.ProtoReflect.Descriptor instead. +func (*GeneratorState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{2} +} + +func (x *GeneratorState) GetLastProcessedTime() *timestamppb.Timestamp { + if x != nil { + return x.LastProcessedTime + } + return nil +} + +func (x *GeneratorState) GetFutureActionTimes() []*timestamppb.Timestamp { + if x != nil { + return x.FutureActionTimes + } + return nil +} + +// CHASM scheduler's Invoker internal state. +type InvokerState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Buffered starts that will be started by the Invoker. + BufferedStarts []*v11.BufferedStart `protobuf:"bytes,2,rep,name=buffered_starts,json=bufferedStarts,proto3" json:"buffered_starts,omitempty"` + // Workflow executions that will be cancelled due to overlap policy. + CancelWorkflows []*v12.WorkflowExecution `protobuf:"bytes,3,rep,name=cancel_workflows,json=cancelWorkflows,proto3" json:"cancel_workflows,omitempty"` + // Workflow executions that will be terminated due to overlap policy. + TerminateWorkflows []*v12.WorkflowExecution `protobuf:"bytes,4,rep,name=terminate_workflows,json=terminateWorkflows,proto3" json:"terminate_workflows,omitempty"` + // High water mark, used for evaluating when to fire tasks that are backing + // off from a retry. LastProcessedTime is stored as state so that task + // generation will be consistent, regardless of when generation occurs, such + // as after applying a replicated state (as opposed to evaluating based on + // present time). + LastProcessedTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_processed_time,json=lastProcessedTime,proto3" json:"last_processed_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvokerState) Reset() { + *x = InvokerState{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvokerState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokerState) ProtoMessage() {} + +func (x *InvokerState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokerState.ProtoReflect.Descriptor instead. +func (*InvokerState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{3} +} + +func (x *InvokerState) GetBufferedStarts() []*v11.BufferedStart { + if x != nil { + return x.BufferedStarts + } + return nil +} + +func (x *InvokerState) GetCancelWorkflows() []*v12.WorkflowExecution { + if x != nil { + return x.CancelWorkflows + } + return nil +} + +func (x *InvokerState) GetTerminateWorkflows() []*v12.WorkflowExecution { + if x != nil { + return x.TerminateWorkflows + } + return nil +} + +func (x *InvokerState) GetLastProcessedTime() *timestamppb.Timestamp { + if x != nil { + return x.LastProcessedTime + } + return nil +} + +// CHASM scheduler's Backfiller internal state. Backfill requests are 1:1 +// with Backfiller nodes. Backfiller nodes also handle immediate trigger requests. +type BackfillerState struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Types that are valid to be assigned to Request: + // + // *BackfillerState_BackfillRequest + // *BackfillerState_TriggerRequest + Request isBackfillerState_Request `protobuf_oneof:"request"` + // Every Backfiller should be assigned a unique ID upon creation, used + // for deduplication. + BackfillId string `protobuf:"bytes,6,opt,name=backfill_id,json=backfillId,proto3" json:"backfill_id,omitempty"` + // High water mark. + LastProcessedTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=last_processed_time,json=lastProcessedTime,proto3" json:"last_processed_time,omitempty"` + // Attempt count, incremented when the buffer is full and the Backfiller + // needs to back off before retrying to fill. + Attempt int64 `protobuf:"varint,8,opt,name=attempt,proto3" json:"attempt,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackfillerState) Reset() { + *x = BackfillerState{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackfillerState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackfillerState) ProtoMessage() {} + +func (x *BackfillerState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackfillerState.ProtoReflect.Descriptor instead. +func (*BackfillerState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{4} +} + +func (x *BackfillerState) GetRequest() isBackfillerState_Request { + if x != nil { + return x.Request + } + return nil +} + +func (x *BackfillerState) GetBackfillRequest() *v1.BackfillRequest { + if x != nil { + if x, ok := x.Request.(*BackfillerState_BackfillRequest); ok { + return x.BackfillRequest + } + } + return nil +} + +func (x *BackfillerState) GetTriggerRequest() *v1.TriggerImmediatelyRequest { + if x != nil { + if x, ok := x.Request.(*BackfillerState_TriggerRequest); ok { + return x.TriggerRequest + } + } + return nil +} + +func (x *BackfillerState) GetBackfillId() string { + if x != nil { + return x.BackfillId + } + return "" +} + +func (x *BackfillerState) GetLastProcessedTime() *timestamppb.Timestamp { + if x != nil { + return x.LastProcessedTime + } + return nil +} + +func (x *BackfillerState) GetAttempt() int64 { + if x != nil { + return x.Attempt + } + return 0 +} + +type isBackfillerState_Request interface { + isBackfillerState_Request() +} + +type BackfillerState_BackfillRequest struct { + BackfillRequest *v1.BackfillRequest `protobuf:"bytes,1,opt,name=backfill_request,json=backfillRequest,proto3,oneof"` +} + +type BackfillerState_TriggerRequest struct { + // When set, immediately buffer a single manual action. + TriggerRequest *v1.TriggerImmediatelyRequest `protobuf:"bytes,2,opt,name=trigger_request,json=triggerRequest,proto3,oneof"` +} + +func (*BackfillerState_BackfillRequest) isBackfillerState_Request() {} + +func (*BackfillerState_TriggerRequest) isBackfillerState_Request() {} + +// CHASM scheduler retains the payload data for the last completed workflow. Both +// last success and failure are stored simultaneously. +type LastCompletionResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Success *v12.Payload `protobuf:"bytes,1,opt,name=success,proto3" json:"success,omitempty"` + Failure *v13.Failure `protobuf:"bytes,2,opt,name=failure,proto3" json:"failure,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LastCompletionResult) Reset() { + *x = LastCompletionResult{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LastCompletionResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LastCompletionResult) ProtoMessage() {} + +func (x *LastCompletionResult) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LastCompletionResult.ProtoReflect.Descriptor instead. +func (*LastCompletionResult) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{5} +} + +func (x *LastCompletionResult) GetSuccess() *v12.Payload { + if x != nil { + return x.Success + } + return nil +} + +func (x *LastCompletionResult) GetFailure() *v13.Failure { + if x != nil { + return x.Failure + } + return nil +} + +// SchedulerMigrationState is a stack-agnostic interchange format for migrating +// scheduler state between V1 (workflow-backed) and V2 (CHASM) implementations. +type SchedulerMigrationState struct { + state protoimpl.MessageState `protogen:"open.v1"` + SchedulerState *SchedulerState `protobuf:"bytes,1,opt,name=scheduler_state,json=schedulerState,proto3" json:"scheduler_state,omitempty"` + GeneratorState *GeneratorState `protobuf:"bytes,2,opt,name=generator_state,json=generatorState,proto3" json:"generator_state,omitempty"` + InvokerState *InvokerState `protobuf:"bytes,3,opt,name=invoker_state,json=invokerState,proto3" json:"invoker_state,omitempty"` + Backfillers map[string]*BackfillerState `protobuf:"bytes,4,rep,name=backfillers,proto3" json:"backfillers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + LastCompletionResult *LastCompletionResult `protobuf:"bytes,5,opt,name=last_completion_result,json=lastCompletionResult,proto3" json:"last_completion_result,omitempty"` + // Visibility data. + SearchAttributes map[string]*v12.Payload `protobuf:"bytes,6,rep,name=search_attributes,json=searchAttributes,proto3" json:"search_attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Memo map[string]*v12.Payload `protobuf:"bytes,7,rep,name=memo,proto3" json:"memo,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SchedulerMigrationState) Reset() { + *x = SchedulerMigrationState{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SchedulerMigrationState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchedulerMigrationState) ProtoMessage() {} + +func (x *SchedulerMigrationState) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchedulerMigrationState.ProtoReflect.Descriptor instead. +func (*SchedulerMigrationState) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP(), []int{6} +} + +func (x *SchedulerMigrationState) GetSchedulerState() *SchedulerState { + if x != nil { + return x.SchedulerState + } + return nil +} + +func (x *SchedulerMigrationState) GetGeneratorState() *GeneratorState { + if x != nil { + return x.GeneratorState + } + return nil +} + +func (x *SchedulerMigrationState) GetInvokerState() *InvokerState { + if x != nil { + return x.InvokerState + } + return nil +} + +func (x *SchedulerMigrationState) GetBackfillers() map[string]*BackfillerState { + if x != nil { + return x.Backfillers + } + return nil +} + +func (x *SchedulerMigrationState) GetLastCompletionResult() *LastCompletionResult { + if x != nil { + return x.LastCompletionResult + } + return nil +} + +func (x *SchedulerMigrationState) GetSearchAttributes() map[string]*v12.Payload { + if x != nil { + return x.SearchAttributes + } + return nil +} + +func (x *SchedulerMigrationState) GetMemo() map[string]*v12.Payload { + if x != nil { + return x.Memo + } + return nil +} + +var File_temporal_server_chasm_lib_scheduler_proto_v1_message_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc = "" + + "\n" + + ":temporal/server/chasm/lib/scheduler/proto/v1/message.proto\x12,temporal.server.chasm.lib.scheduler.proto.v1\x1a$temporal/api/common/v1/message.proto\x1a%temporal/api/failure/v1/message.proto\x1a&temporal/api/schedule/v1/message.proto\x1a-temporal/server/api/schedule/v1/message.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x03\n" + + "\x0eSchedulerState\x12>\n" + + "\bschedule\x18\x02 \x01(\v2\".temporal.api.schedule.v1.ScheduleR\bschedule\x12:\n" + + "\x04info\x18\x03 \x01(\v2&.temporal.api.schedule.v1.ScheduleInfoR\x04info\x12\x1c\n" + + "\tnamespace\x18\x05 \x01(\tR\tnamespace\x12!\n" + + "\fnamespace_id\x18\x06 \x01(\tR\vnamespaceId\x12\x1f\n" + + "\vschedule_id\x18\a \x01(\tR\n" + + "scheduleId\x12%\n" + + "\x0econflict_token\x18\b \x01(\x03R\rconflictToken\x12\x16\n" + + "\x06closed\x18\t \x01(\bR\x06closed\x12\x1a\n" + + "\bsentinel\x18\n" + + " \x01(\bR\bsentinel\x12s\n" + + "\x12workflow_migration\x18\v \x01(\v2D.temporal.server.chasm.lib.scheduler.proto.v1.WorkflowMigrationStateR\x11workflowMigration\"z\n" + + "\x16WorkflowMigrationState\x120\n" + + "\x14pre_migration_paused\x18\x01 \x01(\bR\x12preMigrationPaused\x12.\n" + + "\x13pre_migration_notes\x18\x02 \x01(\tR\x11preMigrationNotes\"\xa8\x01\n" + + "\x0eGeneratorState\x12J\n" + + "\x13last_processed_time\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x11lastProcessedTime\x12J\n" + + "\x13future_action_times\x18\x04 \x03(\v2\x1a.google.protobuf.TimestampR\x11futureActionTimes\"\xeb\x02\n" + + "\fInvokerState\x12W\n" + + "\x0fbuffered_starts\x18\x02 \x03(\v2..temporal.server.api.schedule.v1.BufferedStartR\x0ebufferedStarts\x12T\n" + + "\x10cancel_workflows\x18\x03 \x03(\v2).temporal.api.common.v1.WorkflowExecutionR\x0fcancelWorkflows\x12Z\n" + + "\x13terminate_workflows\x18\x04 \x03(\v2).temporal.api.common.v1.WorkflowExecutionR\x12terminateWorkflows\x12J\n" + + "\x13last_processed_time\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\x11lastProcessedTimeJ\x04\b\x06\x10\a\"\xdb\x02\n" + + "\x0fBackfillerState\x12V\n" + + "\x10backfill_request\x18\x01 \x01(\v2).temporal.api.schedule.v1.BackfillRequestH\x00R\x0fbackfillRequest\x12^\n" + + "\x0ftrigger_request\x18\x02 \x01(\v23.temporal.api.schedule.v1.TriggerImmediatelyRequestH\x00R\x0etriggerRequest\x12\x1f\n" + + "\vbackfill_id\x18\x06 \x01(\tR\n" + + "backfillId\x12J\n" + + "\x13last_processed_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x11lastProcessedTime\x12\x18\n" + + "\aattempt\x18\b \x01(\x03R\aattemptB\t\n" + + "\arequest\"\x8d\x01\n" + + "\x14LastCompletionResult\x129\n" + + "\asuccess\x18\x01 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\asuccess\x12:\n" + + "\afailure\x18\x02 \x01(\v2 .temporal.api.failure.v1.FailureR\afailure\"\xeb\b\n" + + "\x17SchedulerMigrationState\x12e\n" + + "\x0fscheduler_state\x18\x01 \x01(\v2<.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerStateR\x0eschedulerState\x12e\n" + + "\x0fgenerator_state\x18\x02 \x01(\v2<.temporal.server.chasm.lib.scheduler.proto.v1.GeneratorStateR\x0egeneratorState\x12_\n" + + "\rinvoker_state\x18\x03 \x01(\v2:.temporal.server.chasm.lib.scheduler.proto.v1.InvokerStateR\finvokerState\x12x\n" + + "\vbackfillers\x18\x04 \x03(\v2V.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntryR\vbackfillers\x12x\n" + + "\x16last_completion_result\x18\x05 \x01(\v2B.temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResultR\x14lastCompletionResult\x12\x88\x01\n" + + "\x11search_attributes\x18\x06 \x03(\v2[.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntryR\x10searchAttributes\x12c\n" + + "\x04memo\x18\a \x03(\v2O.temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntryR\x04memo\x1a}\n" + + "\x10BackfillersEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12S\n" + + "\x05value\x18\x02 \x01(\v2=.temporal.server.chasm.lib.scheduler.proto.v1.BackfillerStateR\x05value:\x028\x01\x1ad\n" + + "\x15SearchAttributesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + + "\x05value\x18\x02 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\x05value:\x028\x01\x1aX\n" + + "\tMemoEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x125\n" + + "\x05value\x18\x02 \x01(\v2\x1f.temporal.api.common.v1.PayloadR\x05value:\x028\x01BGZEgo.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb;schedulerpbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDescData +} + +var file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_goTypes = []any{ + (*SchedulerState)(nil), // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState + (*WorkflowMigrationState)(nil), // 1: temporal.server.chasm.lib.scheduler.proto.v1.WorkflowMigrationState + (*GeneratorState)(nil), // 2: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState + (*InvokerState)(nil), // 3: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState + (*BackfillerState)(nil), // 4: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState + (*LastCompletionResult)(nil), // 5: temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult + (*SchedulerMigrationState)(nil), // 6: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState + nil, // 7: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntry + nil, // 8: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntry + nil, // 9: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntry + (*v1.Schedule)(nil), // 10: temporal.api.schedule.v1.Schedule + (*v1.ScheduleInfo)(nil), // 11: temporal.api.schedule.v1.ScheduleInfo + (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp + (*v11.BufferedStart)(nil), // 13: temporal.server.api.schedule.v1.BufferedStart + (*v12.WorkflowExecution)(nil), // 14: temporal.api.common.v1.WorkflowExecution + (*v1.BackfillRequest)(nil), // 15: temporal.api.schedule.v1.BackfillRequest + (*v1.TriggerImmediatelyRequest)(nil), // 16: temporal.api.schedule.v1.TriggerImmediatelyRequest + (*v12.Payload)(nil), // 17: temporal.api.common.v1.Payload + (*v13.Failure)(nil), // 18: temporal.api.failure.v1.Failure +} +var file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_depIdxs = []int32{ + 10, // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState.schedule:type_name -> temporal.api.schedule.v1.Schedule + 11, // 1: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState.info:type_name -> temporal.api.schedule.v1.ScheduleInfo + 1, // 2: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState.workflow_migration:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.WorkflowMigrationState + 12, // 3: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState.last_processed_time:type_name -> google.protobuf.Timestamp + 12, // 4: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState.future_action_times:type_name -> google.protobuf.Timestamp + 13, // 5: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.buffered_starts:type_name -> temporal.server.api.schedule.v1.BufferedStart + 14, // 6: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.cancel_workflows:type_name -> temporal.api.common.v1.WorkflowExecution + 14, // 7: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.terminate_workflows:type_name -> temporal.api.common.v1.WorkflowExecution + 12, // 8: temporal.server.chasm.lib.scheduler.proto.v1.InvokerState.last_processed_time:type_name -> google.protobuf.Timestamp + 15, // 9: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState.backfill_request:type_name -> temporal.api.schedule.v1.BackfillRequest + 16, // 10: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState.trigger_request:type_name -> temporal.api.schedule.v1.TriggerImmediatelyRequest + 12, // 11: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState.last_processed_time:type_name -> google.protobuf.Timestamp + 17, // 12: temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult.success:type_name -> temporal.api.common.v1.Payload + 18, // 13: temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult.failure:type_name -> temporal.api.failure.v1.Failure + 0, // 14: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.scheduler_state:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerState + 2, // 15: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.generator_state:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.GeneratorState + 3, // 16: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.invoker_state:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.InvokerState + 7, // 17: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.backfillers:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntry + 5, // 18: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.last_completion_result:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.LastCompletionResult + 8, // 19: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.search_attributes:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntry + 9, // 20: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.memo:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntry + 4, // 21: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.BackfillersEntry.value:type_name -> temporal.server.chasm.lib.scheduler.proto.v1.BackfillerState + 17, // 22: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload + 17, // 23: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrationState.MemoEntry.value:type_name -> temporal.api.common.v1.Payload + 24, // [24:24] is the sub-list for method output_type + 24, // [24:24] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_init() } +func file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_init() { + if File_temporal_server_chasm_lib_scheduler_proto_v1_message_proto != nil { + return + } + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes[4].OneofWrappers = []any{ + (*BackfillerState_BackfillRequest)(nil), + (*BackfillerState_TriggerRequest)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_rawDesc)), + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_scheduler_proto_v1_message_proto = out.File + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_goTypes = nil + file_temporal_server_chasm_lib_scheduler_proto_v1_message_proto_depIdxs = nil +} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go new file mode 100644 index 0000000000..16df837180 --- /dev/null +++ b/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.go-helpers.pb.go @@ -0,0 +1,265 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package schedulerpb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type SchedulerIdleTask to the protobuf v3 wire format +func (val *SchedulerIdleTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type SchedulerIdleTask from the protobuf v3 wire format +func (val *SchedulerIdleTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *SchedulerIdleTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two SchedulerIdleTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *SchedulerIdleTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *SchedulerIdleTask + switch t := that.(type) { + case *SchedulerIdleTask: + that1 = t + case SchedulerIdleTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type SchedulerCallbacksTask to the protobuf v3 wire format +func (val *SchedulerCallbacksTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type SchedulerCallbacksTask from the protobuf v3 wire format +func (val *SchedulerCallbacksTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *SchedulerCallbacksTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two SchedulerCallbacksTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *SchedulerCallbacksTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *SchedulerCallbacksTask + switch t := that.(type) { + case *SchedulerCallbacksTask: + that1 = t + case SchedulerCallbacksTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type GeneratorTask to the protobuf v3 wire format +func (val *GeneratorTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type GeneratorTask from the protobuf v3 wire format +func (val *GeneratorTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *GeneratorTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two GeneratorTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *GeneratorTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *GeneratorTask + switch t := that.(type) { + case *GeneratorTask: + that1 = t + case GeneratorTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type InvokerProcessBufferTask to the protobuf v3 wire format +func (val *InvokerProcessBufferTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvokerProcessBufferTask from the protobuf v3 wire format +func (val *InvokerProcessBufferTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvokerProcessBufferTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvokerProcessBufferTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvokerProcessBufferTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvokerProcessBufferTask + switch t := that.(type) { + case *InvokerProcessBufferTask: + that1 = t + case InvokerProcessBufferTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type InvokerExecuteTask to the protobuf v3 wire format +func (val *InvokerExecuteTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type InvokerExecuteTask from the protobuf v3 wire format +func (val *InvokerExecuteTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *InvokerExecuteTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two InvokerExecuteTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *InvokerExecuteTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *InvokerExecuteTask + switch t := that.(type) { + case *InvokerExecuteTask: + that1 = t + case InvokerExecuteTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type BackfillerTask to the protobuf v3 wire format +func (val *BackfillerTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type BackfillerTask from the protobuf v3 wire format +func (val *BackfillerTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *BackfillerTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two BackfillerTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *BackfillerTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *BackfillerTask + switch t := that.(type) { + case *BackfillerTask: + that1 = t + case BackfillerTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type SchedulerMigrateToWorkflowTask to the protobuf v3 wire format +func (val *SchedulerMigrateToWorkflowTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type SchedulerMigrateToWorkflowTask from the protobuf v3 wire format +func (val *SchedulerMigrateToWorkflowTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *SchedulerMigrateToWorkflowTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two SchedulerMigrateToWorkflowTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *SchedulerMigrateToWorkflowTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *SchedulerMigrateToWorkflowTask + switch t := that.(type) { + case *SchedulerMigrateToWorkflowTask: + that1 = t + case SchedulerMigrateToWorkflowTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go b/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go new file mode 100644 index 0000000000..3564a6aac3 --- /dev/null +++ b/chasm/lib/scheduler/gen/schedulerpb/v1/tasks.pb.go @@ -0,0 +1,367 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/scheduler/proto/v1/tasks.proto + +package schedulerpb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + durationpb "google.golang.org/protobuf/types/known/durationpb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Fires when the scheduler's idle period has lapsed, and the scheduler should +// be closed. +type SchedulerIdleTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Idle time total is set at time of task creation, so that if the dynamic config key + // controlling idle time changes, task validation will be aware. + IdleTimeTotal *durationpb.Duration `protobuf:"bytes,1,opt,name=idle_time_total,json=idleTimeTotal,proto3" json:"idle_time_total,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SchedulerIdleTask) Reset() { + *x = SchedulerIdleTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SchedulerIdleTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchedulerIdleTask) ProtoMessage() {} + +func (x *SchedulerIdleTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchedulerIdleTask.ProtoReflect.Descriptor instead. +func (*SchedulerIdleTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{0} +} + +func (x *SchedulerIdleTask) GetIdleTimeTotal() *durationpb.Duration { + if x != nil { + return x.IdleTimeTotal + } + return nil +} + +// Ensures that callbacks for all running buffered starts are attached. Used only +// during migration from V1, as workflows started by CHASM scheduler are started +// with callbacks attached. +type SchedulerCallbacksTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SchedulerCallbacksTask) Reset() { + *x = SchedulerCallbacksTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SchedulerCallbacksTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchedulerCallbacksTask) ProtoMessage() {} + +func (x *SchedulerCallbacksTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchedulerCallbacksTask.ProtoReflect.Descriptor instead. +func (*SchedulerCallbacksTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{1} +} + +// Buffers actions based on the schedule's specification. +type GeneratorTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GeneratorTask) Reset() { + *x = GeneratorTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GeneratorTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GeneratorTask) ProtoMessage() {} + +func (x *GeneratorTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GeneratorTask.ProtoReflect.Descriptor instead. +func (*GeneratorTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{2} +} + +// Processes buffered actions, deciding whether to execute, delay, or discard. +type InvokerProcessBufferTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvokerProcessBufferTask) Reset() { + *x = InvokerProcessBufferTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvokerProcessBufferTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokerProcessBufferTask) ProtoMessage() {} + +func (x *InvokerProcessBufferTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokerProcessBufferTask.ProtoReflect.Descriptor instead. +func (*InvokerProcessBufferTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{3} +} + +// Drives execution of pending buffered actions to completion by starting, +// canceling, or terminating workflows. +type InvokerExecuteTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *InvokerExecuteTask) Reset() { + *x = InvokerExecuteTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *InvokerExecuteTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InvokerExecuteTask) ProtoMessage() {} + +func (x *InvokerExecuteTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InvokerExecuteTask.ProtoReflect.Descriptor instead. +func (*InvokerExecuteTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{4} +} + +// Buffers actions based on a manually-requested backfill. +type BackfillerTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BackfillerTask) Reset() { + *x = BackfillerTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BackfillerTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BackfillerTask) ProtoMessage() {} + +func (x *BackfillerTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BackfillerTask.ProtoReflect.Descriptor instead. +func (*BackfillerTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{5} +} + +// Triggers migration from CHASM (V2) to workflow-backed (V1) scheduler. +type SchedulerMigrateToWorkflowTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SchedulerMigrateToWorkflowTask) Reset() { + *x = SchedulerMigrateToWorkflowTask{} + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SchedulerMigrateToWorkflowTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SchedulerMigrateToWorkflowTask) ProtoMessage() {} + +func (x *SchedulerMigrateToWorkflowTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SchedulerMigrateToWorkflowTask.ProtoReflect.Descriptor instead. +func (*SchedulerMigrateToWorkflowTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP(), []int{6} +} + +var File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc = "" + + "\n" + + "8temporal/server/chasm/lib/scheduler/proto/v1/tasks.proto\x12,temporal.server.chasm.lib.scheduler.proto.v1\x1a\x1egoogle/protobuf/duration.proto\"V\n" + + "\x11SchedulerIdleTask\x12A\n" + + "\x0fidle_time_total\x18\x01 \x01(\v2\x19.google.protobuf.DurationR\ridleTimeTotal\"\x18\n" + + "\x16SchedulerCallbacksTask\"\x0f\n" + + "\rGeneratorTask\"\x1a\n" + + "\x18InvokerProcessBufferTask\"\x14\n" + + "\x12InvokerExecuteTask\"\x10\n" + + "\x0eBackfillerTask\" \n" + + "\x1eSchedulerMigrateToWorkflowTaskBGZEgo.temporal.io/server/chasm/lib/scheduler/gen/schedulerpb;schedulerpbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDescData +} + +var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes = []any{ + (*SchedulerIdleTask)(nil), // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerIdleTask + (*SchedulerCallbacksTask)(nil), // 1: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerCallbacksTask + (*GeneratorTask)(nil), // 2: temporal.server.chasm.lib.scheduler.proto.v1.GeneratorTask + (*InvokerProcessBufferTask)(nil), // 3: temporal.server.chasm.lib.scheduler.proto.v1.InvokerProcessBufferTask + (*InvokerExecuteTask)(nil), // 4: temporal.server.chasm.lib.scheduler.proto.v1.InvokerExecuteTask + (*BackfillerTask)(nil), // 5: temporal.server.chasm.lib.scheduler.proto.v1.BackfillerTask + (*SchedulerMigrateToWorkflowTask)(nil), // 6: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerMigrateToWorkflowTask + (*durationpb.Duration)(nil), // 7: google.protobuf.Duration +} +var file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs = []int32{ + 7, // 0: temporal.server.chasm.lib.scheduler.proto.v1.SchedulerIdleTask.idle_time_total:type_name -> google.protobuf.Duration + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_init() } +func file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_init() { + if File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc), len(file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto = out.File + file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_goTypes = nil + file_temporal_server_chasm_lib_scheduler_proto_v1_tasks_proto_depIdxs = nil +} diff --git a/chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go b/chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go new file mode 100644 index 0000000000..3320f0f27f --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/message.go-helpers.pb.go @@ -0,0 +1,117 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package testspb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type TestPayloadStore to the protobuf v3 wire format +func (val *TestPayloadStore) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TestPayloadStore from the protobuf v3 wire format +func (val *TestPayloadStore) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TestPayloadStore) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TestPayloadStore values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TestPayloadStore) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TestPayloadStore + switch t := that.(type) { + case *TestPayloadStore: + that1 = t + case TestPayloadStore: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type TestPayloadTTLPureTask to the protobuf v3 wire format +func (val *TestPayloadTTLPureTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TestPayloadTTLPureTask from the protobuf v3 wire format +func (val *TestPayloadTTLPureTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TestPayloadTTLPureTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TestPayloadTTLPureTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TestPayloadTTLPureTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TestPayloadTTLPureTask + switch t := that.(type) { + case *TestPayloadTTLPureTask: + that1 = t + case TestPayloadTTLPureTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type TestPayloadTTLSideEffectTask to the protobuf v3 wire format +func (val *TestPayloadTTLSideEffectTask) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TestPayloadTTLSideEffectTask from the protobuf v3 wire format +func (val *TestPayloadTTLSideEffectTask) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TestPayloadTTLSideEffectTask) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TestPayloadTTLSideEffectTask values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TestPayloadTTLSideEffectTask) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TestPayloadTTLSideEffectTask + switch t := that.(type) { + case *TestPayloadTTLSideEffectTask: + that1 = t + case TestPayloadTTLSideEffectTask: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/tests/gen/testspb/v1/message.pb.go b/chasm/lib/tests/gen/testspb/v1/message.pb.go new file mode 100644 index 0000000000..9bd7f2b343 --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/message.pb.go @@ -0,0 +1,266 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/tests/proto/v1/message.proto + +package testspb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TestPayloadStore struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalCount int64 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` + TotalSize int64 `protobuf:"varint,2,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + // (-- api-linter: core::0142::time-field-type=disabled --) + ExpirationTimes map[string]*timestamppb.Timestamp `protobuf:"bytes,3,rep,name=expiration_times,json=expirationTimes,proto3" json:"expiration_times,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + Closed bool `protobuf:"varint,4,opt,name=closed,proto3" json:"closed,omitempty"` + Canceled bool `protobuf:"varint,5,opt,name=canceled,proto3" json:"canceled,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestPayloadStore) Reset() { + *x = TestPayloadStore{} + mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestPayloadStore) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestPayloadStore) ProtoMessage() {} + +func (x *TestPayloadStore) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestPayloadStore.ProtoReflect.Descriptor instead. +func (*TestPayloadStore) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP(), []int{0} +} + +func (x *TestPayloadStore) GetTotalCount() int64 { + if x != nil { + return x.TotalCount + } + return 0 +} + +func (x *TestPayloadStore) GetTotalSize() int64 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *TestPayloadStore) GetExpirationTimes() map[string]*timestamppb.Timestamp { + if x != nil { + return x.ExpirationTimes + } + return nil +} + +func (x *TestPayloadStore) GetClosed() bool { + if x != nil { + return x.Closed + } + return false +} + +func (x *TestPayloadStore) GetCanceled() bool { + if x != nil { + return x.Canceled + } + return false +} + +type TestPayloadTTLPureTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayloadKey string `protobuf:"bytes,1,opt,name=payload_key,json=payloadKey,proto3" json:"payload_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestPayloadTTLPureTask) Reset() { + *x = TestPayloadTTLPureTask{} + mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestPayloadTTLPureTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestPayloadTTLPureTask) ProtoMessage() {} + +func (x *TestPayloadTTLPureTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestPayloadTTLPureTask.ProtoReflect.Descriptor instead. +func (*TestPayloadTTLPureTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP(), []int{1} +} + +func (x *TestPayloadTTLPureTask) GetPayloadKey() string { + if x != nil { + return x.PayloadKey + } + return "" +} + +type TestPayloadTTLSideEffectTask struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayloadKey string `protobuf:"bytes,1,opt,name=payload_key,json=payloadKey,proto3" json:"payload_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestPayloadTTLSideEffectTask) Reset() { + *x = TestPayloadTTLSideEffectTask{} + mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestPayloadTTLSideEffectTask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestPayloadTTLSideEffectTask) ProtoMessage() {} + +func (x *TestPayloadTTLSideEffectTask) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestPayloadTTLSideEffectTask.ProtoReflect.Descriptor instead. +func (*TestPayloadTTLSideEffectTask) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP(), []int{2} +} + +func (x *TestPayloadTTLSideEffectTask) GetPayloadKey() string { + if x != nil { + return x.PayloadKey + } + return "" +} + +var File_temporal_server_chasm_lib_tests_proto_v1_message_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc = "" + + "\n" + + "6temporal/server/chasm/lib/tests/proto/v1/message.proto\x12(temporal.server.chasm.lib.tests.proto.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\x02\n" + + "\x10TestPayloadStore\x12\x1f\n" + + "\vtotal_count\x18\x01 \x01(\x03R\n" + + "totalCount\x12\x1d\n" + + "\n" + + "total_size\x18\x02 \x01(\x03R\ttotalSize\x12z\n" + + "\x10expiration_times\x18\x03 \x03(\v2O.temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntryR\x0fexpirationTimes\x12\x16\n" + + "\x06closed\x18\x04 \x01(\bR\x06closed\x12\x1a\n" + + "\bcanceled\x18\x05 \x01(\bR\bcanceled\x1a^\n" + + "\x14ExpirationTimesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\"9\n" + + "\x16TestPayloadTTLPureTask\x12\x1f\n" + + "\vpayload_key\x18\x01 \x01(\tR\n" + + "payloadKey\"?\n" + + "\x1cTestPayloadTTLSideEffectTask\x12\x1f\n" + + "\vpayload_key\x18\x01 \x01(\tR\n" + + "payloadKeyB;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDescData +} + +var file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_temporal_server_chasm_lib_tests_proto_v1_message_proto_goTypes = []any{ + (*TestPayloadStore)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore + (*TestPayloadTTLPureTask)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestPayloadTTLPureTask + (*TestPayloadTTLSideEffectTask)(nil), // 2: temporal.server.chasm.lib.tests.proto.v1.TestPayloadTTLSideEffectTask + nil, // 3: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntry + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp +} +var file_temporal_server_chasm_lib_tests_proto_v1_message_proto_depIdxs = []int32{ + 3, // 0: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.expiration_times:type_name -> temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntry + 4, // 1: temporal.server.chasm.lib.tests.proto.v1.TestPayloadStore.ExpirationTimesEntry.value:type_name -> google.protobuf.Timestamp + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_tests_proto_v1_message_proto_init() } +func file_temporal_server_chasm_lib_tests_proto_v1_message_proto_init() { + if File_temporal_server_chasm_lib_tests_proto_v1_message_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_message_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_message_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_message_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_tests_proto_v1_message_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_tests_proto_v1_message_proto = out.File + file_temporal_server_chasm_lib_tests_proto_v1_message_proto_goTypes = nil + file_temporal_server_chasm_lib_tests_proto_v1_message_proto_depIdxs = nil +} diff --git a/chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go b/chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go new file mode 100644 index 0000000000..c4da427ee6 --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/request_response.go-helpers.pb.go @@ -0,0 +1,80 @@ +// Code generated by protoc-gen-go-helpers. DO NOT EDIT. +package testspb + +import ( + "google.golang.org/protobuf/proto" +) + +// Marshal an object of type TestRequest to the protobuf v3 wire format +func (val *TestRequest) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TestRequest from the protobuf v3 wire format +func (val *TestRequest) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TestRequest) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TestRequest values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TestRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TestRequest + switch t := that.(type) { + case *TestRequest: + that1 = t + case TestRequest: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + +// Marshal an object of type TestResponse to the protobuf v3 wire format +func (val *TestResponse) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type TestResponse from the protobuf v3 wire format +func (val *TestResponse) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *TestResponse) Size() int { + return proto.Size(val) +} + +// Equal returns whether two TestResponse values are equivalent by recursively +// comparing the message's fields. +// For more information see the documentation for +// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal +func (this *TestResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *TestResponse + switch t := that.(type) { + case *TestResponse: + that1 = t + case TestResponse: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} diff --git a/chasm/lib/tests/gen/testspb/v1/request_response.pb.go b/chasm/lib/tests/gen/testspb/v1/request_response.pb.go new file mode 100644 index 0000000000..0942950ed3 --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/request_response.pb.go @@ -0,0 +1,181 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/tests/proto/v1/request_response.proto + +package testspb + +import ( + reflect "reflect" + sync "sync" + unsafe "unsafe" + + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type TestRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestRequest) Reset() { + *x = TestRequest{} + mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestRequest) ProtoMessage() {} + +func (x *TestRequest) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestRequest.ProtoReflect.Descriptor instead. +func (*TestRequest) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescGZIP(), []int{0} +} + +func (x *TestRequest) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +type TestResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + RequestId string `protobuf:"bytes,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + HasEngineCtx bool `protobuf:"varint,2,opt,name=has_engine_ctx,json=hasEngineCtx,proto3" json:"has_engine_ctx,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestResponse) Reset() { + *x = TestResponse{} + mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestResponse) ProtoMessage() {} + +func (x *TestResponse) ProtoReflect() protoreflect.Message { + mi := &file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TestResponse.ProtoReflect.Descriptor instead. +func (*TestResponse) Descriptor() ([]byte, []int) { + return file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescGZIP(), []int{1} +} + +func (x *TestResponse) GetRequestId() string { + if x != nil { + return x.RequestId + } + return "" +} + +func (x *TestResponse) GetHasEngineCtx() bool { + if x != nil { + return x.HasEngineCtx + } + return false +} + +var File_temporal_server_chasm_lib_tests_proto_v1_request_response_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc = "" + + "\n" + + "?temporal/server/chasm/lib/tests/proto/v1/request_response.proto\x12(temporal.server.chasm.lib.tests.proto.v1\",\n" + + "\vTestRequest\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\tR\trequestId\"S\n" + + "\fTestResponse\x12\x1d\n" + + "\n" + + "request_id\x18\x01 \x01(\tR\trequestId\x12$\n" + + "\x0ehas_engine_ctx\x18\x02 \x01(\bR\fhasEngineCtxB;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3" + +var ( + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescOnce sync.Once + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescData []byte +) + +func file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescGZIP() []byte { + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescOnce.Do(func() { + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc))) + }) + return file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDescData +} + +var file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_goTypes = []any{ + (*TestRequest)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestRequest + (*TestResponse)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestResponse +} +var file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init() } +func file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init() { + if File_temporal_server_chasm_lib_tests_proto_v1_request_response_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_rawDesc)), + NumEnums: 0, + NumMessages: 2, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_depIdxs, + MessageInfos: file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_msgTypes, + }.Build() + File_temporal_server_chasm_lib_tests_proto_v1_request_response_proto = out.File + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_goTypes = nil + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_depIdxs = nil +} diff --git a/chasm/lib/tests/gen/testspb/v1/service.pb.go b/chasm/lib/tests/gen/testspb/v1/service.pb.go new file mode 100644 index 0000000000..e3b105a6b0 --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/service.pb.go @@ -0,0 +1,70 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// plugins: +// protoc-gen-go +// protoc +// source: temporal/server/chasm/lib/tests/proto/v1/service.proto + +package testspb + +import ( + reflect "reflect" + unsafe "unsafe" + + _ "go.temporal.io/server/api/common/v1" + _ "go.temporal.io/server/api/routing/v1" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var File_temporal_server_chasm_lib_tests_proto_v1_service_proto protoreflect.FileDescriptor + +const file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc = "" + + "\n" + + "6temporal/server/chasm/lib/tests/proto/v1/service.proto\x12(temporal.server.chasm.lib.tests.proto.v1\x1a?temporal/server/chasm/lib/tests/proto/v1/request_response.proto\x1a.temporal/server/api/routing/v1/extension.proto\x1a0temporal/server/api/common/v1/api_category.proto2\x93\x01\n" + + "\vTestService\x12\x83\x01\n" + + "\x04Test\x125.temporal.server.chasm.lib.tests.proto.v1.TestRequest\x1a6.temporal.server.chasm.lib.tests.proto.v1.TestResponse\"\f\x92\xc4\x03\x02\b\x01\x8a\xb5\x18\x02\b\x01B;Z9go.temporal.io/server/chasm/lib/tests/gen/testspb;testspbb\x06proto3" + +var file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes = []any{ + (*TestRequest)(nil), // 0: temporal.server.chasm.lib.tests.proto.v1.TestRequest + (*TestResponse)(nil), // 1: temporal.server.chasm.lib.tests.proto.v1.TestResponse +} +var file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs = []int32{ + 0, // 0: temporal.server.chasm.lib.tests.proto.v1.TestService.Test:input_type -> temporal.server.chasm.lib.tests.proto.v1.TestRequest + 1, // 1: temporal.server.chasm.lib.tests.proto.v1.TestService.Test:output_type -> temporal.server.chasm.lib.tests.proto.v1.TestResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_temporal_server_chasm_lib_tests_proto_v1_service_proto_init() } +func file_temporal_server_chasm_lib_tests_proto_v1_service_proto_init() { + if File_temporal_server_chasm_lib_tests_proto_v1_service_proto != nil { + return + } + file_temporal_server_chasm_lib_tests_proto_v1_request_response_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc), len(file_temporal_server_chasm_lib_tests_proto_v1_service_proto_rawDesc)), + NumEnums: 0, + NumMessages: 0, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes, + DependencyIndexes: file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs, + }.Build() + File_temporal_server_chasm_lib_tests_proto_v1_service_proto = out.File + file_temporal_server_chasm_lib_tests_proto_v1_service_proto_goTypes = nil + file_temporal_server_chasm_lib_tests_proto_v1_service_proto_depIdxs = nil +} diff --git a/chasm/lib/tests/gen/testspb/v1/service_client.pb.go b/chasm/lib/tests/gen/testspb/v1/service_client.pb.go new file mode 100644 index 0000000000..fbeff6fc99 --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/service_client.pb.go @@ -0,0 +1,104 @@ +// Code generated by protoc-gen-go-chasm. DO NOT EDIT. +package testspb + +import ( + "context" + "math/rand" + "time" + + "go.temporal.io/server/client/history" + "go.temporal.io/server/common" + "go.temporal.io/server/common/backoff" + "go.temporal.io/server/common/config" + "go.temporal.io/server/common/dynamicconfig" + "go.temporal.io/server/common/headers" + "go.temporal.io/server/common/log" + "go.temporal.io/server/common/membership" + "go.temporal.io/server/common/metrics" + "go.temporal.io/server/common/primitives" + "google.golang.org/grpc" +) + +// TestServiceLayeredClient is a client for TestService. +type TestServiceLayeredClient struct { + metricsHandler metrics.Handler + numShards int32 + redirector history.Redirector[TestServiceClient] + retryPolicy backoff.RetryPolicy +} + +// NewTestServiceLayeredClient initializes a new TestServiceLayeredClient. +func NewTestServiceLayeredClient( + dc *dynamicconfig.Collection, + rpcFactory common.RPCFactory, + monitor membership.Monitor, + config *config.Persistence, + logger log.Logger, + metricsHandler metrics.Handler, +) (TestServiceClient, error) { + resolver, err := monitor.GetResolver(primitives.HistoryService) + if err != nil { + return nil, err + } + connections := history.NewConnectionPool(resolver, rpcFactory, NewTestServiceClient) + var redirector history.Redirector[TestServiceClient] + if dynamicconfig.HistoryClientOwnershipCachingEnabled.Get(dc)() { + redirector = history.NewCachingRedirector( + connections, + resolver, + logger, + dynamicconfig.HistoryClientOwnershipCachingStaleTTL.Get(dc), + ) + } else { + redirector = history.NewBasicRedirector(connections, resolver) + } + return &TestServiceLayeredClient{ + metricsHandler: metricsHandler, + redirector: redirector, + numShards: config.NumHistoryShards, + retryPolicy: common.CreateHistoryClientRetryPolicy(), + }, nil +} +func (c *TestServiceLayeredClient) callTestNoRetry( + ctx context.Context, + request *TestRequest, + opts ...grpc.CallOption, +) (*TestResponse, error) { + var response *TestResponse + var err error + startTime := time.Now().UTC() + // the caller is a namespace, hence the tag below. + caller := headers.GetCallerInfo(ctx).CallerName + metricsHandler := c.metricsHandler.WithTags( + metrics.OperationTag("TestService.Test"), + metrics.NamespaceTag(caller), + metrics.ServiceRoleTag(metrics.HistoryRoleTagValue), + ) + metrics.ClientRequests.With(metricsHandler).Record(1) + defer func() { + if err != nil { + metrics.ClientFailures.With(metricsHandler).Record(1, metrics.ServiceErrorTypeTag(err)) + } + metrics.ClientLatency.With(metricsHandler).Record(time.Since(startTime)) + }() + shardID := int32(rand.Intn(int(c.numShards)) + 1) + op := func(ctx context.Context, client TestServiceClient) error { + var err error + ctx, cancel := context.WithTimeout(ctx, history.DefaultTimeout) + defer cancel() + response, err = client.Test(ctx, request, opts...) + return err + } + err = c.redirector.Execute(ctx, shardID, op) + return response, err +} +func (c *TestServiceLayeredClient) Test( + ctx context.Context, + request *TestRequest, + opts ...grpc.CallOption, +) (*TestResponse, error) { + call := func(ctx context.Context) (*TestResponse, error) { + return c.callTestNoRetry(ctx, request, opts...) + } + return backoff.ThrottleRetryContextWithReturn(ctx, call, c.retryPolicy, common.IsServiceClientTransientError) +} diff --git a/chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go b/chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go new file mode 100644 index 0000000000..1b7ce58552 --- /dev/null +++ b/chasm/lib/tests/gen/testspb/v1/service_grpc.pb.go @@ -0,0 +1,110 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// plugins: +// - protoc-gen-go-grpc +// - protoc +// source: temporal/server/chasm/lib/tests/proto/v1/service.proto + +package testspb + +import ( + context "context" + + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + TestService_Test_FullMethodName = "/temporal.server.chasm.lib.tests.proto.v1.TestService/Test" +) + +// TestServiceClient is the client API for TestService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type TestServiceClient interface { + Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error) +} + +type testServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewTestServiceClient(cc grpc.ClientConnInterface) TestServiceClient { + return &testServiceClient{cc} +} + +func (c *testServiceClient) Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error) { + out := new(TestResponse) + err := c.cc.Invoke(ctx, TestService_Test_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// TestServiceServer is the server API for TestService service. +// All implementations must embed UnimplementedTestServiceServer +// for forward compatibility +type TestServiceServer interface { + Test(context.Context, *TestRequest) (*TestResponse, error) + mustEmbedUnimplementedTestServiceServer() +} + +// UnimplementedTestServiceServer must be embedded to have forward compatible implementations. +type UnimplementedTestServiceServer struct { +} + +func (UnimplementedTestServiceServer) Test(context.Context, *TestRequest) (*TestResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Test not implemented") +} +func (UnimplementedTestServiceServer) mustEmbedUnimplementedTestServiceServer() {} + +// UnsafeTestServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to TestServiceServer will +// result in compilation errors. +type UnsafeTestServiceServer interface { + mustEmbedUnimplementedTestServiceServer() +} + +func RegisterTestServiceServer(s grpc.ServiceRegistrar, srv TestServiceServer) { + s.RegisterService(&TestService_ServiceDesc, srv) +} + +func _TestService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TestRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(TestServiceServer).Test(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: TestService_Test_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(TestServiceServer).Test(ctx, req.(*TestRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// TestService_ServiceDesc is the grpc.ServiceDesc for TestService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var TestService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "temporal.server.chasm.lib.tests.proto.v1.TestService", + HandlerType: (*TestServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Test", + Handler: _TestService_Test_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "temporal/server/chasm/lib/tests/proto/v1/service.proto", +} diff --git a/common/metrics/metric_defs.go b/common/metrics/metric_defs.go index a9aa5294eb..7c2763f164 100644 --- a/common/metrics/metric_defs.go +++ b/common/metrics/metric_defs.go @@ -1108,9 +1108,8 @@ var ( ExecutionQueueSchedulerTaskLatency = NewTimerDef("execution_queue_scheduler_task_latency") ExecutionQueueSchedulerQueueWaitTime = NewTimerDef("execution_queue_scheduler_queue_wait_time") - PausedActivitiesCounter = NewCounterDef("paused_activities") - ExternalPayloadUploadSize = NewBytesHistogramDef("external_payload_upload_size", WithDescription("The histogram of sizes in bytes of uploaded external payloads.")) - ExecutionTimeSkippingEventCounter = NewCounterDef("execution_time_skipping_event") + PausedActivitiesCounter = NewCounterDef("paused_activities") + ExternalPayloadUploadSize = NewBytesHistogramDef("external_payload_upload_size", WithDescription("The histogram of sizes in bytes of uploaded external payloads.")) // Deadlock detector metrics DDSuspectedDeadlocks = NewCounterDef("dd_suspected_deadlocks") @@ -1129,6 +1128,10 @@ var ( NamespaceRegistryRefreshFailures = NewCounterDef("namespace_registry_refresh_failures") NamespaceRegistryRefreshLatency = NewTimerDef("namespace_registry_refresh_latency") + ExecutionTimeSkippingDurationSkippedEventCount = NewCounterDef("execution_time_skipping_duration_skipped_event_count") + ExecutionTimeSkippingEnabledCount = NewCounterDef("execution_time_skipping_enabled_count") + ExecutionTimeSkippingDisabledCount = NewCounterDef("execution_time_skipping_disabled_count") + // Matching MatchingClientForwardedCounter = NewCounterDef("forwarded") MatchingClientInvalidTaskQueueName = NewCounterDef("invalid_task_queue_name") diff --git a/common/persistence/serialization/task_serializers.go b/common/persistence/serialization/task_serializers.go index aedab69378..22e10d1032 100644 --- a/common/persistence/serialization/task_serializers.go +++ b/common/persistence/serialization/task_serializers.go @@ -1499,9 +1499,9 @@ func deserializeOutboundTask( func timerTimeSkippingTaskToProto(task *tasks.TimeSkippingTimerTask) *persistencespb.TimerTaskInfo { return &persistencespb.TimerTaskInfo{ - NamespaceId: task.WorkflowKey.NamespaceID, - WorkflowId: task.WorkflowKey.WorkflowID, - RunId: task.WorkflowKey.RunID, + NamespaceId: task.NamespaceID, + WorkflowId: task.WorkflowID, + RunId: task.RunID, TaskType: enumsspb.TASK_TYPE_TIME_SKIPPING, TaskId: task.TaskID, VisibilityTime: timestamppb.New(task.VisibilityTimestamp), diff --git a/go.mod b/go.mod index 4f44a6da05..daf2e0ea52 100644 --- a/go.mod +++ b/go.mod @@ -59,7 +59,7 @@ require ( go.opentelemetry.io/otel/sdk v1.40.0 go.opentelemetry.io/otel/sdk/metric v1.40.0 go.opentelemetry.io/otel/trace v1.40.0 - go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019 + go.temporal.io/api v1.62.5-0.20260323233506-7011abe4c28d go.temporal.io/sdk v1.38.0 go.uber.org/fx v1.24.0 go.uber.org/mock v0.6.0 diff --git a/go.sum b/go.sum index 3927befd5b..d072a96ee5 100644 --- a/go.sum +++ b/go.sum @@ -384,6 +384,8 @@ go.temporal.io/api v1.62.3-0.20260322205303-ac66c14c6f53 h1:ICjBBnQrF235sHeiF8dK go.temporal.io/api v1.62.3-0.20260322205303-ac66c14c6f53/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019 h1:0ZYkwnj9HlPBCB+JGev5qjGe3Fe57wxnzVM8zVu4pPI= go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= +go.temporal.io/api v1.62.5-0.20260323233506-7011abe4c28d h1:EdQsq0dRCYVrvE6mPDyUdM7j/+HE7FRHE7WqGhlIs/8= +go.temporal.io/api v1.62.5-0.20260323233506-7011abe4c28d/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.temporal.io/sdk v1.38.0 h1:4Bok5LEdED7YKpsSjIa3dDqram5VOq+ydBf4pyx0Wo4= go.temporal.io/sdk v1.38.0/go.mod h1:a+R2Ej28ObvHoILbHaxMyind7M6D+W0L7edt5UJF4SE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= diff --git a/proto/internal/temporal/server/api/persistence/v1/executions.proto b/proto/internal/temporal/server/api/persistence/v1/executions.proto index 78177dcad0..3be78154da 100644 --- a/proto/internal/temporal/server/api/persistence/v1/executions.proto +++ b/proto/internal/temporal/server/api/persistence/v1/executions.proto @@ -335,10 +335,17 @@ message TimeSkippingInfo { } message TimeSkippedDetails { - google.protobuf.Timestamp real_time_point_when_skipped = 1; - google.protobuf.Timestamp virtual_time_point_when_skipped = 2; + // (-- api-linter: core::0142::time-field-names=disabled + // aip.dev/not-precedent: Ignoring lint rules. --) + google.protobuf.Timestamp real_time_when_skipped = 1; + // (-- api-linter: core::0142::time-field-names=disabled + // aip.dev/not-precedent: Ignoring lint rules. --) + google.protobuf.Timestamp virtual_time_when_skipped = 2; + // (-- api-linter: core::0142::time-field-names=disabled + // api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: Ignoring lint rules. --) google.protobuf.Timestamp duration_to_skip = 3; - google.protobuf.Timestamp target_virtual_time_point = 4; + google.protobuf.Timestamp target_virtual_time = 4; } message ExecutionStats { diff --git a/service/frontend/workflow_handler.go b/service/frontend/workflow_handler.go index 6602004cab..c548739dd4 100644 --- a/service/frontend/workflow_handler.go +++ b/service/frontend/workflow_handler.go @@ -6585,8 +6585,6 @@ func getBatchOperationState(workflowState enumspb.WorkflowExecutionStatus) enums return operationState } -// todo: to be removed -// another entrypoint for time skipping config validation func (wh *WorkflowHandler) UpdateWorkflowExecutionOptions( ctx context.Context, request *workflowservice.UpdateWorkflowExecutionOptionsRequest, diff --git a/service/history/api/updateworkflowoptions/api.go b/service/history/api/updateworkflowoptions/api.go index 166ac6efa9..feee12b02e 100644 --- a/service/history/api/updateworkflowoptions/api.go +++ b/service/history/api/updateworkflowoptions/api.go @@ -172,7 +172,6 @@ func getOptionsFromMutableState(ms historyi.MutableState) *workflowpb.WorkflowEx opts.Priority = cloned } } - // todo: right now we only assume enabled is the only field we care in options if timeSkippingInfo := ms.GetExecutionInfo().GetTimeSkippingInfo(); timeSkippingInfo != nil { opts.TimeSkippingConfig = &workflowpb.TimeSkippingConfig{ Enabled: timeSkippingInfo.GetEnabled(), diff --git a/service/history/historybuilder/event_factory.go b/service/history/historybuilder/event_factory.go index 802042cc11..07bff54f56 100644 --- a/service/history/historybuilder/event_factory.go +++ b/service/history/historybuilder/event_factory.go @@ -1062,13 +1062,11 @@ func (b *EventFactory) CreateWorkflowExecutionUnpausedEvent( func (b *EventFactory) CreateWorkflowExecutionTimePointAdvancedEvent( advanceToTimePoint time.Time, - durationToAdvance time.Duration, ) *historypb.HistoryEvent { event := b.createHistoryEvent(enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED, b.timeSource.Now()) event.Attributes = &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - SkippedDuration: durationpb.New(durationToAdvance), - SkipToTimePoint: timestamppb.New(advanceToTimePoint), + ToTime: timestamppb.New(advanceToTimePoint), }, } event.WorkerMayIgnore = true diff --git a/service/history/historybuilder/history_builder.go b/service/history/historybuilder/history_builder.go index 20cd3b0502..78cb757a9c 100644 --- a/service/history/historybuilder/history_builder.go +++ b/service/history/historybuilder/history_builder.go @@ -304,16 +304,14 @@ func (b *HistoryBuilder) AddWorkflowExecutionUnpausedEvent( return event } -// todo: @feiyang - try to align naming between TimeSkippingEvent func (b *HistoryBuilder) AddWorkflowExecutionTimeSkippedEvent( advanceToTimePoint time.Time, - durationToAdvance time.Duration, ) *historypb.HistoryEvent { - event := b.EventFactory.CreateWorkflowExecutionTimePointAdvancedEvent(advanceToTimePoint, durationToAdvance) + event := b.CreateWorkflowExecutionTimePointAdvancedEvent(advanceToTimePoint) // Mark the event as 'worker may ignore' so that older SDKs can safely ignore it. event.WorkerMayIgnore = true - event, _ = b.EventStore.add(event) - b.metricsHandler.Counter(metrics.ExecutionTimeSkippingEventCounter.Name()).Record(1) + event, _ = b.add(event) + b.metricsHandler.Counter(metrics.ExecutionTimeSkippingDurationSkippedEventCount.Name()).Record(1) return event } diff --git a/service/history/interfaces/mutable_state_mock.go b/service/history/interfaces/mutable_state_mock.go index 62306a89d4..489d7c44c6 100644 --- a/service/history/interfaces/mutable_state_mock.go +++ b/service/history/interfaces/mutable_state_mock.go @@ -1514,17 +1514,17 @@ func (mr *MockMutableStateMockRecorder) ApplyWorkflowExecutionTerminatedEvent(ar } // ApplyWorkflowExecutionTimeSkippedEvent mocks base method. -func (m *MockMutableState) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.Context, arg0 *history.HistoryEvent) error { +func (m *MockMutableState) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.Context, event *history.HistoryEvent) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ApplyWorkflowExecutionTimeSkippedEvent", ctx, arg0) + ret := m.ctrl.Call(m, "ApplyWorkflowExecutionTimeSkippedEvent", ctx, event) ret0, _ := ret[0].(error) return ret0 } // ApplyWorkflowExecutionTimeSkippedEvent indicates an expected call of ApplyWorkflowExecutionTimeSkippedEvent. -func (mr *MockMutableStateMockRecorder) ApplyWorkflowExecutionTimeSkippedEvent(ctx, arg0 any) *gomock.Call { +func (mr *MockMutableStateMockRecorder) ApplyWorkflowExecutionTimeSkippedEvent(ctx, event any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyWorkflowExecutionTimeSkippedEvent", reflect.TypeOf((*MockMutableState)(nil).ApplyWorkflowExecutionTimeSkippedEvent), ctx, arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ApplyWorkflowExecutionTimeSkippedEvent", reflect.TypeOf((*MockMutableState)(nil).ApplyWorkflowExecutionTimeSkippedEvent), ctx, event) } // ApplyWorkflowExecutionTimedoutEvent mocks base method. @@ -3052,20 +3052,6 @@ func (mr *MockMutableStateMockRecorder) IsAutoTimeSkippable() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsAutoTimeSkippable", reflect.TypeOf((*MockMutableState)(nil).IsAutoTimeSkippable)) } -// VirtualTimeNow mocks base method. -func (m *MockMutableState) VirtualTimeNow() time.Time { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "VirtualTimeNow") - ret0, _ := ret[0].(time.Time) - return ret0 -} - -// VirtualTimeNow indicates an expected call of VirtualTimeNow. -func (mr *MockMutableStateMockRecorder) VirtualTimeNow() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualTimeNow", reflect.TypeOf((*MockMutableState)(nil).VirtualTimeNow)) -} - // IsCancelRequested mocks base method. func (m *MockMutableState) IsCancelRequested() bool { m.ctrl.T.Helper() @@ -3784,6 +3770,20 @@ func (mr *MockMutableStateMockRecorder) UpdateWorkflowStateStatus(state, status return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateWorkflowStateStatus", reflect.TypeOf((*MockMutableState)(nil).UpdateWorkflowStateStatus), state, status) } +// VirtualTimeNow mocks base method. +func (m *MockMutableState) VirtualTimeNow() time.Time { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "VirtualTimeNow") + ret0, _ := ret[0].(time.Time) + return ret0 +} + +// VirtualTimeNow indicates an expected call of VirtualTimeNow. +func (mr *MockMutableStateMockRecorder) VirtualTimeNow() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "VirtualTimeNow", reflect.TypeOf((*MockMutableState)(nil).VirtualTimeNow)) +} + // VisitUpdates mocks base method. func (m *MockMutableState) VisitUpdates(visitor func(string, *persistence.UpdateInfo)) { m.ctrl.T.Helper() diff --git a/service/history/workflow/context.go b/service/history/workflow/context.go index 1cc5df9230..9948b31d03 100644 --- a/service/history/workflow/context.go +++ b/service/history/workflow/context.go @@ -234,14 +234,6 @@ func (c *ContextImpl) PersistWorkflowEvents( return PersistWorkflowEvents(ctx, shardContext, workflowEventsSlice...) } -// @feiyang this is a place for triggering time skipping changes so that it is inside the transaction -// but a workflow task is always scheduled for -// (1) standalone workflow execution -> pending workflowTask, cannot auto-skipping -// (2) workflow continue-as-new -> pending workflowTask, cannot auto-skipping -// cases workflow task is not immediately started, -// (3) child workflow - parent worklfow 2 phase commit -> won't time-skipping until the 2 phase commit is completed -// (4) delayed start -> only trigger time-skipping for this type -// so the last step shall be still triggering the time-skipping but only for (4) func (c *ContextImpl) CreateWorkflowExecution( ctx context.Context, shardContext historyi.ShardContext, @@ -527,10 +519,6 @@ func (c *ContextImpl) UpdateWorkflowExecutionWithNewAsPassive( ) } -// todo @feiyang this is a place for triggering time skipping changes so that it is inside the transaction -// another candidate than closeTransactionAsMutation/Snapshot -// - 544/568: covers both in mutation and snapshot -// - in all universal mutable state changes func (c *ContextImpl) UpdateWorkflowExecutionWithNew( ctx context.Context, shardContext historyi.ShardContext, diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 1a2c5df8e1..0c80b2d03d 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -258,7 +258,7 @@ type ( clusterMetadata cluster.Metadata eventsCache events.Cache config *configs.Config - timeSource clock.TimeSource + timeSource clock.TimeSource logger log.Logger metricsHandler metrics.Handler stateMachineNode *hsm.Node @@ -3945,8 +3945,7 @@ func (ms *MutableStateImpl) AddWorkflowExecutionTimeSkippedEvent( return nil, err } - durationToAdvance := advanceToTimePoint.Sub(ms.timeSource.Now()) - event := ms.hBuilder.AddWorkflowExecutionTimeSkippedEvent(advanceToTimePoint, durationToAdvance) + event := ms.hBuilder.AddWorkflowExecutionTimeSkippedEvent(advanceToTimePoint) if err := ms.ApplyWorkflowExecutionTimeSkippedEvent(ctx, event); err != nil { return nil, err } @@ -3966,31 +3965,36 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.C return NewTaskRefresher(ms.shard).Refresh(ctx, ms, false) } -// buildTimeSkippedDetails constructs a TimeSkippedDetails entry for a single skip event, -// accumulating previously skipped durations to compute the correct virtual time at the moment of this skip. +// buildTimeSkippedDetails constructs a TimeSkippedDetails entry for a single skip event. // -// VirtualTimeWhenSkipped = RealTime + sum(all previous DurationToSkip) -// TargetVirtualTimePoint = VirtualTimeWhenSkipped + DurationToSkip +// For the first skip the event time equals real time (the time-skipping offset is 0 when the +// event is created). For subsequent skips the virtual time at the moment of the skip equals the +// TargetVirtualTime of the most recent preceding entry; the event time is already the +// virtual time and must NOT be used to derive virtualTimeWhenSkipped in that case. +// +// TargetVirtualTime = VirtualTimeWhenSkipped + DurationToSkip func buildTimeSkippedDetails( existingDetails []*persistencespb.TimeSkippedDetails, event *historypb.HistoryEvent, ) *persistencespb.TimeSkippedDetails { attrs := event.GetWorkflowExecutionTimeSkippedEventAttributes() - var totalPreviouslySkipped time.Duration - for _, d := range existingDetails { - totalPreviouslySkipped += timeSkippedDurationFromTimestamp(d.GetDurationToSkip()) + // Derive the virtual time at which this skip starts. + // First skip: event time == real time (offset is 0 when the event is written). + // Subsequent skips: virtual time == previous skip's target virtual time. + var virtualTimeWhenSkipped time.Time + if len(existingDetails) == 0 { + virtualTimeWhenSkipped = event.GetEventTime().AsTime() + } else { + virtualTimeWhenSkipped = existingDetails[len(existingDetails)-1].GetTargetVirtualTime().AsTime() } - - realTime := event.GetEventTime().AsTime() - virtualTimeWhenSkipped := realTime.Add(totalPreviouslySkipped) - skipDuration := attrs.GetSkippedDuration().AsDuration() + skipDuration := attrs.GetToTime().AsTime().Sub(virtualTimeWhenSkipped) return &persistencespb.TimeSkippedDetails{ - RealTimePointWhenSkipped: event.GetEventTime(), - VirtualTimePointWhenSkipped: timestamppb.New(virtualTimeWhenSkipped), - DurationToSkip: timeSkippedDurationToTimestamp(skipDuration), - TargetVirtualTimePoint: attrs.GetSkipToTimePoint(), + RealTimeWhenSkipped: event.GetEventTime(), + VirtualTimeWhenSkipped: timestamppb.New(virtualTimeWhenSkipped), + DurationToSkip: timeSkippedDurationToTimestamp(skipDuration), + TargetVirtualTime: attrs.GetToTime(), } } @@ -7053,8 +7057,6 @@ func (ms *MutableStateImpl) StartTransaction( return flushBeforeReady, nil } -// todo @feiyang this is a place for triggering time skipping changes so that it is inside the transaction -// won't get lost, the whole process is a transaction func (ms *MutableStateImpl) CloseTransactionAsMutation( ctx context.Context, transactionPolicy historyi.TransactionPolicy, @@ -7102,6 +7104,7 @@ func (ms *MutableStateImpl) CloseTransactionAsMutation( } // todo @feiyang this is a place for triggering time skipping changes so that it is inside the transaction + func (ms *MutableStateImpl) CloseTransactionAsSnapshot( ctx context.Context, transactionPolicy historyi.TransactionPolicy, diff --git a/service/history/workflow/mutable_state_impl_test.go b/service/history/workflow/mutable_state_impl_test.go index 19d103ec38..84a8ff1cc4 100644 --- a/service/history/workflow/mutable_state_impl_test.go +++ b/service/history/workflow/mutable_state_impl_test.go @@ -6163,8 +6163,7 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_FirstSkip() { EventTime: timestamppb.New(realTime), Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - SkippedDuration: durationpb.New(skipDuration), - SkipToTimePoint: timestamppb.New(targetVirtualTime), + ToTime: timestamppb.New(targetVirtualTime), }, }, } @@ -6172,92 +6171,89 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_FirstSkip() { details := buildTimeSkippedDetails(nil, event) // Real time is the event time. - s.Equal(realTime, details.GetRealTimePointWhenSkipped().AsTime()) - // No previous skips: virtual time when skipped == real time. - s.Equal(realTime, details.GetVirtualTimePointWhenSkipped().AsTime()) + s.Equal(realTime, details.GetRealTimeWhenSkipped().AsTime()) + // No previous skips: virtual time when skipped == event time (offset is 0 for first skip). + s.Equal(realTime, details.GetVirtualTimeWhenSkipped().AsTime()) // Duration encodes correctly. s.Equal(skipDuration, timeSkippedDurationFromTimestamp(details.GetDurationToSkip())) // Target = realTime + 2h. - s.Equal(targetVirtualTime, details.GetTargetVirtualTimePoint().AsTime()) + s.Equal(targetVirtualTime, details.GetTargetVirtualTime().AsTime()) } -func (s *mutableStateSuite) TestBuildTimeSkippedDetails_SecondSkip_AccumulatesPreviousDuration() { - // First skip: real 12:00, skip 2h → virtual advances to 14:00. +func (s *mutableStateSuite) TestBuildTimeSkippedDetails_SecondSkip_UsesTargetOfPreviousSkip() { + // First skip: real/virtual 12:00, skip 2h → virtual target 14:00. realTime1 := time.Date(2024, 1, 1, 12, 0, 0, 0, time.UTC) skipDuration1 := 2 * time.Hour - targetVirtual1 := realTime1.Add(skipDuration1) // 14:00 virtual + targetVirtual1 := realTime1.Add(skipDuration1) // 14:00 event1 := &historypb.HistoryEvent{ EventTime: timestamppb.New(realTime1), Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - SkippedDuration: durationpb.New(skipDuration1), - SkipToTimePoint: timestamppb.New(targetVirtual1), + ToTime: timestamppb.New(targetVirtual1), }, }, } details1 := buildTimeSkippedDetails(nil, event1) - // Second skip: real clock advanced 1h to 13:00, skip 3h more. - // Virtual time at this moment = 13:00 real + 2h (prev skip) = 15:00 virtual. - realTime2 := time.Date(2024, 1, 1, 13, 0, 0, 0, time.UTC) + // Second skip: virtual time is now targetVirtual1 = 14:00 (event time is the virtual clock + // reading, which equals targetVirtual1 after the first advance). + // Skip 3h more → target = 17:00. skipDuration2 := 3 * time.Hour - expectedVirtualAtSkip2 := realTime2.Add(skipDuration1) // 15:00 virtual - targetVirtual2 := expectedVirtualAtSkip2.Add(skipDuration2) // 18:00 virtual + targetVirtual2 := targetVirtual1.Add(skipDuration2) // 17:00 + // event.EventTime reflects the virtual clock at the moment of the second skip (~= targetVirtual1). + event2EventTime := targetVirtual1 event2 := &historypb.HistoryEvent{ - EventTime: timestamppb.New(realTime2), + EventTime: timestamppb.New(event2EventTime), Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - SkippedDuration: durationpb.New(skipDuration2), - SkipToTimePoint: timestamppb.New(targetVirtual2), + ToTime: timestamppb.New(targetVirtual2), }, }, } details2 := buildTimeSkippedDetails([]*persistencespb.TimeSkippedDetails{details1}, event2) - s.Equal(realTime2, details2.GetRealTimePointWhenSkipped().AsTime()) - // Virtual time when skipped = real2 + sum of previous durations = 13:00 + 2h = 15:00. - s.Equal(expectedVirtualAtSkip2, details2.GetVirtualTimePointWhenSkipped().AsTime()) + s.Equal(event2EventTime, details2.GetRealTimeWhenSkipped().AsTime()) + // VirtualTimeWhenSkipped = previous skip's TargetVirtualTime = 14:00. + s.Equal(targetVirtual1, details2.GetVirtualTimeWhenSkipped().AsTime()) s.Equal(skipDuration2, timeSkippedDurationFromTimestamp(details2.GetDurationToSkip())) - s.Equal(targetVirtual2, details2.GetTargetVirtualTimePoint().AsTime()) + s.Equal(targetVirtual2, details2.GetTargetVirtualTime().AsTime()) } func (s *mutableStateSuite) TestBuildTimeSkippedDetails_ThreeSkips_VirtualTimeAccumulates() { base := time.Date(2024, 1, 1, 10, 0, 0, 0, time.UTC) - type skipInput struct { - realTime time.Time - skipDuration time.Duration - } - skips := []skipInput{ - {base, 1 * time.Hour}, // skip1: real=10:00, +1h - {base.Add(30 * time.Minute), 2 * time.Hour}, // skip2: real=10:30, +2h - {base.Add(45 * time.Minute), 3 * time.Hour}, // skip3: real=10:45, +3h - } + // Each skip advances virtual time by its duration from the previous target. + // Skip N's virtualTimeWhenSkipped = accumulated[N-1].TargetVirtualTime. + skipDurations := []time.Duration{1 * time.Hour, 2 * time.Hour, 3 * time.Hour} var accumulated []*persistencespb.TimeSkippedDetails - var prevTotalSkipped time.Duration - for i, sk := range skips { - targetVirtual := sk.realTime.Add(prevTotalSkipped + sk.skipDuration) + prevTarget := base // for the first skip, virtualTimeWhenSkipped = event.EventTime = base + for i, dur := range skipDurations { + target := prevTarget.Add(dur) + eventTime := base.Add(time.Duration(i) * 15 * time.Minute) // arbitrary real clock advance + if i == 0 { + eventTime = base // first skip: event time == real time == virtual time (offset=0) + } event := &historypb.HistoryEvent{ - EventTime: timestamppb.New(sk.realTime), + EventTime: timestamppb.New(eventTime), Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - SkippedDuration: durationpb.New(sk.skipDuration), - SkipToTimePoint: timestamppb.New(targetVirtual), + ToTime: timestamppb.New(target), }, }, } d := buildTimeSkippedDetails(accumulated, event) - s.Equal(sk.realTime, d.GetRealTimePointWhenSkipped().AsTime(), "skip %d: real time", i) - s.Equal(sk.realTime.Add(prevTotalSkipped), d.GetVirtualTimePointWhenSkipped().AsTime(), "skip %d: virtual time when skipped", i) - s.Equal(sk.skipDuration, timeSkippedDurationFromTimestamp(d.GetDurationToSkip()), "skip %d: duration", i) - s.Equal(targetVirtual, d.GetTargetVirtualTimePoint().AsTime(), "skip %d: target virtual time", i) + s.Equal(eventTime, d.GetRealTimeWhenSkipped().AsTime(), "skip %d: real time", i) + // VirtualTimeWhenSkipped = previous target (base for first skip). + s.Equal(prevTarget, d.GetVirtualTimeWhenSkipped().AsTime(), "skip %d: virtual time when skipped", i) + s.Equal(dur, timeSkippedDurationFromTimestamp(d.GetDurationToSkip()), "skip %d: duration", i) + s.Equal(target, d.GetTargetVirtualTime().AsTime(), "skip %d: target virtual time", i) accumulated = append(accumulated, d) - prevTotalSkipped += sk.skipDuration + prevTarget = target } } diff --git a/service/history/workflow/task_refresher.go b/service/history/workflow/task_refresher.go index 7eb1a5c45e..b82c6cd6ea 100644 --- a/service/history/workflow/task_refresher.go +++ b/service/history/workflow/task_refresher.go @@ -709,7 +709,7 @@ func (r *TaskRefresherImpl) applyTimeSkippingOffsetToUserTimerTasks(mutableState } latestDetail := details[len(details)-1] - latestTargetVirtualTime := latestDetail.GetTargetVirtualTimePoint().AsTime() + latestTargetVirtualTime := latestDetail.GetTargetVirtualTime().AsTime() skippedDuration := latestTargetVirtualTime.Sub(r.shard.GetTimeSource().Now()) if skippedDuration <= 0 { return diff --git a/setting_gen.go b/setting_gen.go deleted file mode 100644 index 3f01ae6ecc..0000000000 --- a/setting_gen.go +++ /dev/null @@ -1,1733 +0,0 @@ -// Code generated by cmd/tools/gendynamicconfig. DO NOT EDIT. - -package dynamicconfig - -import ( - "time" - - enumspb "go.temporal.io/api/enums/v1" - enumsspb "go.temporal.io/server/api/enums/v1" - "go.temporal.io/server/common/namespace" -) - -const ( - PrecedenceUnknown Precedence = iota - PrecedenceGlobal - PrecedenceNamespace - PrecedenceNamespaceID - PrecedenceTaskQueue - PrecedenceShardID - PrecedenceTaskType - PrecedenceDestination -) - -type GlobalBoolSetting = GlobalTypedSetting[bool] -type GlobalBoolConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[bool] - -func NewGlobalBoolSetting(key string, def bool, description string) GlobalBoolSetting { - return NewGlobalTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewGlobalBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) GlobalBoolConstrainedDefaultSetting { - return NewGlobalTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFn = TypedPropertyFn[bool] - -func GetBoolPropertyFn(value bool) BoolPropertyFn { - return GetTypedPropertyFn(value) -} - -type NamespaceBoolSetting = NamespaceTypedSetting[bool] -type NamespaceBoolConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[bool] - -func NewNamespaceBoolSetting(key string, def bool, description string) NamespaceBoolSetting { - return NewNamespaceTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewNamespaceBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) NamespaceBoolConstrainedDefaultSetting { - return NewNamespaceTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[bool] - -func GetBoolPropertyFnFilteredByNamespace(value bool) BoolPropertyFnWithNamespaceFilter { - return GetTypedPropertyFnFilteredByNamespace(value) -} - -type NamespaceIDBoolSetting = NamespaceIDTypedSetting[bool] -type NamespaceIDBoolConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[bool] - -func NewNamespaceIDBoolSetting(key string, def bool, description string) NamespaceIDBoolSetting { - return NewNamespaceIDTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewNamespaceIDBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) NamespaceIDBoolConstrainedDefaultSetting { - return NewNamespaceIDTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[bool] - -func GetBoolPropertyFnFilteredByNamespaceID(value bool) BoolPropertyFnWithNamespaceIDFilter { - return GetTypedPropertyFnFilteredByNamespaceID(value) -} - -type TaskQueueBoolSetting = TaskQueueTypedSetting[bool] -type TaskQueueBoolConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[bool] - -func NewTaskQueueBoolSetting(key string, def bool, description string) TaskQueueBoolSetting { - return NewTaskQueueTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewTaskQueueBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) TaskQueueBoolConstrainedDefaultSetting { - return NewTaskQueueTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[bool] - -func GetBoolPropertyFnFilteredByTaskQueue(value bool) BoolPropertyFnWithTaskQueueFilter { - return GetTypedPropertyFnFilteredByTaskQueue(value) -} - -type ShardIDBoolSetting = ShardIDTypedSetting[bool] -type ShardIDBoolConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[bool] - -func NewShardIDBoolSetting(key string, def bool, description string) ShardIDBoolSetting { - return NewShardIDTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewShardIDBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) ShardIDBoolConstrainedDefaultSetting { - return NewShardIDTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[bool] - -func GetBoolPropertyFnFilteredByShardID(value bool) BoolPropertyFnWithShardIDFilter { - return GetTypedPropertyFnFilteredByShardID(value) -} - -type TaskTypeBoolSetting = TaskTypeTypedSetting[bool] -type TaskTypeBoolConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[bool] - -func NewTaskTypeBoolSetting(key string, def bool, description string) TaskTypeBoolSetting { - return NewTaskTypeTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewTaskTypeBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) TaskTypeBoolConstrainedDefaultSetting { - return NewTaskTypeTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[bool] - -func GetBoolPropertyFnFilteredByTaskType(value bool) BoolPropertyFnWithTaskTypeFilter { - return GetTypedPropertyFnFilteredByTaskType(value) -} - -type DestinationBoolSetting = DestinationTypedSetting[bool] -type DestinationBoolConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[bool] - -func NewDestinationBoolSetting(key string, def bool, description string) DestinationBoolSetting { - return NewDestinationTypedSettingWithConverter[bool](key, convertBool, def, description) -} - -func NewDestinationBoolSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[bool], description string) DestinationBoolConstrainedDefaultSetting { - return NewDestinationTypedSettingWithConstrainedDefault[bool](key, convertBool, cdef, description) -} - -type BoolPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[bool] - -func GetBoolPropertyFnFilteredByDestination(value bool) BoolPropertyFnWithDestinationFilter { - return GetTypedPropertyFnFilteredByDestination(value) -} - -type GlobalIntSetting = GlobalTypedSetting[int] -type GlobalIntConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[int] - -func NewGlobalIntSetting(key string, def int, description string) GlobalIntSetting { - return NewGlobalTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewGlobalIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) GlobalIntConstrainedDefaultSetting { - return NewGlobalTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFn = TypedPropertyFn[int] - -func GetIntPropertyFn(value int) IntPropertyFn { - return GetTypedPropertyFn(value) -} - -type NamespaceIntSetting = NamespaceTypedSetting[int] -type NamespaceIntConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[int] - -func NewNamespaceIntSetting(key string, def int, description string) NamespaceIntSetting { - return NewNamespaceTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewNamespaceIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) NamespaceIntConstrainedDefaultSetting { - return NewNamespaceTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[int] - -func GetIntPropertyFnFilteredByNamespace(value int) IntPropertyFnWithNamespaceFilter { - return GetTypedPropertyFnFilteredByNamespace(value) -} - -type NamespaceIDIntSetting = NamespaceIDTypedSetting[int] -type NamespaceIDIntConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[int] - -func NewNamespaceIDIntSetting(key string, def int, description string) NamespaceIDIntSetting { - return NewNamespaceIDTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewNamespaceIDIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) NamespaceIDIntConstrainedDefaultSetting { - return NewNamespaceIDTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[int] - -func GetIntPropertyFnFilteredByNamespaceID(value int) IntPropertyFnWithNamespaceIDFilter { - return GetTypedPropertyFnFilteredByNamespaceID(value) -} - -type TaskQueueIntSetting = TaskQueueTypedSetting[int] -type TaskQueueIntConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[int] - -func NewTaskQueueIntSetting(key string, def int, description string) TaskQueueIntSetting { - return NewTaskQueueTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewTaskQueueIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) TaskQueueIntConstrainedDefaultSetting { - return NewTaskQueueTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[int] - -func GetIntPropertyFnFilteredByTaskQueue(value int) IntPropertyFnWithTaskQueueFilter { - return GetTypedPropertyFnFilteredByTaskQueue(value) -} - -type ShardIDIntSetting = ShardIDTypedSetting[int] -type ShardIDIntConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[int] - -func NewShardIDIntSetting(key string, def int, description string) ShardIDIntSetting { - return NewShardIDTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewShardIDIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) ShardIDIntConstrainedDefaultSetting { - return NewShardIDTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[int] - -func GetIntPropertyFnFilteredByShardID(value int) IntPropertyFnWithShardIDFilter { - return GetTypedPropertyFnFilteredByShardID(value) -} - -type TaskTypeIntSetting = TaskTypeTypedSetting[int] -type TaskTypeIntConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[int] - -func NewTaskTypeIntSetting(key string, def int, description string) TaskTypeIntSetting { - return NewTaskTypeTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewTaskTypeIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) TaskTypeIntConstrainedDefaultSetting { - return NewTaskTypeTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[int] - -func GetIntPropertyFnFilteredByTaskType(value int) IntPropertyFnWithTaskTypeFilter { - return GetTypedPropertyFnFilteredByTaskType(value) -} - -type DestinationIntSetting = DestinationTypedSetting[int] -type DestinationIntConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[int] - -func NewDestinationIntSetting(key string, def int, description string) DestinationIntSetting { - return NewDestinationTypedSettingWithConverter[int](key, convertInt, def, description) -} - -func NewDestinationIntSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[int], description string) DestinationIntConstrainedDefaultSetting { - return NewDestinationTypedSettingWithConstrainedDefault[int](key, convertInt, cdef, description) -} - -type IntPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[int] - -func GetIntPropertyFnFilteredByDestination(value int) IntPropertyFnWithDestinationFilter { - return GetTypedPropertyFnFilteredByDestination(value) -} - -type GlobalFloatSetting = GlobalTypedSetting[float64] -type GlobalFloatConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[float64] - -func NewGlobalFloatSetting(key string, def float64, description string) GlobalFloatSetting { - return NewGlobalTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewGlobalFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) GlobalFloatConstrainedDefaultSetting { - return NewGlobalTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFn = TypedPropertyFn[float64] - -func GetFloatPropertyFn(value float64) FloatPropertyFn { - return GetTypedPropertyFn(value) -} - -type NamespaceFloatSetting = NamespaceTypedSetting[float64] -type NamespaceFloatConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[float64] - -func NewNamespaceFloatSetting(key string, def float64, description string) NamespaceFloatSetting { - return NewNamespaceTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewNamespaceFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) NamespaceFloatConstrainedDefaultSetting { - return NewNamespaceTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[float64] - -func GetFloatPropertyFnFilteredByNamespace(value float64) FloatPropertyFnWithNamespaceFilter { - return GetTypedPropertyFnFilteredByNamespace(value) -} - -type NamespaceIDFloatSetting = NamespaceIDTypedSetting[float64] -type NamespaceIDFloatConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[float64] - -func NewNamespaceIDFloatSetting(key string, def float64, description string) NamespaceIDFloatSetting { - return NewNamespaceIDTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewNamespaceIDFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) NamespaceIDFloatConstrainedDefaultSetting { - return NewNamespaceIDTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[float64] - -func GetFloatPropertyFnFilteredByNamespaceID(value float64) FloatPropertyFnWithNamespaceIDFilter { - return GetTypedPropertyFnFilteredByNamespaceID(value) -} - -type TaskQueueFloatSetting = TaskQueueTypedSetting[float64] -type TaskQueueFloatConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[float64] - -func NewTaskQueueFloatSetting(key string, def float64, description string) TaskQueueFloatSetting { - return NewTaskQueueTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewTaskQueueFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) TaskQueueFloatConstrainedDefaultSetting { - return NewTaskQueueTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[float64] - -func GetFloatPropertyFnFilteredByTaskQueue(value float64) FloatPropertyFnWithTaskQueueFilter { - return GetTypedPropertyFnFilteredByTaskQueue(value) -} - -type ShardIDFloatSetting = ShardIDTypedSetting[float64] -type ShardIDFloatConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[float64] - -func NewShardIDFloatSetting(key string, def float64, description string) ShardIDFloatSetting { - return NewShardIDTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewShardIDFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) ShardIDFloatConstrainedDefaultSetting { - return NewShardIDTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[float64] - -func GetFloatPropertyFnFilteredByShardID(value float64) FloatPropertyFnWithShardIDFilter { - return GetTypedPropertyFnFilteredByShardID(value) -} - -type TaskTypeFloatSetting = TaskTypeTypedSetting[float64] -type TaskTypeFloatConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[float64] - -func NewTaskTypeFloatSetting(key string, def float64, description string) TaskTypeFloatSetting { - return NewTaskTypeTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewTaskTypeFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) TaskTypeFloatConstrainedDefaultSetting { - return NewTaskTypeTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[float64] - -func GetFloatPropertyFnFilteredByTaskType(value float64) FloatPropertyFnWithTaskTypeFilter { - return GetTypedPropertyFnFilteredByTaskType(value) -} - -type DestinationFloatSetting = DestinationTypedSetting[float64] -type DestinationFloatConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[float64] - -func NewDestinationFloatSetting(key string, def float64, description string) DestinationFloatSetting { - return NewDestinationTypedSettingWithConverter[float64](key, convertFloat, def, description) -} - -func NewDestinationFloatSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[float64], description string) DestinationFloatConstrainedDefaultSetting { - return NewDestinationTypedSettingWithConstrainedDefault[float64](key, convertFloat, cdef, description) -} - -type FloatPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[float64] - -func GetFloatPropertyFnFilteredByDestination(value float64) FloatPropertyFnWithDestinationFilter { - return GetTypedPropertyFnFilteredByDestination(value) -} - -type GlobalStringSetting = GlobalTypedSetting[string] -type GlobalStringConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[string] - -func NewGlobalStringSetting(key string, def string, description string) GlobalStringSetting { - return NewGlobalTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewGlobalStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) GlobalStringConstrainedDefaultSetting { - return NewGlobalTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFn = TypedPropertyFn[string] - -func GetStringPropertyFn(value string) StringPropertyFn { - return GetTypedPropertyFn(value) -} - -type NamespaceStringSetting = NamespaceTypedSetting[string] -type NamespaceStringConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[string] - -func NewNamespaceStringSetting(key string, def string, description string) NamespaceStringSetting { - return NewNamespaceTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewNamespaceStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) NamespaceStringConstrainedDefaultSetting { - return NewNamespaceTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[string] - -func GetStringPropertyFnFilteredByNamespace(value string) StringPropertyFnWithNamespaceFilter { - return GetTypedPropertyFnFilteredByNamespace(value) -} - -type NamespaceIDStringSetting = NamespaceIDTypedSetting[string] -type NamespaceIDStringConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[string] - -func NewNamespaceIDStringSetting(key string, def string, description string) NamespaceIDStringSetting { - return NewNamespaceIDTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewNamespaceIDStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) NamespaceIDStringConstrainedDefaultSetting { - return NewNamespaceIDTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[string] - -func GetStringPropertyFnFilteredByNamespaceID(value string) StringPropertyFnWithNamespaceIDFilter { - return GetTypedPropertyFnFilteredByNamespaceID(value) -} - -type TaskQueueStringSetting = TaskQueueTypedSetting[string] -type TaskQueueStringConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[string] - -func NewTaskQueueStringSetting(key string, def string, description string) TaskQueueStringSetting { - return NewTaskQueueTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewTaskQueueStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) TaskQueueStringConstrainedDefaultSetting { - return NewTaskQueueTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[string] - -func GetStringPropertyFnFilteredByTaskQueue(value string) StringPropertyFnWithTaskQueueFilter { - return GetTypedPropertyFnFilteredByTaskQueue(value) -} - -type ShardIDStringSetting = ShardIDTypedSetting[string] -type ShardIDStringConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[string] - -func NewShardIDStringSetting(key string, def string, description string) ShardIDStringSetting { - return NewShardIDTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewShardIDStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) ShardIDStringConstrainedDefaultSetting { - return NewShardIDTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[string] - -func GetStringPropertyFnFilteredByShardID(value string) StringPropertyFnWithShardIDFilter { - return GetTypedPropertyFnFilteredByShardID(value) -} - -type TaskTypeStringSetting = TaskTypeTypedSetting[string] -type TaskTypeStringConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[string] - -func NewTaskTypeStringSetting(key string, def string, description string) TaskTypeStringSetting { - return NewTaskTypeTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewTaskTypeStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) TaskTypeStringConstrainedDefaultSetting { - return NewTaskTypeTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[string] - -func GetStringPropertyFnFilteredByTaskType(value string) StringPropertyFnWithTaskTypeFilter { - return GetTypedPropertyFnFilteredByTaskType(value) -} - -type DestinationStringSetting = DestinationTypedSetting[string] -type DestinationStringConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[string] - -func NewDestinationStringSetting(key string, def string, description string) DestinationStringSetting { - return NewDestinationTypedSettingWithConverter[string](key, convertString, def, description) -} - -func NewDestinationStringSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[string], description string) DestinationStringConstrainedDefaultSetting { - return NewDestinationTypedSettingWithConstrainedDefault[string](key, convertString, cdef, description) -} - -type StringPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[string] - -func GetStringPropertyFnFilteredByDestination(value string) StringPropertyFnWithDestinationFilter { - return GetTypedPropertyFnFilteredByDestination(value) -} - -type GlobalDurationSetting = GlobalTypedSetting[time.Duration] -type GlobalDurationConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[time.Duration] - -func NewGlobalDurationSetting(key string, def time.Duration, description string) GlobalDurationSetting { - return NewGlobalTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewGlobalDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) GlobalDurationConstrainedDefaultSetting { - return NewGlobalTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFn = TypedPropertyFn[time.Duration] - -func GetDurationPropertyFn(value time.Duration) DurationPropertyFn { - return GetTypedPropertyFn(value) -} - -type NamespaceDurationSetting = NamespaceTypedSetting[time.Duration] -type NamespaceDurationConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[time.Duration] - -func NewNamespaceDurationSetting(key string, def time.Duration, description string) NamespaceDurationSetting { - return NewNamespaceTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewNamespaceDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) NamespaceDurationConstrainedDefaultSetting { - return NewNamespaceTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[time.Duration] - -func GetDurationPropertyFnFilteredByNamespace(value time.Duration) DurationPropertyFnWithNamespaceFilter { - return GetTypedPropertyFnFilteredByNamespace(value) -} - -type NamespaceIDDurationSetting = NamespaceIDTypedSetting[time.Duration] -type NamespaceIDDurationConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[time.Duration] - -func NewNamespaceIDDurationSetting(key string, def time.Duration, description string) NamespaceIDDurationSetting { - return NewNamespaceIDTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewNamespaceIDDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) NamespaceIDDurationConstrainedDefaultSetting { - return NewNamespaceIDTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[time.Duration] - -func GetDurationPropertyFnFilteredByNamespaceID(value time.Duration) DurationPropertyFnWithNamespaceIDFilter { - return GetTypedPropertyFnFilteredByNamespaceID(value) -} - -type TaskQueueDurationSetting = TaskQueueTypedSetting[time.Duration] -type TaskQueueDurationConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[time.Duration] - -func NewTaskQueueDurationSetting(key string, def time.Duration, description string) TaskQueueDurationSetting { - return NewTaskQueueTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewTaskQueueDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) TaskQueueDurationConstrainedDefaultSetting { - return NewTaskQueueTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[time.Duration] - -func GetDurationPropertyFnFilteredByTaskQueue(value time.Duration) DurationPropertyFnWithTaskQueueFilter { - return GetTypedPropertyFnFilteredByTaskQueue(value) -} - -type ShardIDDurationSetting = ShardIDTypedSetting[time.Duration] -type ShardIDDurationConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[time.Duration] - -func NewShardIDDurationSetting(key string, def time.Duration, description string) ShardIDDurationSetting { - return NewShardIDTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewShardIDDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) ShardIDDurationConstrainedDefaultSetting { - return NewShardIDTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[time.Duration] - -func GetDurationPropertyFnFilteredByShardID(value time.Duration) DurationPropertyFnWithShardIDFilter { - return GetTypedPropertyFnFilteredByShardID(value) -} - -type TaskTypeDurationSetting = TaskTypeTypedSetting[time.Duration] -type TaskTypeDurationConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[time.Duration] - -func NewTaskTypeDurationSetting(key string, def time.Duration, description string) TaskTypeDurationSetting { - return NewTaskTypeTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewTaskTypeDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) TaskTypeDurationConstrainedDefaultSetting { - return NewTaskTypeTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[time.Duration] - -func GetDurationPropertyFnFilteredByTaskType(value time.Duration) DurationPropertyFnWithTaskTypeFilter { - return GetTypedPropertyFnFilteredByTaskType(value) -} - -type DestinationDurationSetting = DestinationTypedSetting[time.Duration] -type DestinationDurationConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[time.Duration] - -func NewDestinationDurationSetting(key string, def time.Duration, description string) DestinationDurationSetting { - return NewDestinationTypedSettingWithConverter[time.Duration](key, convertDuration, def, description) -} - -func NewDestinationDurationSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[time.Duration], description string) DestinationDurationConstrainedDefaultSetting { - return NewDestinationTypedSettingWithConstrainedDefault[time.Duration](key, convertDuration, cdef, description) -} - -type DurationPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[time.Duration] - -func GetDurationPropertyFnFilteredByDestination(value time.Duration) DurationPropertyFnWithDestinationFilter { - return GetTypedPropertyFnFilteredByDestination(value) -} - -type GlobalMapSetting = GlobalTypedSetting[map[string]any] -type GlobalMapConstrainedDefaultSetting = GlobalTypedConstrainedDefaultSetting[map[string]any] - -func NewGlobalMapSetting(key string, def map[string]any, description string) GlobalMapSetting { - return NewGlobalTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewGlobalMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) GlobalMapConstrainedDefaultSetting { - return NewGlobalTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFn = TypedPropertyFn[map[string]any] - -func GetMapPropertyFn(value map[string]any) MapPropertyFn { - return GetTypedPropertyFn(value) -} - -type NamespaceMapSetting = NamespaceTypedSetting[map[string]any] -type NamespaceMapConstrainedDefaultSetting = NamespaceTypedConstrainedDefaultSetting[map[string]any] - -func NewNamespaceMapSetting(key string, def map[string]any, description string) NamespaceMapSetting { - return NewNamespaceTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewNamespaceMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) NamespaceMapConstrainedDefaultSetting { - return NewNamespaceTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFnWithNamespaceFilter = TypedPropertyFnWithNamespaceFilter[map[string]any] - -func GetMapPropertyFnFilteredByNamespace(value map[string]any) MapPropertyFnWithNamespaceFilter { - return GetTypedPropertyFnFilteredByNamespace(value) -} - -type NamespaceIDMapSetting = NamespaceIDTypedSetting[map[string]any] -type NamespaceIDMapConstrainedDefaultSetting = NamespaceIDTypedConstrainedDefaultSetting[map[string]any] - -func NewNamespaceIDMapSetting(key string, def map[string]any, description string) NamespaceIDMapSetting { - return NewNamespaceIDTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewNamespaceIDMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) NamespaceIDMapConstrainedDefaultSetting { - return NewNamespaceIDTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFnWithNamespaceIDFilter = TypedPropertyFnWithNamespaceIDFilter[map[string]any] - -func GetMapPropertyFnFilteredByNamespaceID(value map[string]any) MapPropertyFnWithNamespaceIDFilter { - return GetTypedPropertyFnFilteredByNamespaceID(value) -} - -type TaskQueueMapSetting = TaskQueueTypedSetting[map[string]any] -type TaskQueueMapConstrainedDefaultSetting = TaskQueueTypedConstrainedDefaultSetting[map[string]any] - -func NewTaskQueueMapSetting(key string, def map[string]any, description string) TaskQueueMapSetting { - return NewTaskQueueTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewTaskQueueMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) TaskQueueMapConstrainedDefaultSetting { - return NewTaskQueueTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFnWithTaskQueueFilter = TypedPropertyFnWithTaskQueueFilter[map[string]any] - -func GetMapPropertyFnFilteredByTaskQueue(value map[string]any) MapPropertyFnWithTaskQueueFilter { - return GetTypedPropertyFnFilteredByTaskQueue(value) -} - -type ShardIDMapSetting = ShardIDTypedSetting[map[string]any] -type ShardIDMapConstrainedDefaultSetting = ShardIDTypedConstrainedDefaultSetting[map[string]any] - -func NewShardIDMapSetting(key string, def map[string]any, description string) ShardIDMapSetting { - return NewShardIDTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewShardIDMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) ShardIDMapConstrainedDefaultSetting { - return NewShardIDTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFnWithShardIDFilter = TypedPropertyFnWithShardIDFilter[map[string]any] - -func GetMapPropertyFnFilteredByShardID(value map[string]any) MapPropertyFnWithShardIDFilter { - return GetTypedPropertyFnFilteredByShardID(value) -} - -type TaskTypeMapSetting = TaskTypeTypedSetting[map[string]any] -type TaskTypeMapConstrainedDefaultSetting = TaskTypeTypedConstrainedDefaultSetting[map[string]any] - -func NewTaskTypeMapSetting(key string, def map[string]any, description string) TaskTypeMapSetting { - return NewTaskTypeTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewTaskTypeMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) TaskTypeMapConstrainedDefaultSetting { - return NewTaskTypeTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFnWithTaskTypeFilter = TypedPropertyFnWithTaskTypeFilter[map[string]any] - -func GetMapPropertyFnFilteredByTaskType(value map[string]any) MapPropertyFnWithTaskTypeFilter { - return GetTypedPropertyFnFilteredByTaskType(value) -} - -type DestinationMapSetting = DestinationTypedSetting[map[string]any] -type DestinationMapConstrainedDefaultSetting = DestinationTypedConstrainedDefaultSetting[map[string]any] - -func NewDestinationMapSetting(key string, def map[string]any, description string) DestinationMapSetting { - return NewDestinationTypedSettingWithConverter[map[string]any](key, convertMap, def, description) -} - -func NewDestinationMapSettingWithConstrainedDefault(key string, cdef []TypedConstrainedValue[map[string]any], description string) DestinationMapConstrainedDefaultSetting { - return NewDestinationTypedSettingWithConstrainedDefault[map[string]any](key, convertMap, cdef, description) -} - -type MapPropertyFnWithDestinationFilter = TypedPropertyFnWithDestinationFilter[map[string]any] - -func GetMapPropertyFnFilteredByDestination(value map[string]any) MapPropertyFnWithDestinationFilter { - return GetTypedPropertyFnFilteredByDestination(value) -} - -type GlobalTypedSetting[T any] setting[T, func()] -type GlobalTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func()] - -// NewGlobalTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewGlobalTypedSetting[T any](key string, def T, description string) GlobalTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := GlobalTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewGlobalTypedSettingWithConverter creates a setting with a custom converter function. -func NewGlobalTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) GlobalTypedSetting[T] { - s := GlobalTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewGlobalTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewGlobalTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) GlobalTypedConstrainedDefaultSetting[T] { - s := GlobalTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s GlobalTypedSetting[T]) Key() Key { return s.key } -func (s GlobalTypedSetting[T]) Precedence() Precedence { return PrecedenceGlobal } -func (s GlobalTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s GlobalTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s GlobalTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceGlobal } -func (s GlobalTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s GlobalTypedSetting[T]) WithDefault(v T) GlobalTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFn[T any] func() T - -func (s GlobalTypedSetting[T]) Get(c *Collection) TypedPropertyFn[T] { - return func() T { - prec := []Constraints{{}} - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s GlobalTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFn[T] { - return func() T { - prec := []Constraints{{}} - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribable[T any] func(callback func(T)) (v T, cancel func()) - -func (s GlobalTypedSetting[T]) Subscribe(c *Collection) TypedSubscribable[T] { - return func(callback func(T)) (T, func()) { - prec := []Constraints{{}} - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s GlobalTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s GlobalTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribable[T] { - return func(callback func(T)) (T, func()) { - prec := []Constraints{{}} - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s GlobalTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFn[T any](value T) TypedPropertyFn[T] { - return func() T { - return value - } -} - -type NamespaceTypedSetting[T any] setting[T, func(namespace string)] -type NamespaceTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespace string)] - -// NewNamespaceTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewNamespaceTypedSetting[T any](key string, def T, description string) NamespaceTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := NamespaceTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewNamespaceTypedSettingWithConverter creates a setting with a custom converter function. -func NewNamespaceTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) NamespaceTypedSetting[T] { - s := NamespaceTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewNamespaceTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewNamespaceTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) NamespaceTypedConstrainedDefaultSetting[T] { - s := NamespaceTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s NamespaceTypedSetting[T]) Key() Key { return s.key } -func (s NamespaceTypedSetting[T]) Precedence() Precedence { return PrecedenceNamespace } -func (s NamespaceTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s NamespaceTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s NamespaceTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceNamespace } -func (s NamespaceTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s NamespaceTypedSetting[T]) WithDefault(v T) NamespaceTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFnWithNamespaceFilter[T any] func(namespace string) T - -func (s NamespaceTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceFilter[T] { - return func(namespace string) T { - prec := []Constraints{{Namespace: namespace}, {}} - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s NamespaceTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceFilter[T] { - return func(namespace string) T { - prec := []Constraints{{Namespace: namespace}, {}} - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribableWithNamespaceFilter[T any] func(namespace string, callback func(T)) (v T, cancel func()) - -func (s NamespaceTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceFilter[T] { - return func(namespace string, callback func(T)) (T, func()) { - prec := []Constraints{{Namespace: namespace}, {}} - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s NamespaceTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s NamespaceTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceFilter[T] { - return func(namespace string, callback func(T)) (T, func()) { - prec := []Constraints{{Namespace: namespace}, {}} - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s NamespaceTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFnFilteredByNamespace[T any](value T) TypedPropertyFnWithNamespaceFilter[T] { - return func(namespace string) T { - return value - } -} - -type NamespaceIDTypedSetting[T any] setting[T, func(namespaceID namespace.ID)] -type NamespaceIDTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespaceID namespace.ID)] - -// NewNamespaceIDTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewNamespaceIDTypedSetting[T any](key string, def T, description string) NamespaceIDTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := NamespaceIDTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewNamespaceIDTypedSettingWithConverter creates a setting with a custom converter function. -func NewNamespaceIDTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) NamespaceIDTypedSetting[T] { - s := NamespaceIDTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewNamespaceIDTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewNamespaceIDTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) NamespaceIDTypedConstrainedDefaultSetting[T] { - s := NamespaceIDTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s NamespaceIDTypedSetting[T]) Key() Key { return s.key } -func (s NamespaceIDTypedSetting[T]) Precedence() Precedence { return PrecedenceNamespaceID } -func (s NamespaceIDTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceNamespaceID } -func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s NamespaceIDTypedSetting[T]) WithDefault(v T) NamespaceIDTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFnWithNamespaceIDFilter[T any] func(namespaceID namespace.ID) T - -func (s NamespaceIDTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceIDFilter[T] { - return func(namespaceID namespace.ID) T { - prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithNamespaceIDFilter[T] { - return func(namespaceID namespace.ID) T { - prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribableWithNamespaceIDFilter[T any] func(namespaceID namespace.ID, callback func(T)) (v T, cancel func()) - -func (s NamespaceIDTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceIDFilter[T] { - return func(namespaceID namespace.ID, callback func(T)) (T, func()) { - prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s NamespaceIDTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s NamespaceIDTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithNamespaceIDFilter[T] { - return func(namespaceID namespace.ID, callback func(T)) (T, func()) { - prec := []Constraints{{NamespaceID: namespaceID.String()}, {}} - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s NamespaceIDTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFnFilteredByNamespaceID[T any](value T) TypedPropertyFnWithNamespaceIDFilter[T] { - return func(namespaceID namespace.ID) T { - return value - } -} - -type TaskQueueTypedSetting[T any] setting[T, func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType)] -type TaskQueueTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType)] - -// NewTaskQueueTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewTaskQueueTypedSetting[T any](key string, def T, description string) TaskQueueTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := TaskQueueTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewTaskQueueTypedSettingWithConverter creates a setting with a custom converter function. -func NewTaskQueueTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) TaskQueueTypedSetting[T] { - s := TaskQueueTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewTaskQueueTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewTaskQueueTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) TaskQueueTypedConstrainedDefaultSetting[T] { - s := TaskQueueTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s TaskQueueTypedSetting[T]) Key() Key { return s.key } -func (s TaskQueueTypedSetting[T]) Precedence() Precedence { return PrecedenceTaskQueue } -func (s TaskQueueTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s TaskQueueTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s TaskQueueTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceTaskQueue } -func (s TaskQueueTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s TaskQueueTypedSetting[T]) WithDefault(v T) TaskQueueTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFnWithTaskQueueFilter[T any] func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T - -func (s TaskQueueTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskQueueFilter[T] { - return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T { - prec := []Constraints{ - {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, - {Namespace: namespace, TaskQueueName: taskQueue}, - {TaskQueueName: taskQueue}, - {Namespace: namespace}, - {}, - } - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s TaskQueueTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskQueueFilter[T] { - return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T { - prec := []Constraints{ - {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, - {Namespace: namespace, TaskQueueName: taskQueue}, - {TaskQueueName: taskQueue}, - {Namespace: namespace}, - {}, - } - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribableWithTaskQueueFilter[T any] func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType, callback func(T)) (v T, cancel func()) - -func (s TaskQueueTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskQueueFilter[T] { - return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType, callback func(T)) (T, func()) { - prec := []Constraints{ - {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, - {Namespace: namespace, TaskQueueName: taskQueue}, - {TaskQueueName: taskQueue}, - {Namespace: namespace}, - {}, - } - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s TaskQueueTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s TaskQueueTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskQueueFilter[T] { - return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType, callback func(T)) (T, func()) { - prec := []Constraints{ - {Namespace: namespace, TaskQueueName: taskQueue, TaskQueueType: taskQueueType}, - {Namespace: namespace, TaskQueueName: taskQueue}, - {TaskQueueName: taskQueue}, - {Namespace: namespace}, - {}, - } - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s TaskQueueTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFnFilteredByTaskQueue[T any](value T) TypedPropertyFnWithTaskQueueFilter[T] { - return func(namespace string, taskQueue string, taskQueueType enumspb.TaskQueueType) T { - return value - } -} - -type ShardIDTypedSetting[T any] setting[T, func(shardID int32)] -type ShardIDTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(shardID int32)] - -// NewShardIDTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewShardIDTypedSetting[T any](key string, def T, description string) ShardIDTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := ShardIDTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewShardIDTypedSettingWithConverter creates a setting with a custom converter function. -func NewShardIDTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) ShardIDTypedSetting[T] { - s := ShardIDTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewShardIDTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewShardIDTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) ShardIDTypedConstrainedDefaultSetting[T] { - s := ShardIDTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s ShardIDTypedSetting[T]) Key() Key { return s.key } -func (s ShardIDTypedSetting[T]) Precedence() Precedence { return PrecedenceShardID } -func (s ShardIDTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s ShardIDTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s ShardIDTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceShardID } -func (s ShardIDTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s ShardIDTypedSetting[T]) WithDefault(v T) ShardIDTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFnWithShardIDFilter[T any] func(shardID int32) T - -func (s ShardIDTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithShardIDFilter[T] { - return func(shardID int32) T { - prec := []Constraints{{ShardID: shardID}, {}} - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s ShardIDTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithShardIDFilter[T] { - return func(shardID int32) T { - prec := []Constraints{{ShardID: shardID}, {}} - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribableWithShardIDFilter[T any] func(shardID int32, callback func(T)) (v T, cancel func()) - -func (s ShardIDTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithShardIDFilter[T] { - return func(shardID int32, callback func(T)) (T, func()) { - prec := []Constraints{{ShardID: shardID}, {}} - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s ShardIDTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s ShardIDTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithShardIDFilter[T] { - return func(shardID int32, callback func(T)) (T, func()) { - prec := []Constraints{{ShardID: shardID}, {}} - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s ShardIDTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFnFilteredByShardID[T any](value T) TypedPropertyFnWithShardIDFilter[T] { - return func(shardID int32) T { - return value - } -} - -type TaskTypeTypedSetting[T any] setting[T, func(taskType enumsspb.TaskType)] -type TaskTypeTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(taskType enumsspb.TaskType)] - -// NewTaskTypeTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewTaskTypeTypedSetting[T any](key string, def T, description string) TaskTypeTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := TaskTypeTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewTaskTypeTypedSettingWithConverter creates a setting with a custom converter function. -func NewTaskTypeTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) TaskTypeTypedSetting[T] { - s := TaskTypeTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewTaskTypeTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewTaskTypeTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) TaskTypeTypedConstrainedDefaultSetting[T] { - s := TaskTypeTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s TaskTypeTypedSetting[T]) Key() Key { return s.key } -func (s TaskTypeTypedSetting[T]) Precedence() Precedence { return PrecedenceTaskType } -func (s TaskTypeTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s TaskTypeTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s TaskTypeTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceTaskType } -func (s TaskTypeTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s TaskTypeTypedSetting[T]) WithDefault(v T) TaskTypeTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFnWithTaskTypeFilter[T any] func(taskType enumsspb.TaskType) T - -func (s TaskTypeTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskTypeFilter[T] { - return func(taskType enumsspb.TaskType) T { - prec := []Constraints{{TaskType: taskType}, {}} - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s TaskTypeTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithTaskTypeFilter[T] { - return func(taskType enumsspb.TaskType) T { - prec := []Constraints{{TaskType: taskType}, {}} - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribableWithTaskTypeFilter[T any] func(taskType enumsspb.TaskType, callback func(T)) (v T, cancel func()) - -func (s TaskTypeTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskTypeFilter[T] { - return func(taskType enumsspb.TaskType, callback func(T)) (T, func()) { - prec := []Constraints{{TaskType: taskType}, {}} - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s TaskTypeTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s TaskTypeTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithTaskTypeFilter[T] { - return func(taskType enumsspb.TaskType, callback func(T)) (T, func()) { - prec := []Constraints{{TaskType: taskType}, {}} - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s TaskTypeTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFnFilteredByTaskType[T any](value T) TypedPropertyFnWithTaskTypeFilter[T] { - return func(taskType enumsspb.TaskType) T { - return value - } -} - -type DestinationTypedSetting[T any] setting[T, func(namespace string, destination string)] -type DestinationTypedConstrainedDefaultSetting[T any] constrainedDefaultSetting[T, func(namespace string, destination string)] - -// NewDestinationTypedSetting creates a setting that uses mapstructure to handle complex structured -// values. The value from dynamic config will be _merged_ over a deep copy of 'def'. Be very careful -// when using non-empty maps or slices as defaults, the result may not be what you want. -func NewDestinationTypedSetting[T any](key string, def T, description string) DestinationTypedSetting[T] { - // Warn on any shared structure used with ConvertStructure, even though we handle it by deep copying. - warnDefaultSharedStructure(key, def) - // If even deep copy won't even work, we should panic early. Do that by calling deep copy once here. - _ = deepCopyForMapstructure(def) - - s := DestinationTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: ConvertStructure[T](def), - description: description, - } - register(s) - return s -} - -// NewDestinationTypedSettingWithConverter creates a setting with a custom converter function. -func NewDestinationTypedSettingWithConverter[T any](key string, convert func(any) (T, error), def T, description string) DestinationTypedSetting[T] { - s := DestinationTypedSetting[T]{ - key: MakeKey(key), - def: def, - convert: convert, - description: description, - } - register(s) - return s -} - -// NewDestinationTypedSettingWithConstrainedDefault creates a setting with a compound default value. -func NewDestinationTypedSettingWithConstrainedDefault[T any](key string, convert func(any) (T, error), cdef []TypedConstrainedValue[T], description string) DestinationTypedConstrainedDefaultSetting[T] { - s := DestinationTypedConstrainedDefaultSetting[T]{ - key: MakeKey(key), - cdef: cdef, - convert: convert, - description: description, - } - register(s) - return s -} - -func (s DestinationTypedSetting[T]) Key() Key { return s.key } -func (s DestinationTypedSetting[T]) Precedence() Precedence { return PrecedenceDestination } -func (s DestinationTypedSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s DestinationTypedConstrainedDefaultSetting[T]) Key() Key { return s.key } -func (s DestinationTypedConstrainedDefaultSetting[T]) Precedence() Precedence { return PrecedenceDestination } -func (s DestinationTypedConstrainedDefaultSetting[T]) Validate(v any) error { - _, err := s.convert(v) - return err -} - -func (s DestinationTypedSetting[T]) WithDefault(v T) DestinationTypedSetting[T] { - newS := s - newS.def = v - return newS -} - -type TypedPropertyFnWithDestinationFilter[T any] func(namespace string, destination string) T - -func (s DestinationTypedSetting[T]) Get(c *Collection) TypedPropertyFnWithDestinationFilter[T] { - return func(namespace string, destination string) T { - prec := []Constraints{ - {Namespace: namespace, Destination: destination}, - {Destination: destination}, - {Namespace: namespace}, - {}, - } - return matchAndConvert( - c, - s.key, - s.def, - s.convert, - prec, - ) - } -} - -func (s DestinationTypedConstrainedDefaultSetting[T]) Get(c *Collection) TypedPropertyFnWithDestinationFilter[T] { - return func(namespace string, destination string) T { - prec := []Constraints{ - {Namespace: namespace, Destination: destination}, - {Destination: destination}, - {Namespace: namespace}, - {}, - } - return matchAndConvertWithConstrainedDefault( - c, - s.key, - s.cdef, - s.convert, - prec, - ) - } -} - -type TypedSubscribableWithDestinationFilter[T any] func(namespace string, destination string, callback func(T)) (v T, cancel func()) - -func (s DestinationTypedSetting[T]) Subscribe(c *Collection) TypedSubscribableWithDestinationFilter[T] { - return func(namespace string, destination string, callback func(T)) (T, func()) { - prec := []Constraints{ - {Namespace: namespace, Destination: destination}, - {Destination: destination}, - {Namespace: namespace}, - {}, - } - return subscribe(c, s.key, s.def, s.convert, prec, callback) - } -} - -func (s DestinationTypedSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdate( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func (s DestinationTypedConstrainedDefaultSetting[T]) Subscribe(c *Collection) TypedSubscribableWithDestinationFilter[T] { - return func(namespace string, destination string, callback func(T)) (T, func()) { - prec := []Constraints{ - {Namespace: namespace, Destination: destination}, - {Destination: destination}, - {Namespace: namespace}, - {}, - } - return subscribeWithConstrainedDefault(c, s.key, s.cdef, s.convert, prec, callback) - } -} - -func (s DestinationTypedConstrainedDefaultSetting[T]) dispatchUpdate(c *Collection, sub any, cvs []ConstrainedValue) { - dispatchUpdateWithConstrainedDefault( - c, - s.key, - s.convert, - sub.(*subscription[T]), - cvs, - ) -} - -func GetTypedPropertyFnFilteredByDestination[T any](value T) TypedPropertyFnWithDestinationFilter[T] { - return func(namespace string, destination string) T { - return value - } -} - diff --git a/tests/timeskipping_test.go b/tests/timeskipping_test.go index 552b2b63cd..74cda47a56 100644 --- a/tests/timeskipping_test.go +++ b/tests/timeskipping_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/google/uuid" - "github.com/stretchr/testify/suite" + "github.com/stretchr/testify/require" commandpb "go.temporal.io/api/command/v1" commonpb "go.temporal.io/api/common/v1" enumspb "go.temporal.io/api/enums/v1" @@ -23,26 +23,14 @@ import ( "google.golang.org/protobuf/types/known/fieldmaskpb" ) -type TimeSkippingTestSuite struct { - testcore.FunctionalTestBase -} - -func TestTimeSkippingTestSuite(t *testing.T) { - t.Parallel() - suite.Run(t, new(TimeSkippingTestSuite)) -} - -func (s *TimeSkippingTestSuite) SetupTest() { - s.FunctionalTestBase.SetupTest() -} - -func (s *TimeSkippingTestSuite) updateTimeSkipping( +func updateTimeSkipping( + env testcore.Env, workflowExecution *commonpb.WorkflowExecution, identity string, enabled bool, ) *workflowservice.UpdateWorkflowExecutionOptionsResponse { - resp, err := s.FrontendClient().UpdateWorkflowExecutionOptions(testcore.NewContext(), &workflowservice.UpdateWorkflowExecutionOptionsRequest{ - Namespace: s.Namespace().String(), + resp, err := env.FrontendClient().UpdateWorkflowExecutionOptions(env.Context(), &workflowservice.UpdateWorkflowExecutionOptionsRequest{ + Namespace: env.Namespace().String(), WorkflowExecution: workflowExecution, WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: enabled}, @@ -50,21 +38,21 @@ func (s *TimeSkippingTestSuite) updateTimeSkipping( UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, Identity: identity, }) - s.NoError(err) + require.NoError(env.T(), err) return resp } // TestTimeSkipping_EnabledToDisabled starts a workflow with time skipping enabled, // then disables it via UpdateWorkflowExecutionOptions. Verifies a // WorkflowExecutionOptionsUpdated event is written with Enabled=false. -func (s *TimeSkippingTestSuite) TestTimeSkipping_EnabledToDisabled() { - s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) +func TestTimeSkipping_EnabledToDisabled(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) id := "functional-timeskipping-enabled-to-disabled" tl := "functional-timeskipping-enabled-to-disabled-tq" - tv := testvars.New(s.T()).WithTaskQueue(tl) + tv := testvars.New(t).WithTaskQueue(tl) - startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: id, @@ -78,10 +66,10 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_EnabledToDisabled() { workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.GetRunId()} // Disable time skipping — a real change that must produce an options-updated event. - updateResp := s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), false) + updateResp := updateTimeSkipping(s, workflowExecution, tv.WorkerIdentity(), false) s.False(updateResp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) - poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + poller := taskpoller.New(t, s.FrontendClient(), s.Namespace().String()) _, err = poller.PollWorkflowTask( &workflowservice.PollWorkflowTaskQueueRequest{ TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, @@ -110,14 +98,14 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_EnabledToDisabled() { // TestTimeSkipping_DisabledToEnabled starts a workflow without time skipping, // then enables it via UpdateWorkflowExecutionOptions. Verifies a // WorkflowExecutionOptionsUpdated event is written with Enabled=true. -func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToEnabled() { - s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) +func TestTimeSkipping_DisabledToEnabled(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) id := "functional-timeskipping-disabled-to-enabled" tl := "functional-timeskipping-disabled-to-enabled-tq" - tv := testvars.New(s.T()).WithTaskQueue(tl) + tv := testvars.New(t).WithTaskQueue(tl) - startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: id, @@ -130,10 +118,10 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToEnabled() { workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.GetRunId()} // Enable time skipping — a real change that must produce an options-updated event. - updateResp := s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), true) + updateResp := updateTimeSkipping(s, workflowExecution, tv.WorkerIdentity(), true) s.True(updateResp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) - poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + poller := taskpoller.New(t, s.FrontendClient(), s.Namespace().String()) _, err = poller.PollWorkflowTask( &workflowservice.PollWorkflowTaskQueueRequest{ TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, @@ -162,14 +150,14 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToEnabled() { // TestTimeSkipping_DisabledToDisabled starts a workflow with time skipping enabled, // disables it, then attempts to disable it again. The second update is a no-op // and must not produce a second WorkflowExecutionOptionsUpdated event. -func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToDisabled() { - s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) +func TestTimeSkipping_DisabledToDisabled(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) id := "functional-timeskipping-disabled-to-disabled" tl := "functional-timeskipping-disabled-to-disabled-tq" - tv := testvars.New(s.T()).WithTaskQueue(tl) + tv := testvars.New(t).WithTaskQueue(tl) - startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: id, @@ -183,13 +171,13 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToDisabled() { workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.GetRunId()} // First update: enabled → disabled. This is a real change that produces an event. - s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), false) + updateTimeSkipping(s, workflowExecution, tv.WorkerIdentity(), false) // Second update: disabled → disabled again. Must be a no-op with no additional event. - updateResp := s.updateTimeSkipping(workflowExecution, tv.WorkerIdentity(), false) + updateResp := updateTimeSkipping(s, workflowExecution, tv.WorkerIdentity(), false) s.False(updateResp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) - poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + poller := taskpoller.New(t, s.FrontendClient(), s.Namespace().String()) _, err = poller.PollWorkflowTask( &workflowservice.PollWorkflowTaskQueueRequest{ TaskQueue: &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, @@ -211,12 +199,14 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_DisabledToDisabled() { // TestTimeSkipping_FeatureDisabled verifies that starting a workflow with time skipping // returns an error when the feature flag is off for the namespace. -func (s *TimeSkippingTestSuite) TestTimeSkipping_FeatureDisabled() { +func TestTimeSkipping_FeatureDisabled(t *testing.T) { // TimeSkippingEnabled defaults to false; no override needed. + s := testcore.NewEnv(t) + id := "functional-timeskipping-feature-disabled" tl := "functional-timeskipping-feature-disabled-tq" - _, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + _, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: id, @@ -229,19 +219,19 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_FeatureDisabled() { s.Error(err, "expected error when time skipping is disabled for namespace") } -// TestTimeSkipping_TimerFiresAfterSkip starts a workflow with time skipping enabled +// TestTimeSkipping_Automatic_Server starts a workflow with time skipping enabled // that mimics: sleep(1h) → check time → sleep(1h) → check time → complete. // Each sleep is a separate timer scheduled sequentially. The time-skipping mechanism // advances virtual time once per timer, completing the workflow in wall-clock seconds. // Virtual time is verified at each checkpoint via WorkflowTaskStarted event timestamps. -func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_Server() { - s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) +func TestTimeSkipping_Automatic_Server(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) id := "functional-timeskipping-timer-fires-after-skip" tl := "functional-timeskipping-timer-fires-after-skip-tq" - tv := testvars.New(s.T()).WithTaskQueue(tl) + tv := testvars.New(t).WithTaskQueue(tl) - startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: id, @@ -254,7 +244,7 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_Server() { s.NoError(err) workflowExecution := &commonpb.WorkflowExecution{WorkflowId: id, RunId: startResp.RunId} - poller := taskpoller.New(s.T(), s.FrontendClient(), s.Namespace().String()) + poller := taskpoller.New(t, s.FrontendClient(), s.Namespace().String()) taskQueue := &taskqueuepb.TaskQueue{Name: tl, Kind: enumspb.TASK_QUEUE_KIND_NORMAL} startTimer := func(id string, d time.Duration) *commandpb.Command { @@ -290,12 +280,12 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_Server() { _, err = poller.PollWorkflowTask( &workflowservice.PollWorkflowTaskQueueRequest{TaskQueue: taskQueue}, ).HandleTask(tv, func(task *workflowservice.PollWorkflowTaskQueueResponse) (*workflowservice.RespondWorkflowTaskCompletedRequest, error) { - s.True( - virtualNow(task).Sub(startTime) >= time.Hour, + s.GreaterOrEqual( + virtualNow(task).Sub(startTime), time.Hour, "expected virtual time ≥ start+1h after first skip, got %v", virtualNow(task).Sub(startTime), ) - s.True( - virtualNow(task).Sub(startTime) <= time.Hour+5*time.Second, + s.LessOrEqual( + virtualNow(task).Sub(startTime), time.Hour+5*time.Second, "expected virtual time ≤ start+1h+5s after first skip, got %v", virtualNow(task).Sub(startTime), ) return &workflowservice.RespondWorkflowTaskCompletedRequest{ @@ -308,12 +298,12 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_Server() { _, err = poller.PollWorkflowTask( &workflowservice.PollWorkflowTaskQueueRequest{TaskQueue: taskQueue}, ).HandleTask(tv, func(task *workflowservice.PollWorkflowTaskQueueResponse) (*workflowservice.RespondWorkflowTaskCompletedRequest, error) { - s.True( - virtualNow(task).Sub(startTime) >= 2*time.Hour, + s.GreaterOrEqual( + virtualNow(task).Sub(startTime), 2*time.Hour, "expected virtual time ≥ start+2h after second skip, got %v", virtualNow(task).Sub(startTime), ) - s.True( - virtualNow(task).Sub(startTime) <= 2*time.Hour+5*time.Second, + s.LessOrEqual( + virtualNow(task).Sub(startTime), 2*time.Hour+5*time.Second, "expected virtual time ≤ start+2h+5s after second skip, got %v", virtualNow(task).Sub(startTime), ) return taskpoller.CompleteWorkflowHandler(task) @@ -344,8 +334,8 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_Server() { // TestTimeSkipping_EnableMidFlight starts a workflow without time skipping, waits for // it to reach a 1h timer, then enables time skipping via UpdateWorkflowExecutionOptions. // Verifies the workflow completes quickly and workflow.Now() reflects virtual time ≈ start+1h. -func (s *TimeSkippingTestSuite) TestTimeSkipping_EnableMidFlight() { - s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) +func TestTimeSkipping_EnableMidFlight(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithSdkWorker(), testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) type result struct { StartTime time.Time @@ -361,55 +351,152 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_EnableMidFlight() { } const wfType = "timeskipping-enable-mid-flight" - s.Worker().RegisterWorkflowWithOptions(workflowFn, workflow.RegisterOptions{Name: wfType}) + s.SdkWorker().RegisterWorkflowWithOptions(workflowFn, workflow.RegisterOptions{Name: wfType}) const wfID = "functional-timeskipping-enable-mid-flight" - startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: wfID, WorkflowType: &commonpb.WorkflowType{Name: wfType}, - TaskQueue: &taskqueuepb.TaskQueue{Name: s.TaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + TaskQueue: &taskqueuepb.TaskQueue{Name: s.WorkerTaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, WorkflowRunTimeout: durationpb.New(3 * time.Hour), // No TimeSkippingConfig — time skipping disabled at start. }) s.NoError(err) - // Give the SDK worker time to execute the first WorkflowTask and schedule the timer. - time.Sleep(1 * time.Second) + // Wait for the SDK worker to execute the first WorkflowTask and schedule the timer. + wfExec := &commonpb.WorkflowExecution{WorkflowId: wfID, RunId: startResp.RunId} + s.Eventually(func() bool { + history := s.GetHistory(s.Namespace().String(), wfExec) + for _, e := range history { + if e.GetEventType() == enumspb.EVENT_TYPE_TIMER_STARTED { + return true + } + } + return false + }, 10*time.Second, 100*time.Millisecond, "expected timer to be scheduled before enabling time skipping") + // Enable time skipping mid-flight — the already-scheduled 1h timer should fire virtually. - s.updateTimeSkipping(&commonpb.WorkflowExecution{WorkflowId: wfID, RunId: startResp.RunId}, "test", true) - // The time-skip fires the 1h timer virtually; give the task executor and SDK worker - // a few seconds to complete the chain (two timer tasks + one workflow task). - ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) - defer cancel() + updateTimeSkipping(s, wfExec, "test", true) + var res result - s.NoError(s.SdkClient().GetWorkflow(context.Background(), wfID, startResp.RunId).Get(ctx, &res)) + s.NoError(s.SdkClient().GetWorkflow(s.Context(), wfID, startResp.RunId).Get(s.Context(), &res)) elapsed := res.TimeAfterSleep.Sub(res.StartTime) - s.True(elapsed >= time.Hour, + s.GreaterOrEqual(elapsed, time.Hour, "expected virtual time ≥ start+1h after skip, got %v", elapsed) fmt.Println("time elapsed: ", elapsed.Minutes()) - s.True(elapsed <= time.Hour+10*time.Second, + s.LessOrEqual(elapsed, time.Hour+10*time.Second, "expected virtual time ≤ start+1h+5s after skip, got %v", elapsed) } -// TestTimeSkipping_SDK_UserTimers uses a real SDK worker to run a workflow that: +// TestTimeSkipping_ParentChild tests that a parent workflow correctly receives results +// from a child workflow that contains a time-skipped sleep. +// The parent starts a child with a fixed WorkflowID. Once the child's timer is +// scheduled, time skipping is enabled on the child mid-flight. The parent waits +// for the child to complete and verifies virtual time advanced by ~1h. +func TestTimeSkipping_ParentChild(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithSdkWorker(), testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) + + type childResult struct { + StartTime time.Time + TimeAfterSleep time.Time + } + + const childWfType = "timeskipping-parent-child-child" + const childWfID = "functional-timeskipping-parent-child-child" + wallClockStartTime := time.Now() + + childWorkflowFn := func(ctx workflow.Context) (childResult, error) { + start := workflow.Now(ctx) + if err := workflow.Sleep(ctx, time.Hour); err != nil { + return childResult{}, err + } + return childResult{start, workflow.Now(ctx)}, nil + } + + parentWorkflowFn := func(ctx workflow.Context) (childResult, error) { + childCtx := workflow.WithChildOptions(ctx, workflow.ChildWorkflowOptions{ + WorkflowID: childWfID, + WorkflowExecutionTimeout: 2 * time.Hour, + }) + var res childResult + if err := workflow.ExecuteChildWorkflow(childCtx, childWfType).Get(ctx, &res); err != nil { + return childResult{}, err + } + return res, nil + } + + const parentWfType = "timeskipping-parent-child-parent" + s.SdkWorker().RegisterWorkflowWithOptions(childWorkflowFn, workflow.RegisterOptions{Name: childWfType}) + s.SdkWorker().RegisterWorkflowWithOptions(parentWorkflowFn, workflow.RegisterOptions{Name: parentWfType}) + + const parentWfID = "functional-timeskipping-parent-child-parent" + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ + RequestId: uuid.NewString(), + Namespace: s.Namespace().String(), + WorkflowId: parentWfID, + WorkflowType: &commonpb.WorkflowType{Name: parentWfType}, + TaskQueue: &taskqueuepb.TaskQueue{Name: s.WorkerTaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + WorkflowRunTimeout: durationpb.New(3 * time.Hour), + }) + s.NoError(err) + + // Wait for the child workflow's timer to be scheduled. + childExec := &commonpb.WorkflowExecution{WorkflowId: childWfID} + s.Eventually(func() bool { + resp, err := s.FrontendClient().GetWorkflowExecutionHistory(s.Context(), &workflowservice.GetWorkflowExecutionHistoryRequest{ + Namespace: s.Namespace().String(), + Execution: childExec, + }) + if err != nil { + return false + } + for _, e := range resp.History.GetEvents() { + if e.GetEventType() == enumspb.EVENT_TYPE_TIMER_STARTED { + return true + } + } + return false + }, 10*time.Second, 100*time.Millisecond, "expected child timer to be scheduled before enabling time skipping") + + // Enable time skipping on the child mid-flight so its 1h timer fires virtually. + // todo: @feiyang - this can be discussed as to be a default behavior, + // right now child doesn't inherit the time skipping config from the parent, + updateTimeSkipping(s, childExec, "test", true) + + // Parent should complete once the child's timer fires and the child returns its result. + var res childResult + s.NoError(s.SdkClient().GetWorkflow(s.Context(), parentWfID, startResp.RunId).Get(s.Context(), &res)) + + elapsed := res.TimeAfterSleep.Sub(res.StartTime) + s.GreaterOrEqual(elapsed, time.Hour, + "expected child virtual time >= start+1h after skip, got %v", elapsed) + s.LessOrEqual(elapsed, time.Hour+5*time.Second, + "expected child virtual time <= start+1h+5s after skip, got %v", elapsed) + // check this testing finishes in 1 minute + s.LessOrEqual(time.Since(wallClockStartTime), 1*time.Minute, + "expected child virtual time <= 1 minute after skip, got %v", time.Since(wallClockStartTime)) + +} + +// TestTimeSkipping_Automatic_SDKIntegration uses a real SDK worker to run a workflow that: // 1. sleep(1h) — skipped virtually // 2. run a dummy activity — must complete without timeout // 3. sleep(1h) — skipped virtually // // Verifies that workflow.Now() reflects virtual time at each checkpoint, and that // the activity completes successfully (time skipping does not cause spurious timeouts). -func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_SDKIntegration() { - s.OverrideDynamicConfig(dynamicconfig.TimeSkippingEnabled, true) +func TestTimeSkipping_Automatic_SDKIntegration(t *testing.T) { + s := testcore.NewEnv(t, testcore.WithSdkWorker(), testcore.WithDynamicConfig(dynamicconfig.TimeSkippingEnabled, true)) // Dummy activity — returns immediately with the real wall-clock time it ran at, // so the test can confirm it executed well within its timeout window. activityFn := func(ctx context.Context) (time.Time, error) { return time.Now(), nil } - s.Worker().RegisterActivity(activityFn) + s.SdkWorker().RegisterActivity(activityFn) type result struct { StartTime time.Time @@ -446,43 +533,43 @@ func (s *TimeSkippingTestSuite) TestTimeSkipping_Automatic_SDKIntegration() { // Register with an explicit name so we can pass it to the gRPC start request. const wfType = "timeskipping-sdk-sleep-workflow" - s.Worker().RegisterWorkflowWithOptions(workflowFn, workflow.RegisterOptions{Name: wfType}) + s.SdkWorker().RegisterWorkflowWithOptions(workflowFn, workflow.RegisterOptions{Name: wfType}) // The SDK's StartWorkflowOptions does not expose TimeSkippingConfig yet, so start // via the gRPC frontend directly, then obtain the run handle from SdkClient. const wfID = "functional-timeskipping-sdk-user-timers" - startResp, err := s.FrontendClient().StartWorkflowExecution(testcore.NewContext(), &workflowservice.StartWorkflowExecutionRequest{ + startResp, err := s.FrontendClient().StartWorkflowExecution(s.Context(), &workflowservice.StartWorkflowExecutionRequest{ RequestId: uuid.NewString(), Namespace: s.Namespace().String(), WorkflowId: wfID, WorkflowType: &commonpb.WorkflowType{Name: wfType}, - TaskQueue: &taskqueuepb.TaskQueue{Name: s.TaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, + TaskQueue: &taskqueuepb.TaskQueue{Name: s.WorkerTaskQueue(), Kind: enumspb.TASK_QUEUE_KIND_NORMAL}, WorkflowRunTimeout: durationpb.New(3 * time.Hour), TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, }) s.NoError(err) - run := s.SdkClient().GetWorkflow(context.Background(), wfID, startResp.RunId) + run := s.SdkClient().GetWorkflow(s.Context(), wfID, startResp.RunId) var res result - s.NoError(run.Get(context.Background(), &res)) + s.NoError(run.Get(s.Context(), &res)) // workflow.Now() after first sleep should be ~1h after start - s.True(res.TimeAfterFirstSleep.Sub(res.StartTime) >= time.Hour, + s.GreaterOrEqual(res.TimeAfterFirstSleep.Sub(res.StartTime), time.Hour, "expected virtual time ≥ start+1h after first sleep, got %v", res.TimeAfterFirstSleep.Sub(res.StartTime)) - s.True(res.TimeAfterFirstSleep.Sub(res.StartTime) <= time.Hour+3*time.Second, + s.LessOrEqual(res.TimeAfterFirstSleep.Sub(res.StartTime), time.Hour+3*time.Second, "expected virtual time ≤ start+1h+3s after first sleep, got %v", res.TimeAfterFirstSleep.Sub(res.StartTime)) // The activity ran at a real wall-clock time after the first skip, so its real // execution time must be within the 10-second start-to-close timeout window. s.True(res.ActivityRealTime.After(res.StartTime), "activity should have run after workflow start") - s.True(time.Since(res.ActivityRealTime) < 30*time.Second, + s.Less(time.Since(res.ActivityRealTime), 30*time.Second, "activity real execution time should be recent (within test wall-clock), got %v ago", time.Since(res.ActivityRealTime)) // workflow.Now() after second sleep should be ~2h after start - s.True(res.TimeAfterSecondSleep.Sub(res.StartTime) >= 2*time.Hour, + s.GreaterOrEqual(res.TimeAfterSecondSleep.Sub(res.StartTime), 2*time.Hour, "expected virtual time ≥ start+2h after second sleep, got %v", res.TimeAfterSecondSleep.Sub(res.StartTime)) - s.True(res.TimeAfterSecondSleep.Sub(res.StartTime) <= 2*time.Hour+3*time.Second, + s.LessOrEqual(res.TimeAfterSecondSleep.Sub(res.StartTime), 2*time.Hour+3*time.Second, "expected virtual time ≤ start+2h+3s after second sleep, got %v", res.TimeAfterSecondSleep.Sub(res.StartTime)) } From bf7afc17eaaf9dd6ee9c20ad1f05f54a64fc68dd Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Mon, 23 Mar 2026 18:07:39 -0700 Subject: [PATCH 5/7] add metrics for enable and disable time-skipping --- .../clock}/time_skipping_time_source.go | 42 ++-- .../clock}/time_skipping_time_source_test.go | 57 +++--- go.sum | 8 - service/frontend/workflow_handler_test.go | 183 ++++++++++++++++++ service/history/api/startworkflow/api.go | 5 + .../history/api/updateworkflowoptions/api.go | 10 + .../historybuilder/history_builder_test.go | 1 + .../history/workflow/mutable_state_impl.go | 31 +-- .../workflow/mutable_state_impl_test.go | 9 +- 9 files changed, 269 insertions(+), 77 deletions(-) rename {service/history/workflow => common/clock}/time_skipping_time_source.go (55%) rename {service/history/workflow => common/clock}/time_skipping_time_source_test.go (64%) diff --git a/service/history/workflow/time_skipping_time_source.go b/common/clock/time_skipping_time_source.go similarity index 55% rename from service/history/workflow/time_skipping_time_source.go rename to common/clock/time_skipping_time_source.go index 5d00d989a8..8691c0a160 100644 --- a/service/history/workflow/time_skipping_time_source.go +++ b/common/clock/time_skipping_time_source.go @@ -1,10 +1,10 @@ -package workflow +package clock import ( "time" persistencespb "go.temporal.io/server/api/persistence/v1" - "go.temporal.io/server/common/clock" + "google.golang.org/protobuf/types/known/timestamppb" ) // TimeSkippingTimeSource wraps a real TimeSource and adds a virtual time offset. @@ -12,18 +12,18 @@ import ( // The offset accumulates across skip events and is reconstructed from persisted // TimeSkippedDetails on workflow reload — no separate field needs to be persisted. type TimeSkippingTimeSource struct { - base clock.TimeSource + base TimeSource offset time.Duration } -var _ clock.TimeSource = (*TimeSkippingTimeSource)(nil) +var _ TimeSource = (*TimeSkippingTimeSource)(nil) // newTimeSkippingTimeSource creates a TimeSkippingTimeSource whose offset is the sum of all // previously skipped durations. Pass nil or empty details when starting a new workflow. -func newTimeSkippingTimeSource(base clock.TimeSource, details []*persistencespb.TimeSkippedDetails) *TimeSkippingTimeSource { +func NewTimeSkippingTimeSource(base TimeSource, details []*persistencespb.TimeSkippedDetails) *TimeSkippingTimeSource { return &TimeSkippingTimeSource{ base: base, - offset: computeTotalSkippedOffset(details), + offset: ComputeTotalSkippedOffset(details), } } @@ -38,25 +38,43 @@ func (ts *TimeSkippingTimeSource) Since(t time.Time) time.Duration { } // AfterFunc delegates to the base time source. OS-level timers run on real wall clock. -func (ts *TimeSkippingTimeSource) AfterFunc(d time.Duration, f func()) clock.Timer { +func (ts *TimeSkippingTimeSource) AfterFunc(d time.Duration, f func()) Timer { return ts.base.AfterFunc(d, f) } // NewTimer delegates to the base time source. OS-level timers run on real wall clock. -func (ts *TimeSkippingTimeSource) NewTimer(d time.Duration) (<-chan time.Time, clock.Timer) { +func (ts *TimeSkippingTimeSource) NewTimer(d time.Duration) (<-chan time.Time, Timer) { return ts.base.NewTimer(d) } // advance increases the virtual time offset by d. -func (ts *TimeSkippingTimeSource) advance(d time.Duration) { +func (ts *TimeSkippingTimeSource) Advance(d time.Duration) { ts.offset += d } -// computeTotalSkippedOffset sums all DurationToSkip values from persisted TimeSkippedDetails. -func computeTotalSkippedOffset(details []*persistencespb.TimeSkippedDetails) time.Duration { +// ComputeTotalSkippedOffset sums all DurationToSkip values from persisted TimeSkippedDetails. +func ComputeTotalSkippedOffset(details []*persistencespb.TimeSkippedDetails) time.Duration { var total time.Duration for _, d := range details { - total += timeSkippedDurationFromTimestamp(d.GetDurationToSkip()) + total += TimeSkippedDurationFromTimestamp(d.GetDurationToSkip()) } return total } + +// TimeSkippedDurationToTimestamp encodes a time.Duration into a *timestamppb.Timestamp +// by storing seconds and nanoseconds directly in the Timestamp fields. +// This is a convention for the DurationToSkip field in TimeSkippedDetails. +func TimeSkippedDurationToTimestamp(d time.Duration) *timestamppb.Timestamp { + return ×tamppb.Timestamp{ + Seconds: int64(d / time.Second), + Nanos: int32(d % time.Second), + } +} + +// TimeSkippedDurationFromTimestamp reverses TimeSkippedDurationToTimestamp. +func TimeSkippedDurationFromTimestamp(ts *timestamppb.Timestamp) time.Duration { + if ts == nil { + return 0 + } + return time.Duration(ts.GetSeconds())*time.Second + time.Duration(ts.GetNanos()) +} diff --git a/service/history/workflow/time_skipping_time_source_test.go b/common/clock/time_skipping_time_source_test.go similarity index 64% rename from service/history/workflow/time_skipping_time_source_test.go rename to common/clock/time_skipping_time_source_test.go index 33132b834f..caf88d92f8 100644 --- a/service/history/workflow/time_skipping_time_source_test.go +++ b/common/clock/time_skipping_time_source_test.go @@ -1,4 +1,4 @@ -package workflow +package clock import ( "testing" @@ -6,26 +6,25 @@ import ( "github.com/stretchr/testify/assert" persistencespb "go.temporal.io/server/api/persistence/v1" - "go.temporal.io/server/common/clock" "google.golang.org/protobuf/types/known/timestamppb" ) func TestTimeSkippingTimeSource_NowWithNoSkip(t *testing.T) { - base := clock.NewEventTimeSource() + base := NewEventTimeSource() base.Update(time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC)) - ts := newTimeSkippingTimeSource(base, nil) + ts := NewTimeSkippingTimeSource(base, nil) assert.Equal(t, base.Now(), ts.Now()) } func TestTimeSkippingTimeSource_NowAfterAdvance(t *testing.T) { - base := clock.NewEventTimeSource() + base := NewEventTimeSource() realNow := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) base.Update(realNow) - ts := newTimeSkippingTimeSource(base, nil) - ts.advance(24 * time.Hour) + ts := NewTimeSkippingTimeSource(base, nil) + ts.Advance(24 * time.Hour) assert.Equal(t, realNow.Add(24*time.Hour), ts.Now()) // base is unchanged @@ -33,40 +32,40 @@ func TestTimeSkippingTimeSource_NowAfterAdvance(t *testing.T) { } func TestTimeSkippingTimeSource_NowWithMultipleAdvances(t *testing.T) { - base := clock.NewEventTimeSource() + base := NewEventTimeSource() realNow := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) base.Update(realNow) - ts := newTimeSkippingTimeSource(base, nil) - ts.advance(24 * time.Hour) - ts.advance(48 * time.Hour) + ts := NewTimeSkippingTimeSource(base, nil) + ts.Advance(24 * time.Hour) + ts.Advance(48 * time.Hour) assert.Equal(t, realNow.Add(72*time.Hour), ts.Now()) } func TestTimeSkippingTimeSource_ReconstructedFromPersistedDetails(t *testing.T) { - base := clock.NewEventTimeSource() + base := NewEventTimeSource() realNow := time.Date(2025, 6, 1, 12, 0, 0, 0, time.UTC) base.Update(realNow) // Simulate two previously persisted skip events: 10h + 5h = 15h total offset details := []*persistencespb.TimeSkippedDetails{ - {DurationToSkip: timeSkippedDurationToTimestamp(10 * time.Hour)}, - {DurationToSkip: timeSkippedDurationToTimestamp(5 * time.Hour)}, + {DurationToSkip: TimeSkippedDurationToTimestamp(10 * time.Hour)}, + {DurationToSkip: TimeSkippedDurationToTimestamp(5 * time.Hour)}, } - ts := newTimeSkippingTimeSource(base, details) + ts := NewTimeSkippingTimeSource(base, details) assert.Equal(t, realNow.Add(15*time.Hour), ts.Now()) } func TestTimeSkippingTimeSource_Since(t *testing.T) { - base := clock.NewEventTimeSource() + base := NewEventTimeSource() realNow := time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC) base.Update(realNow) - ts := newTimeSkippingTimeSource(base, nil) - ts.advance(10 * time.Hour) + ts := NewTimeSkippingTimeSource(base, nil) + ts.Advance(10 * time.Hour) past := realNow.Add(-5 * time.Hour) // 5 hours before real now // virtual now = realNow + 10h, so since(past) = 15h @@ -74,10 +73,10 @@ func TestTimeSkippingTimeSource_Since(t *testing.T) { } func TestTimeSkippingTimeSource_DelegatesTimersToBase(t *testing.T) { - base := clock.NewEventTimeSource() + base := NewEventTimeSource() base.Update(time.Now()) - ts := newTimeSkippingTimeSource(base, nil) + ts := NewTimeSkippingTimeSource(base, nil) fired := false ts.AfterFunc(time.Millisecond, func() { fired = true }) @@ -88,16 +87,16 @@ func TestTimeSkippingTimeSource_DelegatesTimersToBase(t *testing.T) { func TestComputeTotalSkippedOffset(t *testing.T) { details := []*persistencespb.TimeSkippedDetails{ - {DurationToSkip: timeSkippedDurationToTimestamp(3 * time.Hour)}, - {DurationToSkip: timeSkippedDurationToTimestamp(7 * time.Hour)}, - {DurationToSkip: timeSkippedDurationToTimestamp(2 * time.Hour)}, + {DurationToSkip: TimeSkippedDurationToTimestamp(3 * time.Hour)}, + {DurationToSkip: TimeSkippedDurationToTimestamp(7 * time.Hour)}, + {DurationToSkip: TimeSkippedDurationToTimestamp(2 * time.Hour)}, } - assert.Equal(t, 12*time.Hour, computeTotalSkippedOffset(details)) + assert.Equal(t, 12*time.Hour, ComputeTotalSkippedOffset(details)) } func TestComputeTotalSkippedOffset_Empty(t *testing.T) { - assert.Equal(t, time.Duration(0), computeTotalSkippedOffset(nil)) - assert.Equal(t, time.Duration(0), computeTotalSkippedOffset([]*persistencespb.TimeSkippedDetails{})) + assert.Equal(t, time.Duration(0), ComputeTotalSkippedOffset(nil)) + assert.Equal(t, time.Duration(0), ComputeTotalSkippedOffset([]*persistencespb.TimeSkippedDetails{})) } // roundtrip helper — verifies encoding/decoding is consistent @@ -111,11 +110,11 @@ func TestTimeSkippedDurationRoundtrip(t *testing.T) { time.Hour + 30*time.Minute + 15*time.Second, } for _, d := range durations { - ts := timeSkippedDurationToTimestamp(d) - assert.Equal(t, d, timeSkippedDurationFromTimestamp(ts)) + ts := TimeSkippedDurationToTimestamp(d) + assert.Equal(t, d, TimeSkippedDurationFromTimestamp(ts)) } } func TestTimeSkippedDurationFromTimestamp_Nil(t *testing.T) { - assert.Equal(t, time.Duration(0), timeSkippedDurationFromTimestamp((*timestamppb.Timestamp)(nil))) + assert.Equal(t, time.Duration(0), TimeSkippedDurationFromTimestamp((*timestamppb.Timestamp)(nil))) } diff --git a/go.sum b/go.sum index d072a96ee5..c946d3414e 100644 --- a/go.sum +++ b/go.sum @@ -376,14 +376,6 @@ go.opentelemetry.io/otel/trace v1.40.0 h1:WA4etStDttCSYuhwvEa8OP8I5EWu24lkOzp+ZY go.opentelemetry.io/otel/trace v1.40.0/go.mod h1:zeAhriXecNGP/s2SEG3+Y8X9ujcJOTqQ5RgdEJcawiA= go.opentelemetry.io/proto/otlp v1.7.1 h1:gTOMpGDb0WTBOP8JaO72iL3auEZhVmAQg4ipjOVAtj4= go.opentelemetry.io/proto/otlp v1.7.1/go.mod h1:b2rVh6rfI/s2pHWNlB7ILJcRALpcNDzKhACevjI+ZnE= -go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574 h1:qVCgcJueXcPgE+gxlMLKBL1MlqKDt5kSVnYbtatqKoc= -go.temporal.io/api v1.62.3-0.20260320224503-70c9aa7ab574/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= -go.temporal.io/api v1.62.3-0.20260322204713-45a5a58b7284 h1:sXFawfZekEFr+w/9umRqmNp2oK1985ek/JfKr/pZyxc= -go.temporal.io/api v1.62.3-0.20260322204713-45a5a58b7284/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= -go.temporal.io/api v1.62.3-0.20260322205303-ac66c14c6f53 h1:ICjBBnQrF235sHeiF8dKzzADc7FJmaURWLR1SdoKklE= -go.temporal.io/api v1.62.3-0.20260322205303-ac66c14c6f53/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= -go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019 h1:0ZYkwnj9HlPBCB+JGev5qjGe3Fe57wxnzVM8zVu4pPI= -go.temporal.io/api v1.62.3-0.20260322212819-96d1ad9a7019/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.temporal.io/api v1.62.5-0.20260323233506-7011abe4c28d h1:EdQsq0dRCYVrvE6mPDyUdM7j/+HE7FRHE7WqGhlIs/8= go.temporal.io/api v1.62.5-0.20260323233506-7011abe4c28d/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.temporal.io/sdk v1.38.0 h1:4Bok5LEdED7YKpsSjIa3dDqram5VOq+ydBf4pyx0Wo4= diff --git a/service/frontend/workflow_handler_test.go b/service/frontend/workflow_handler_test.go index 97986c86bf..df54d5498b 100644 --- a/service/frontend/workflow_handler_test.go +++ b/service/frontend/workflow_handler_test.go @@ -3239,6 +3239,189 @@ func (s *WorkflowHandlerSuite) TestValidateTimeSkippingConfig() { s.NoError(wh.validateTimeSkippingConfig(&workflowpb.TimeSkippingConfig{Enabled: true}, s.testNamespace)) } +// TestStartWorkflowExecution_TimeSkipping_DCDisabled verifies that requesting time skipping when the +// dynamic-config gate is off returns an InvalidArgument error before the history client is called. +// Note: validateTimeSkippingConfig fires after unaliasedSearchAttributesFrom inside +// prepareStartWorkflowRequest, so the SA-mapper mock must be set up even for the error path. +func (s *WorkflowHandlerSuite) TestStartWorkflowExecution_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + s.mockSearchAttributesMapperProvider.EXPECT().GetMapper(gomock.Any()).Return(nil, nil) + + _, err := wh.StartWorkflowExecution(context.Background(), &workflowservice.StartWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowId: "workflow-id", + WorkflowType: &commonpb.WorkflowType{Name: "workflow-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: "task-queue"}, + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(err, &invalidArg) + s.ErrorContains(err, "Time skipping is not enabled") +} + +// TestStartWorkflowExecution_TimeSkipping_DCEnabled verifies that when the gate is on, the +// time-skipping config is forwarded to the history client. +func (s *WorkflowHandlerSuite) TestStartWorkflowExecution_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockSearchAttributesMapperProvider.EXPECT().GetMapper(gomock.Any()).Return(nil, nil) + s.mockNamespaceCache.EXPECT().GetNamespaceID(s.testNamespace).Return(s.testNamespaceID, nil) + s.mockHistoryClient.EXPECT().StartWorkflowExecution(gomock.Any(), mock.MatchedBy(func(req *historyservice.StartWorkflowExecutionRequest) bool { + return req.GetStartRequest().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.StartWorkflowExecutionResponse{}, nil) + + _, err := wh.StartWorkflowExecution(context.Background(), &workflowservice.StartWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowId: "workflow-id", + WorkflowType: &commonpb.WorkflowType{Name: "workflow-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: "task-queue"}, + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.NoError(err) +} + +// TestSignalWithStartWorkflowExecution_TimeSkipping_DCDisabled verifies the DC gate for +// SignalWithStart. validateTimeSkippingConfig fires before unaliasedSearchAttributesFrom in this +// handler, so no mapper mock is needed on the error path. +func (s *WorkflowHandlerSuite) TestSignalWithStartWorkflowExecution_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + + _, err := wh.SignalWithStartWorkflowExecution(context.Background(), &workflowservice.SignalWithStartWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowId: "workflow-id", + WorkflowType: &commonpb.WorkflowType{Name: "workflow-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: "task-queue"}, + SignalName: "my-signal", + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(err, &invalidArg) + s.ErrorContains(err, "Time skipping is not enabled") +} + +// TestSignalWithStartWorkflowExecution_TimeSkipping_DCEnabled verifies that when the gate is on, +// the time-skipping config reaches the history client. +func (s *WorkflowHandlerSuite) TestSignalWithStartWorkflowExecution_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockSearchAttributesMapperProvider.EXPECT().GetMapper(gomock.Any()).Return(nil, nil) + s.mockNamespaceCache.EXPECT().GetNamespaceID(s.testNamespace).Return(s.testNamespaceID, nil) + s.mockHistoryClient.EXPECT().SignalWithStartWorkflowExecution(gomock.Any(), mock.MatchedBy(func(req *historyservice.SignalWithStartWorkflowExecutionRequest) bool { + return req.GetSignalWithStartRequest().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.SignalWithStartWorkflowExecutionResponse{Started: true}, nil) + + _, err := wh.SignalWithStartWorkflowExecution(context.Background(), &workflowservice.SignalWithStartWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowId: "workflow-id", + WorkflowType: &commonpb.WorkflowType{Name: "workflow-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: "task-queue"}, + SignalName: "my-signal", + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }) + s.NoError(err) +} + +// TestExecuteMultiOperation_TimeSkipping_DCDisabled verifies that when the DC gate is off, +// a Start-with-time-skipping inside ExecuteMultiOperation is rejected. The error is wrapped +// as a MultiOperationExecution error with the per-operation InvalidArgument at index 0. +func (s *WorkflowHandlerSuite) TestExecuteMultiOperation_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + // Namespace lookup happens before operation validation. + s.mockNamespaceCache.EXPECT().GetNamespaceID(namespace.Name(s.testNamespace.String())).Return(s.testNamespaceID, nil) + // The SA mapper is called inside prepareStartWorkflowRequest before validateTimeSkippingConfig. + s.mockSearchAttributesMapperProvider.EXPECT().GetMapper(gomock.Any()).Return(nil, nil) + + _, err := wh.ExecuteMultiOperation(context.Background(), &workflowservice.ExecuteMultiOperationRequest{ + Namespace: s.testNamespace.String(), + Operations: []*workflowservice.ExecuteMultiOperationRequest_Operation{ + { + Operation: &workflowservice.ExecuteMultiOperationRequest_Operation_StartWorkflow{ + StartWorkflow: &workflowservice.StartWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowId: "WORKFLOW_ID", + WorkflowType: &commonpb.WorkflowType{Name: "workflow-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: "task-queue"}, + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + }, + }, + { + Operation: &workflowservice.ExecuteMultiOperationRequest_Operation_UpdateWorkflow{ + UpdateWorkflow: &workflowservice.UpdateWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: "WORKFLOW_ID"}, + Request: &updatepb.Request{ + Meta: &updatepb.Meta{UpdateId: "UPDATE_ID"}, + Input: &updatepb.Input{Name: "NAME"}, + }, + }, + }, + }, + }, + }) + s.Equal("Update-with-Start could not be executed.", err.Error()) + var multiOpErr *serviceerror.MultiOperationExecution + s.ErrorAs(err, &multiOpErr) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(multiOpErr.OperationErrors()[0], &invalidArg) + s.ErrorContains(multiOpErr.OperationErrors()[0], "Time skipping is not enabled") +} + +// TestUpdateWorkflowExecutionOptions_TimeSkipping_DCDisabled verifies the DC gate for +// UpdateWorkflowExecutionOptions. The validation fires before the namespace lookup, so +// no namespace or history-client mock is needed. +func (s *WorkflowHandlerSuite) TestUpdateWorkflowExecutionOptions_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + + _, err := wh.UpdateWorkflowExecutionOptions(context.Background(), &workflowservice.UpdateWorkflowExecutionOptionsRequest{ + Namespace: s.testNamespace.String(), + WorkflowExecution: &commonpb.WorkflowExecution{ + WorkflowId: "workflow-id", + }, + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(err, &invalidArg) + s.ErrorContains(err, "Time skipping is not enabled") +} + +// TestUpdateWorkflowExecutionOptions_TimeSkipping_DCEnabled verifies that when the gate is on, +// the time-skipping config is forwarded to the history client. +func (s *WorkflowHandlerSuite) TestUpdateWorkflowExecutionOptions_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockNamespaceCache.EXPECT().GetNamespaceID(s.testNamespace).Return(s.testNamespaceID, nil) + s.mockHistoryClient.EXPECT().UpdateWorkflowExecutionOptions(gomock.Any(), mock.MatchedBy(func(req *historyservice.UpdateWorkflowExecutionOptionsRequest) bool { + return req.GetUpdateRequest().GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.UpdateWorkflowExecutionOptionsResponse{}, nil) + + _, err := wh.UpdateWorkflowExecutionOptions(context.Background(), &workflowservice.UpdateWorkflowExecutionOptionsRequest{ + Namespace: s.testNamespace.String(), + WorkflowExecution: &commonpb.WorkflowExecution{ + WorkflowId: "workflow-id", + }, + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }) + s.NoError(err) +} + func (s *WorkflowHandlerSuite) newConfig() *Config { return NewConfig(dc.NewNoopCollection(), numHistoryShards) } diff --git a/service/history/api/startworkflow/api.go b/service/history/api/startworkflow/api.go index db570576f7..fde932928a 100644 --- a/service/history/api/startworkflow/api.go +++ b/service/history/api/startworkflow/api.go @@ -162,6 +162,11 @@ func (s *Starter) prepare(ctx context.Context) error { request.RequestEagerExecution = false } } + + if tsc := request.GetTimeSkippingConfig(); tsc != nil && tsc.GetEnabled() { + metrics.ExecutionTimeSkippingEnabledCount.With(s.getMetricsHandler()).Record(1) + } + return nil } diff --git a/service/history/api/updateworkflowoptions/api.go b/service/history/api/updateworkflowoptions/api.go index feee12b02e..c9a2a6e88e 100644 --- a/service/history/api/updateworkflowoptions/api.go +++ b/service/history/api/updateworkflowoptions/api.go @@ -10,6 +10,7 @@ import ( "go.temporal.io/server/api/historyservice/v1" "go.temporal.io/server/api/matchingservice/v1" "go.temporal.io/server/common/definition" + "go.temporal.io/server/common/metrics" "go.temporal.io/server/common/namespace" "go.temporal.io/server/common/util" "go.temporal.io/server/common/worker_versioning" @@ -84,6 +85,7 @@ func Invoke( return nil, err } + oldTimeSkippingConfig := getOptionsFromMutableState(mutableState).GetTimeSkippingConfig() mergedOpts, hasChanges, err := MergeAndApply(mutableState, requestedOptions, req.GetUpdateMask(), req.GetIdentity()) if err != nil { return nil, err @@ -91,6 +93,14 @@ func Invoke( // Set options for gRPC response ret.WorkflowExecutionOptions = mergedOpts + if hasChanges && !proto.Equal(mergedOpts.GetTimeSkippingConfig(), oldTimeSkippingConfig) { + if mergedOpts.GetTimeSkippingConfig().GetEnabled() { + metrics.ExecutionTimeSkippingEnabledCount.With(shardCtx.GetMetricsHandler()).Record(1) + } else { + metrics.ExecutionTimeSkippingDisabledCount.With(shardCtx.GetMetricsHandler()).Record(1) + } + } + // If there is no mutable state change at all, return with no new history event and Noop=true if !hasChanges { return &api.UpdateWorkflowAction{ diff --git a/service/history/historybuilder/history_builder_test.go b/service/history/historybuilder/history_builder_test.go index cd73332543..ff1757578b 100644 --- a/service/history/historybuilder/history_builder_test.go +++ b/service/history/historybuilder/history_builder_test.go @@ -2227,6 +2227,7 @@ func (s *historyBuilderSuite) TestBufferEvent() { enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TERMINATED: true, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CONTINUED_AS_NEW: true, enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_CANCELED: true, + enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED: true, } // workflow task events will be assign event ID immediately diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 0c80b2d03d..906847a840 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -503,7 +503,7 @@ func NewMutableStateFromDB( mutableState.executionInfo = dbRecord.ExecutionInfo if mutableState.executionInfo.GetTimeSkippingInfo().GetEnabled() { - mutableState.timeSource = newTimeSkippingTimeSource( + mutableState.timeSource = clock.NewTimeSkippingTimeSource( mutableState.timeSource, mutableState.executionInfo.TimeSkippingInfo.TimeSkippedDetails, ) @@ -2763,7 +2763,7 @@ func (ms *MutableStateImpl) AddWorkflowExecutionStartedEventWithOptions( ms.executionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{ Enabled: true, } - ms.timeSource = newTimeSkippingTimeSource(ms.timeSource, nil) + ms.timeSource = clock.NewTimeSkippingTimeSource(ms.timeSource, nil) } // Versioning Override set on StartWorkflowExecutionRequest @@ -3959,8 +3959,8 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.C executionInfo.TimeSkippingInfo.TimeSkippedDetails, newDetails, ) - if ts, ok := ms.timeSource.(*TimeSkippingTimeSource); ok { - ts.advance(timeSkippedDurationFromTimestamp(newDetails.GetDurationToSkip())) + if ts, ok := ms.timeSource.(*clock.TimeSkippingTimeSource); ok { + ts.Advance(clock.TimeSkippedDurationFromTimestamp(newDetails.GetDurationToSkip())) } return NewTaskRefresher(ms.shard).Refresh(ctx, ms, false) } @@ -3993,28 +3993,11 @@ func buildTimeSkippedDetails( return &persistencespb.TimeSkippedDetails{ RealTimeWhenSkipped: event.GetEventTime(), VirtualTimeWhenSkipped: timestamppb.New(virtualTimeWhenSkipped), - DurationToSkip: timeSkippedDurationToTimestamp(skipDuration), + DurationToSkip: clock.TimeSkippedDurationToTimestamp(skipDuration), TargetVirtualTime: attrs.GetToTime(), } } -// timeSkippedDurationToTimestamp encodes a time.Duration into a *timestamppb.Timestamp -// by storing seconds and nanoseconds directly in the Timestamp fields. -// This is a convention for the DurationToSkip field in TimeSkippedDetails. -func timeSkippedDurationToTimestamp(d time.Duration) *timestamppb.Timestamp { - return ×tamppb.Timestamp{ - Seconds: int64(d / time.Second), - Nanos: int32(d % time.Second), - } -} - -// timeSkippedDurationFromTimestamp reverses timeSkippedDurationToTimestamp. -func timeSkippedDurationFromTimestamp(ts *timestamppb.Timestamp) time.Duration { - if ts == nil { - return 0 - } - return time.Duration(ts.GetSeconds())*time.Second + time.Duration(ts.GetNanos()) -} // VirtualTimeNow returns the current effective time for this workflow. // For workflows with time skipping enabled, this returns the virtual (advanced) time. @@ -5607,8 +5590,8 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionOptionsUpdatedEvent(event *his ms.executionInfo.TimeSkippingInfo.Enabled = tsc.GetEnabled() if tsc.GetEnabled() { - if _, alreadySkipping := ms.timeSource.(*TimeSkippingTimeSource); !alreadySkipping { - ms.timeSource = newTimeSkippingTimeSource( + if _, alreadySkipping := ms.timeSource.(*clock.TimeSkippingTimeSource); !alreadySkipping { + ms.timeSource = clock.NewTimeSkippingTimeSource( ms.timeSource, ms.executionInfo.TimeSkippingInfo.GetTimeSkippedDetails(), ) diff --git a/service/history/workflow/mutable_state_impl_test.go b/service/history/workflow/mutable_state_impl_test.go index 84a8ff1cc4..ad6fa50eb2 100644 --- a/service/history/workflow/mutable_state_impl_test.go +++ b/service/history/workflow/mutable_state_impl_test.go @@ -33,6 +33,7 @@ import ( taskqueuespb "go.temporal.io/server/api/taskqueue/v1" "go.temporal.io/server/chasm" "go.temporal.io/server/common" + "go.temporal.io/server/common/clock" "go.temporal.io/server/common/cluster" "go.temporal.io/server/common/contextutil" "go.temporal.io/server/common/definition" @@ -6175,7 +6176,7 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_FirstSkip() { // No previous skips: virtual time when skipped == event time (offset is 0 for first skip). s.Equal(realTime, details.GetVirtualTimeWhenSkipped().AsTime()) // Duration encodes correctly. - s.Equal(skipDuration, timeSkippedDurationFromTimestamp(details.GetDurationToSkip())) + s.Equal(skipDuration, clock.TimeSkippedDurationFromTimestamp(details.GetDurationToSkip())) // Target = realTime + 2h. s.Equal(targetVirtualTime, details.GetTargetVirtualTime().AsTime()) } @@ -6217,7 +6218,7 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_SecondSkip_UsesTargetOfP s.Equal(event2EventTime, details2.GetRealTimeWhenSkipped().AsTime()) // VirtualTimeWhenSkipped = previous skip's TargetVirtualTime = 14:00. s.Equal(targetVirtual1, details2.GetVirtualTimeWhenSkipped().AsTime()) - s.Equal(skipDuration2, timeSkippedDurationFromTimestamp(details2.GetDurationToSkip())) + s.Equal(skipDuration2, clock.TimeSkippedDurationFromTimestamp(details2.GetDurationToSkip())) s.Equal(targetVirtual2, details2.GetTargetVirtualTime().AsTime()) } @@ -6249,7 +6250,7 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_ThreeSkips_VirtualTimeAc s.Equal(eventTime, d.GetRealTimeWhenSkipped().AsTime(), "skip %d: real time", i) // VirtualTimeWhenSkipped = previous target (base for first skip). s.Equal(prevTarget, d.GetVirtualTimeWhenSkipped().AsTime(), "skip %d: virtual time when skipped", i) - s.Equal(dur, timeSkippedDurationFromTimestamp(d.GetDurationToSkip()), "skip %d: duration", i) + s.Equal(dur, clock.TimeSkippedDurationFromTimestamp(d.GetDurationToSkip()), "skip %d: duration", i) s.Equal(target, d.GetTargetVirtualTime().AsTime(), "skip %d: target virtual time", i) accumulated = append(accumulated, d) @@ -6267,6 +6268,6 @@ func (s *mutableStateSuite) TestTimeSkippedDurationRoundtrip() { 24 * time.Hour, } for _, d := range durations { - s.Equal(d, timeSkippedDurationFromTimestamp(timeSkippedDurationToTimestamp(d)), "duration: %v", d) + s.Equal(d, clock.TimeSkippedDurationFromTimestamp(clock.TimeSkippedDurationToTimestamp(d)), "duration: %v", d) } } From b959b31bf2710e5c860039878a384dad23e5b2f8 Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Mon, 23 Mar 2026 22:20:04 -0700 Subject: [PATCH 6/7] control plane: add time-skipping to other apis that can update and start workflows data plane: rename persistencespb.TimeSkippedDetails --- api/persistence/v1/executions.pb.go | 257 ++++++++--------- common/clock/time_skipping_time_source.go | 39 ++- .../api/persistence/v1/executions.proto | 9 +- service/frontend/workflow_handler.go | 27 ++ service/frontend/workflow_handler_test.go | 273 ++++++++++++++++++ .../api/updateworkflowoptions/api_test.go | 78 +++++ .../history/workflow/mutable_state_impl.go | 32 +- .../workflow/mutable_state_impl_test.go | 75 ++--- service/history/workflow/task_refresher.go | 2 +- 9 files changed, 559 insertions(+), 233 deletions(-) diff --git a/api/persistence/v1/executions.pb.go b/api/persistence/v1/executions.pb.go index aebd051401..2ce01903de 100644 --- a/api/persistence/v1/executions.pb.go +++ b/api/persistence/v1/executions.pb.go @@ -1278,19 +1278,15 @@ type TimeSkippedDetails struct { // (-- api-linter: core::0142::time-field-names=disabled // // aip.dev/not-precedent: Ignoring lint rules. --) - RealTimeWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=real_time_when_skipped,json=realTimeWhenSkipped,proto3" json:"real_time_when_skipped,omitempty"` - // (-- api-linter: core::0142::time-field-names=disabled - // - // aip.dev/not-precedent: Ignoring lint rules. --) - VirtualTimeWhenSkipped *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=virtual_time_when_skipped,json=virtualTimeWhenSkipped,proto3" json:"virtual_time_when_skipped,omitempty"` + SkippingTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=skipping_time,json=skippingTime,proto3" json:"skipping_time,omitempty"` // (-- api-linter: core::0142::time-field-names=disabled // // api-linter: core::0140::prepositions=disabled // aip.dev/not-precedent: Ignoring lint rules. --) - DurationToSkip *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=duration_to_skip,json=durationToSkip,proto3" json:"duration_to_skip,omitempty"` - TargetVirtualTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=target_virtual_time,json=targetVirtualTime,proto3" json:"target_virtual_time,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + DurationToSkip *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=duration_to_skip,json=durationToSkip,proto3" json:"duration_to_skip,omitempty"` + ToTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=to_time,json=toTime,proto3" json:"to_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TimeSkippedDetails) Reset() { @@ -1323,16 +1319,9 @@ func (*TimeSkippedDetails) Descriptor() ([]byte, []int) { return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{4} } -func (x *TimeSkippedDetails) GetRealTimeWhenSkipped() *timestamppb.Timestamp { - if x != nil { - return x.RealTimeWhenSkipped - } - return nil -} - -func (x *TimeSkippedDetails) GetVirtualTimeWhenSkipped() *timestamppb.Timestamp { +func (x *TimeSkippedDetails) GetSkippingTime() *timestamppb.Timestamp { if x != nil { - return x.VirtualTimeWhenSkipped + return x.SkippingTime } return nil } @@ -1344,9 +1333,9 @@ func (x *TimeSkippedDetails) GetDurationToSkip() *timestamppb.Timestamp { return nil } -func (x *TimeSkippedDetails) GetTargetVirtualTime() *timestamppb.Timestamp { +func (x *TimeSkippedDetails) GetToTime() *timestamppb.Timestamp { if x != nil { - return x.TargetVirtualTime + return x.ToTime } return nil } @@ -4935,12 +4924,11 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\x12deployment_version\x18\x01 \x01(\v23.temporal.api.deployment.v1.WorkerDeploymentVersionR\x11deploymentVersion\"\x96\x01\n" + "\x10TimeSkippingInfo\x12\x18\n" + "\aenabled\x18\x01 \x01(\bR\aenabled\x12h\n" + - "\x14time_skipped_details\x18\x02 \x03(\v26.temporal.server.api.persistence.v1.TimeSkippedDetailsR\x12timeSkippedDetails\"\xce\x02\n" + - "\x12TimeSkippedDetails\x12O\n" + - "\x16real_time_when_skipped\x18\x01 \x01(\v2\x1a.google.protobuf.TimestampR\x13realTimeWhenSkipped\x12U\n" + - "\x19virtual_time_when_skipped\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x16virtualTimeWhenSkipped\x12D\n" + - "\x10duration_to_skip\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0edurationToSkip\x12J\n" + - "\x13target_virtual_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x11targetVirtualTime\"\x9d\x01\n" + + "\x14time_skipped_details\x18\x02 \x03(\v26.temporal.server.api.persistence.v1.TimeSkippedDetailsR\x12timeSkippedDetails\"\xd0\x01\n" + + "\x12TimeSkippedDetails\x12?\n" + + "\rskipping_time\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\fskippingTime\x12D\n" + + "\x10duration_to_skip\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\x0edurationToSkip\x123\n" + + "\ato_time\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\x06toTime\"\x9d\x01\n" + "\x0eExecutionStats\x12!\n" + "\fhistory_size\x18\x01 \x01(\x03R\vhistorySize\x122\n" + "\x15external_payload_size\x18\x02 \x01(\x03R\x13externalPayloadSize\x124\n" + @@ -5418,115 +5406,114 @@ var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ 3, // 47: temporal.server.api.persistence.v1.WorkflowExecutionInfo.time_skipping_info:type_name -> temporal.server.api.persistence.v1.TimeSkippingInfo 63, // 48: temporal.server.api.persistence.v1.LastNotifiedTargetVersion.deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion 4, // 49: temporal.server.api.persistence.v1.TimeSkippingInfo.time_skipped_details:type_name -> temporal.server.api.persistence.v1.TimeSkippedDetails - 46, // 50: temporal.server.api.persistence.v1.TimeSkippedDetails.real_time_when_skipped:type_name -> google.protobuf.Timestamp - 46, // 51: temporal.server.api.persistence.v1.TimeSkippedDetails.virtual_time_when_skipped:type_name -> google.protobuf.Timestamp - 46, // 52: temporal.server.api.persistence.v1.TimeSkippedDetails.duration_to_skip:type_name -> google.protobuf.Timestamp - 46, // 53: temporal.server.api.persistence.v1.TimeSkippedDetails.target_virtual_time:type_name -> google.protobuf.Timestamp - 64, // 54: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState - 65, // 55: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus - 55, // 56: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 46, // 57: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp - 36, // 58: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - 66, // 59: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType - 67, // 60: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 46, // 61: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 37, // 62: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - 68, // 63: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 67, // 64: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 46, // 65: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 69, // 66: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority - 55, // 67: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 9, // 68: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo - 70, // 69: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem - 67, // 70: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 46, // 71: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 46, // 72: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp - 68, // 73: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 67, // 74: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 61, // 75: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType - 71, // 76: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType - 46, // 77: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 68, // 78: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 67, // 79: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 46, // 80: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 67, // 81: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 46, // 82: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 72, // 83: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo - 68, // 84: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 46, // 85: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 46, // 86: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp - 47, // 87: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 47, // 88: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 47, // 89: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 47, // 90: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration - 47, // 91: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 47, // 92: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 46, // 93: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp - 73, // 94: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure - 74, // 95: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads - 46, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp - 75, // 97: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType - 38, // 98: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - 54, // 99: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 55, // 100: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 46, // 101: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp - 46, // 102: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 76, // 103: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment - 63, // 104: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 59, // 105: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority - 39, // 106: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - 46, // 107: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp - 55, // 108: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 77, // 109: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy - 52, // 110: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock - 55, // 111: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 59, // 112: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 55, // 113: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 55, // 114: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 78, // 115: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor - 41, // 116: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus - 42, // 117: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM - 79, // 118: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link - 80, // 119: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent - 22, // 120: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback - 45, // 121: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger - 46, // 122: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp - 81, // 123: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState - 46, // 124: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 73, // 125: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 46, // 126: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 47, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 46, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 82, // 129: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState - 46, // 130: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 73, // 131: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 46, // 132: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 47, // 133: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 47, // 134: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 46, // 135: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp - 46, // 136: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp - 83, // 137: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState - 46, // 138: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 73, // 139: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 46, // 140: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 46, // 141: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 84, // 142: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState - 85, // 143: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload - 85, // 144: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload - 86, // 145: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo - 87, // 146: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap - 27, // 147: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo - 7, // 148: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo - 46, // 149: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 40, // 150: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - 43, // 151: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - 88, // 152: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef - 44, // 153: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - 154, // [154:154] is the sub-list for method output_type - 154, // [154:154] is the sub-list for method input_type - 154, // [154:154] is the sub-list for extension type_name - 154, // [154:154] is the sub-list for extension extendee - 0, // [0:154] is the sub-list for field type_name + 46, // 50: temporal.server.api.persistence.v1.TimeSkippedDetails.skipping_time:type_name -> google.protobuf.Timestamp + 46, // 51: temporal.server.api.persistence.v1.TimeSkippedDetails.duration_to_skip:type_name -> google.protobuf.Timestamp + 46, // 52: temporal.server.api.persistence.v1.TimeSkippedDetails.to_time:type_name -> google.protobuf.Timestamp + 64, // 53: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState + 65, // 54: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus + 55, // 55: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 46, // 56: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp + 36, // 57: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + 66, // 58: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType + 67, // 59: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 60: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 37, // 61: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + 68, // 62: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 67, // 63: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 64: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 69, // 65: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority + 55, // 66: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 9, // 67: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo + 70, // 68: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem + 67, // 69: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 70: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 46, // 71: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp + 68, // 72: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 67, // 73: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 61, // 74: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType + 71, // 75: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType + 46, // 76: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 68, // 77: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 67, // 78: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 79: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 67, // 80: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 46, // 81: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 72, // 82: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo + 68, // 83: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 46, // 84: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 46, // 85: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp + 47, // 86: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 47, // 87: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 47, // 88: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 47, // 89: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration + 47, // 90: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration + 47, // 91: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration + 46, // 92: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp + 73, // 93: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure + 74, // 94: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads + 46, // 95: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp + 75, // 96: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType + 38, // 97: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo + 54, // 98: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp + 55, // 99: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 46, // 100: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp + 46, // 101: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 76, // 102: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment + 63, // 103: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion + 59, // 104: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority + 39, // 105: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo + 46, // 106: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp + 55, // 107: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 77, // 108: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy + 52, // 109: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock + 55, // 110: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 59, // 111: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority + 55, // 112: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 55, // 113: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 78, // 114: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor + 41, // 115: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus + 42, // 116: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM + 79, // 117: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link + 80, // 118: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent + 22, // 119: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback + 45, // 120: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger + 46, // 121: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp + 81, // 122: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState + 46, // 123: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 124: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 46, // 125: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 47, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration + 46, // 127: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp + 82, // 128: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState + 46, // 129: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 130: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 46, // 131: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 47, // 132: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration + 47, // 133: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration + 46, // 134: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp + 46, // 135: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp + 83, // 136: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState + 46, // 137: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp + 73, // 138: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure + 46, // 139: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp + 46, // 140: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 84, // 141: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState + 85, // 142: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload + 85, // 143: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload + 86, // 144: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo + 87, // 145: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap + 27, // 146: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo + 7, // 147: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo + 46, // 148: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp + 40, // 149: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual + 43, // 150: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry + 88, // 151: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef + 44, // 152: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed + 153, // [153:153] is the sub-list for method output_type + 153, // [153:153] is the sub-list for method input_type + 153, // [153:153] is the sub-list for extension type_name + 153, // [153:153] is the sub-list for extension extendee + 0, // [0:153] is the sub-list for field type_name } func init() { file_temporal_server_api_persistence_v1_executions_proto_init() } diff --git a/common/clock/time_skipping_time_source.go b/common/clock/time_skipping_time_source.go index 8691c0a160..b0996429de 100644 --- a/common/clock/time_skipping_time_source.go +++ b/common/clock/time_skipping_time_source.go @@ -7,10 +7,15 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" ) -// TimeSkippingTimeSource wraps a real TimeSource and adds a virtual time offset. -// When time skipping is enabled for a workflow, the workflow's "now" is real time + offset. -// The offset accumulates across skip events and is reconstructed from persisted -// TimeSkippedDetails on workflow reload — no separate field needs to be persisted. +// TimeSkippingTimeSource is a TimeSource decorator for workflows with time skipping enabled. +// +// Virtual time = real time + offset, where offset is the total duration skipped so far. +// The offset starts at zero and grows each time a WorkflowExecutionTimeSkipped event is applied +// (via Advance). It is never stored as its own field — on workflow reload it is re-derived from +// the persisted TimeSkippedDetails by summing all DurationToSkip values. +// +// Timer methods (AfterFunc, NewTimer) are intentionally not virtualized: OS-level timers always +// fire on real wall clock time. Only Now and Since reflect virtual time. type TimeSkippingTimeSource struct { base TimeSource offset time.Duration @@ -18,8 +23,8 @@ type TimeSkippingTimeSource struct { var _ TimeSource = (*TimeSkippingTimeSource)(nil) -// newTimeSkippingTimeSource creates a TimeSkippingTimeSource whose offset is the sum of all -// previously skipped durations. Pass nil or empty details when starting a new workflow. +// NewTimeSkippingTimeSource creates a TimeSkippingTimeSource whose initial offset is the sum of +// all previously skipped durations. Pass nil or empty details for a brand-new workflow (offset 0). func NewTimeSkippingTimeSource(base TimeSource, details []*persistencespb.TimeSkippedDetails) *TimeSkippingTimeSource { return &TimeSkippingTimeSource{ base: base, @@ -37,22 +42,29 @@ func (ts *TimeSkippingTimeSource) Since(t time.Time) time.Duration { return ts.Now().Sub(t) } -// AfterFunc delegates to the base time source. OS-level timers run on real wall clock. +// AfterFunc schedules f to run after duration d on the real wall clock. +// TODO(@feiyang): explore if this method needs to respect virtual time — currently it delegates +// to the base clock so f fires after d of wall time, not virtual time. func (ts *TimeSkippingTimeSource) AfterFunc(d time.Duration, f func()) Timer { return ts.base.AfterFunc(d, f) } -// NewTimer delegates to the base time source. OS-level timers run on real wall clock. +// NewTimer creates a timer that fires after duration d on the real wall clock. +// TODO(@feiyang): explore if this method needs to respect virtual time — currently it delegates +// to the base clock so the timer fires after d of wall time, not virtual time. func (ts *TimeSkippingTimeSource) NewTimer(d time.Duration) (<-chan time.Time, Timer) { return ts.base.NewTimer(d) } -// advance increases the virtual time offset by d. +// Advance increases the virtual time offset by d. +// Called each time a WorkflowExecutionTimeSkipped event is applied to keep the +// in-memory clock in sync without rebuilding it from the full persisted history. func (ts *TimeSkippingTimeSource) Advance(d time.Duration) { ts.offset += d } -// ComputeTotalSkippedOffset sums all DurationToSkip values from persisted TimeSkippedDetails. +// ComputeTotalSkippedOffset sums the DurationToSkip of each persisted TimeSkippedDetails entry. +// This reconstructs the total virtual time offset after a workflow is loaded from the database. func ComputeTotalSkippedOffset(details []*persistencespb.TimeSkippedDetails) time.Duration { var total time.Duration for _, d := range details { @@ -61,9 +73,10 @@ func ComputeTotalSkippedOffset(details []*persistencespb.TimeSkippedDetails) tim return total } -// TimeSkippedDurationToTimestamp encodes a time.Duration into a *timestamppb.Timestamp -// by storing seconds and nanoseconds directly in the Timestamp fields. -// This is a convention for the DurationToSkip field in TimeSkippedDetails. +// TimeSkippedDurationToTimestamp encodes a time.Duration into a *timestamppb.Timestamp by storing +// seconds and nanoseconds in the timestamp's integer fields. This is not a real point in time — +// it is a convention for the DurationToSkip field in TimeSkippedDetails that lets a duration be +// stored in a proto message that has no native duration type. func TimeSkippedDurationToTimestamp(d time.Duration) *timestamppb.Timestamp { return ×tamppb.Timestamp{ Seconds: int64(d / time.Second), diff --git a/proto/internal/temporal/server/api/persistence/v1/executions.proto b/proto/internal/temporal/server/api/persistence/v1/executions.proto index 3be78154da..a6967aa1cb 100644 --- a/proto/internal/temporal/server/api/persistence/v1/executions.proto +++ b/proto/internal/temporal/server/api/persistence/v1/executions.proto @@ -337,15 +337,14 @@ message TimeSkippingInfo { message TimeSkippedDetails { // (-- api-linter: core::0142::time-field-names=disabled // aip.dev/not-precedent: Ignoring lint rules. --) - google.protobuf.Timestamp real_time_when_skipped = 1; - // (-- api-linter: core::0142::time-field-names=disabled - // aip.dev/not-precedent: Ignoring lint rules. --) - google.protobuf.Timestamp virtual_time_when_skipped = 2; + google.protobuf.Timestamp skipping_time = 2; // (-- api-linter: core::0142::time-field-names=disabled // api-linter: core::0140::prepositions=disabled // aip.dev/not-precedent: Ignoring lint rules. --) google.protobuf.Timestamp duration_to_skip = 3; - google.protobuf.Timestamp target_virtual_time = 4; + // (-- api-linter: core::0140::prepositions=disabled + // aip.dev/not-precedent: Ignoring lint rules. --) + google.protobuf.Timestamp to_time = 4; } message ExecutionStats { diff --git a/service/frontend/workflow_handler.go b/service/frontend/workflow_handler.go index c548739dd4..08cbbbadf0 100644 --- a/service/frontend/workflow_handler.go +++ b/service/frontend/workflow_handler.go @@ -2276,6 +2276,17 @@ func (wh *WorkflowHandler) ResetWorkflowExecution(ctx context.Context, request * return nil, serviceerror.NewInternalf("unknown reset reapply type: %v", request.GetResetReapplyType()) } + for _, postOp := range request.GetPostResetOperations() { + if updateOpts := postOp.GetUpdateWorkflowOptions(); updateOpts != nil { + if err := wh.validateTimeSkippingConfig( + updateOpts.GetWorkflowExecutionOptions().GetTimeSkippingConfig(), + namespace.Name(request.GetNamespace()), + ); err != nil { + return nil, err + } + } + } + namespaceID, err := wh.namespaceRegistry.GetNamespaceID(namespace.Name(request.GetNamespace())) if err != nil { return nil, err @@ -5404,9 +5415,25 @@ func (wh *WorkflowHandler) StartBatchOperation( case *workflowservice.StartBatchOperationRequest_ResetOperation: input.BatchType = enumspb.BATCH_OPERATION_TYPE_RESET identity = op.ResetOperation.GetIdentity() + for _, postOp := range op.ResetOperation.GetPostResetOperations() { + if updateOpts := postOp.GetUpdateWorkflowOptions(); updateOpts != nil { + if err := wh.validateTimeSkippingConfig( + updateOpts.GetWorkflowExecutionOptions().GetTimeSkippingConfig(), + namespace.Name(request.GetNamespace()), + ); err != nil { + return nil, err + } + } + } case *workflowservice.StartBatchOperationRequest_UpdateWorkflowOptionsOperation: input.BatchType = enumspb.BATCH_OPERATION_TYPE_UPDATE_EXECUTION_OPTIONS identity = op.UpdateWorkflowOptionsOperation.GetIdentity() + if err := wh.validateTimeSkippingConfig( + op.UpdateWorkflowOptionsOperation.GetWorkflowExecutionOptions().GetTimeSkippingConfig(), + namespace.Name(request.GetNamespace()), + ); err != nil { + return nil, err + } case *workflowservice.StartBatchOperationRequest_UnpauseActivitiesOperation: input.BatchType = enumspb.BATCH_OPERATION_TYPE_UNPAUSE_ACTIVITY identity = op.UnpauseActivitiesOperation.GetIdentity() diff --git a/service/frontend/workflow_handler_test.go b/service/frontend/workflow_handler_test.go index df54d5498b..f1007d77c9 100644 --- a/service/frontend/workflow_handler_test.go +++ b/service/frontend/workflow_handler_test.go @@ -3422,6 +3422,279 @@ func (s *WorkflowHandlerSuite) TestUpdateWorkflowExecutionOptions_TimeSkipping_D s.NoError(err) } +// TestExecuteMultiOperation_TimeSkipping_DCEnabled verifies that when the DC gate is on, +// a Start-with-time-skipping inside ExecuteMultiOperation is accepted and the config is +// forwarded to the history client inside the StartWorkflow request. +func (s *WorkflowHandlerSuite) TestExecuteMultiOperation_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockNamespaceCache.EXPECT().GetNamespaceID(namespace.Name(s.testNamespace.String())).Return(s.testNamespaceID, nil) + s.mockSearchAttributesMapperProvider.EXPECT().GetMapper(gomock.Any()).Return(nil, nil) + s.mockHistoryClient.EXPECT().ExecuteMultiOperation(gomock.Any(), mock.MatchedBy(func(req *historyservice.ExecuteMultiOperationRequest) bool { + startOp := req.GetOperations()[0].GetStartWorkflow() + return startOp.GetStartRequest().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.ExecuteMultiOperationResponse{ + Responses: []*historyservice.ExecuteMultiOperationResponse_Response{ + { + Response: &historyservice.ExecuteMultiOperationResponse_Response_StartWorkflow{ + StartWorkflow: &historyservice.StartWorkflowExecutionResponse{}, + }, + }, + { + Response: &historyservice.ExecuteMultiOperationResponse_Response_UpdateWorkflow{ + UpdateWorkflow: &historyservice.UpdateWorkflowExecutionResponse{}, + }, + }, + }, + }, nil) + + _, err := wh.ExecuteMultiOperation(context.Background(), &workflowservice.ExecuteMultiOperationRequest{ + Namespace: s.testNamespace.String(), + Operations: []*workflowservice.ExecuteMultiOperationRequest_Operation{ + { + Operation: &workflowservice.ExecuteMultiOperationRequest_Operation_StartWorkflow{ + StartWorkflow: &workflowservice.StartWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowId: "WORKFLOW_ID", + WorkflowType: &commonpb.WorkflowType{Name: "workflow-type"}, + TaskQueue: &taskqueuepb.TaskQueue{Name: "task-queue"}, + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + }, + }, + { + Operation: &workflowservice.ExecuteMultiOperationRequest_Operation_UpdateWorkflow{ + UpdateWorkflow: &workflowservice.UpdateWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: "WORKFLOW_ID"}, + Request: &updatepb.Request{ + Meta: &updatepb.Meta{UpdateId: "UPDATE_ID"}, + Input: &updatepb.Input{Name: "NAME"}, + }, + }, + }, + }, + }, + }) + s.NoError(err) +} + +// TestStartBatchOperation_UpdateWorkflowOptionsOperation_TimeSkipping_DCDisabled verifies that +// a batch UpdateWorkflowOptions operation with time-skipping enabled is rejected when the DC gate is off. +func (s *WorkflowHandlerSuite) TestStartBatchOperation_UpdateWorkflowOptionsOperation_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + // CountWorkflowExecutions and the direct namespace lookup both call GetNamespaceID. + s.mockNamespaceCache.EXPECT().GetNamespaceID(gomock.Any()).Return(s.testNamespaceID, nil).AnyTimes() + s.mockVisibilityMgr.EXPECT().CountWorkflowExecutions(gomock.Any(), gomock.Any()).Return(&manager.CountWorkflowExecutionsResponse{Count: 0}, nil) + + _, err := wh.StartBatchOperation(context.Background(), &workflowservice.StartBatchOperationRequest{ + Namespace: s.testNamespace.String(), + JobId: uuid.NewString(), + Reason: "test", + VisibilityQuery: "WorkflowType='test'", + Operation: &workflowservice.StartBatchOperationRequest_UpdateWorkflowOptionsOperation{ + UpdateWorkflowOptionsOperation: &batchpb.BatchOperationUpdateWorkflowExecutionOptions{ + Identity: "test-identity", + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }, + }, + }) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(err, &invalidArg) + s.ErrorContains(err, "Time skipping is not enabled") +} + +// TestStartBatchOperation_UpdateWorkflowOptionsOperation_TimeSkipping_DCEnabled verifies that +// when the gate is on, the batch operation proceeds and the config is forwarded to history. +func (s *WorkflowHandlerSuite) TestStartBatchOperation_UpdateWorkflowOptionsOperation_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockNamespaceCache.EXPECT().GetNamespaceID(gomock.Any()).Return(s.testNamespaceID, nil).AnyTimes() + s.mockVisibilityMgr.EXPECT().CountWorkflowExecutions(gomock.Any(), gomock.Any()).Return(&manager.CountWorkflowExecutionsResponse{Count: 0}, nil) + s.mockHistoryClient.EXPECT().StartWorkflowExecution(gomock.Any(), mock.MatchedBy(func(req *historyservice.StartWorkflowExecutionRequest) bool { + var input batchspb.BatchOperationInput + _ = payloads.Decode(req.GetStartRequest().GetInput(), &input) + op := input.GetRequest().GetOperation().(*workflowservice.StartBatchOperationRequest_UpdateWorkflowOptionsOperation) + return op.UpdateWorkflowOptionsOperation.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.StartWorkflowExecutionResponse{}, nil) + + _, err := wh.StartBatchOperation(context.Background(), &workflowservice.StartBatchOperationRequest{ + Namespace: s.testNamespace.String(), + JobId: uuid.NewString(), + Reason: "test", + VisibilityQuery: "WorkflowType='test'", + Operation: &workflowservice.StartBatchOperationRequest_UpdateWorkflowOptionsOperation{ + UpdateWorkflowOptionsOperation: &batchpb.BatchOperationUpdateWorkflowExecutionOptions{ + Identity: "test-identity", + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }, + }, + }) + s.NoError(err) +} + +// TestStartBatchOperation_ResetOperation_PostReset_TimeSkipping_DCDisabled verifies that a batch +// reset with a post-reset UpdateWorkflowOptions that enables time-skipping is rejected when the DC +// gate is off. +func (s *WorkflowHandlerSuite) TestStartBatchOperation_ResetOperation_PostReset_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + s.mockNamespaceCache.EXPECT().GetNamespaceID(gomock.Any()).Return(s.testNamespaceID, nil).AnyTimes() + s.mockVisibilityMgr.EXPECT().CountWorkflowExecutions(gomock.Any(), gomock.Any()).Return(&manager.CountWorkflowExecutionsResponse{Count: 0}, nil) + + _, err := wh.StartBatchOperation(context.Background(), &workflowservice.StartBatchOperationRequest{ + Namespace: s.testNamespace.String(), + JobId: uuid.NewString(), + Reason: "test", + VisibilityQuery: "WorkflowType='test'", + Operation: &workflowservice.StartBatchOperationRequest_ResetOperation{ + ResetOperation: &batchpb.BatchOperationReset{ + Identity: "test-identity", + Options: &commonpb.ResetOptions{ + Target: &commonpb.ResetOptions_WorkflowTaskId{WorkflowTaskId: 10}, + }, + PostResetOperations: []*workflowpb.PostResetOperation{ + { + Variant: &workflowpb.PostResetOperation_UpdateWorkflowOptions_{ + UpdateWorkflowOptions: &workflowpb.PostResetOperation_UpdateWorkflowOptions{ + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }, + }, + }, + }, + }, + }, + }) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(err, &invalidArg) + s.ErrorContains(err, "Time skipping is not enabled") +} + +// TestStartBatchOperation_ResetOperation_PostReset_TimeSkipping_DCEnabled verifies that when the +// gate is on, a batch reset with a time-skipping post-reset operation proceeds and the config is +// forwarded to history inside the encoded batch input. +func (s *WorkflowHandlerSuite) TestStartBatchOperation_ResetOperation_PostReset_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockNamespaceCache.EXPECT().GetNamespaceID(gomock.Any()).Return(s.testNamespaceID, nil).AnyTimes() + s.mockVisibilityMgr.EXPECT().CountWorkflowExecutions(gomock.Any(), gomock.Any()).Return(&manager.CountWorkflowExecutionsResponse{Count: 0}, nil) + s.mockHistoryClient.EXPECT().StartWorkflowExecution(gomock.Any(), mock.MatchedBy(func(req *historyservice.StartWorkflowExecutionRequest) bool { + var input batchspb.BatchOperationInput + _ = payloads.Decode(req.GetStartRequest().GetInput(), &input) + postOps := input.GetRequest().GetOperation().(*workflowservice.StartBatchOperationRequest_ResetOperation).ResetOperation.GetPostResetOperations() + return len(postOps) == 1 && + postOps[0].GetUpdateWorkflowOptions().GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.StartWorkflowExecutionResponse{}, nil) + + _, err := wh.StartBatchOperation(context.Background(), &workflowservice.StartBatchOperationRequest{ + Namespace: s.testNamespace.String(), + JobId: uuid.NewString(), + Reason: "test", + VisibilityQuery: "WorkflowType='test'", + Operation: &workflowservice.StartBatchOperationRequest_ResetOperation{ + ResetOperation: &batchpb.BatchOperationReset{ + Identity: "test-identity", + Options: &commonpb.ResetOptions{ + Target: &commonpb.ResetOptions_WorkflowTaskId{WorkflowTaskId: 10}, + }, + PostResetOperations: []*workflowpb.PostResetOperation{ + { + Variant: &workflowpb.PostResetOperation_UpdateWorkflowOptions_{ + UpdateWorkflowOptions: &workflowpb.PostResetOperation_UpdateWorkflowOptions{ + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }, + }, + }, + }, + }, + }, + }) + s.NoError(err) +} + +// TestResetWorkflowExecution_PostReset_TimeSkipping_DCDisabled verifies that a reset request with a +// post-reset UpdateWorkflowOptions that enables time-skipping is rejected when the DC gate is off. +// The validation fires before the namespace lookup. +func (s *WorkflowHandlerSuite) TestResetWorkflowExecution_PostReset_TimeSkipping_DCDisabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(false) + wh := s.getWorkflowHandler(config) + + _, err := wh.ResetWorkflowExecution(context.Background(), &workflowservice.ResetWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + RequestId: uuid.NewString(), + WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: "workflow-id", RunId: uuid.NewString()}, + WorkflowTaskFinishEventId: 5, + PostResetOperations: []*workflowpb.PostResetOperation{ + { + Variant: &workflowpb.PostResetOperation_UpdateWorkflowOptions_{ + UpdateWorkflowOptions: &workflowpb.PostResetOperation_UpdateWorkflowOptions{ + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }, + }, + }, + }, + }) + var invalidArg *serviceerror.InvalidArgument + s.ErrorAs(err, &invalidArg) + s.ErrorContains(err, "Time skipping is not enabled") +} + +// TestResetWorkflowExecution_PostReset_TimeSkipping_DCEnabled verifies that when the gate is on, +// a reset with a time-skipping post-reset operation proceeds and the config reaches history. +func (s *WorkflowHandlerSuite) TestResetWorkflowExecution_PostReset_TimeSkipping_DCEnabled() { + config := s.newConfig() + config.TimeSkippingEnabled = dc.GetBoolPropertyFnFilteredByNamespace(true) + wh := s.getWorkflowHandler(config) + s.mockNamespaceCache.EXPECT().GetNamespaceID(s.testNamespace).Return(s.testNamespaceID, nil) + s.mockHistoryClient.EXPECT().ResetWorkflowExecution(gomock.Any(), mock.MatchedBy(func(req *historyservice.ResetWorkflowExecutionRequest) bool { + postOps := req.GetResetRequest().GetPostResetOperations() + return len(postOps) == 1 && + postOps[0].GetUpdateWorkflowOptions().GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled() + })).Return(&historyservice.ResetWorkflowExecutionResponse{RunId: uuid.NewString()}, nil) + + _, err := wh.ResetWorkflowExecution(context.Background(), &workflowservice.ResetWorkflowExecutionRequest{ + Namespace: s.testNamespace.String(), + RequestId: uuid.NewString(), + WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: "workflow-id", RunId: uuid.NewString()}, + WorkflowTaskFinishEventId: 5, + PostResetOperations: []*workflowpb.PostResetOperation{ + { + Variant: &workflowpb.PostResetOperation_UpdateWorkflowOptions_{ + UpdateWorkflowOptions: &workflowpb.PostResetOperation_UpdateWorkflowOptions{ + WorkflowExecutionOptions: &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + }, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + }, + }, + }, + }, + }) + s.NoError(err) +} + func (s *WorkflowHandlerSuite) newConfig() *Config { return NewConfig(dc.NewNoopCollection(), numHistoryShards) } diff --git a/service/history/api/updateworkflowoptions/api_test.go b/service/history/api/updateworkflowoptions/api_test.go index 377499aa9d..7bb62189c6 100644 --- a/service/history/api/updateworkflowoptions/api_test.go +++ b/service/history/api/updateworkflowoptions/api_test.go @@ -21,6 +21,7 @@ import ( "go.temporal.io/server/common/cluster" "go.temporal.io/server/common/cluster/clustertest" "go.temporal.io/server/common/locks" + "go.temporal.io/server/common/metrics" "go.temporal.io/server/common/namespace" "go.temporal.io/server/service/history/api" historyi "go.temporal.io/server/service/history/interfaces" @@ -161,6 +162,34 @@ func TestMergeOptions_FooMask(t *testing.T) { assert.Error(t, err) } +func TestMergeOptions_TimeSkippingConfigMask(t *testing.T) { + mask := &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}} + + t.Run("enable time skipping", func(t *testing.T) { + current := &workflowpb.WorkflowExecutionOptions{} + update := &workflowpb.WorkflowExecutionOptions{TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}} + merged, err := mergeWorkflowExecutionOptions(current, update, mask) + require.NoError(t, err) + assert.True(t, merged.GetTimeSkippingConfig().GetEnabled()) + }) + + t.Run("disable time skipping", func(t *testing.T) { + current := &workflowpb.WorkflowExecutionOptions{TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}} + update := &workflowpb.WorkflowExecutionOptions{TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: false}} + merged, err := mergeWorkflowExecutionOptions(current, update, mask) + require.NoError(t, err) + assert.False(t, merged.GetTimeSkippingConfig().GetEnabled()) + }) + + t.Run("nil update leaves current unchanged", func(t *testing.T) { + current := &workflowpb.WorkflowExecutionOptions{} + update := &workflowpb.WorkflowExecutionOptions{TimeSkippingConfig: nil} + merged, err := mergeWorkflowExecutionOptions(current, update, mask) + require.NoError(t, err) + assert.Nil(t, merged.GetTimeSkippingConfig()) + }) +} + type ( // updateWorkflowOptionsSuite contains tests for the UpdateWorkflowOptions API. updateWorkflowOptionsSuite struct { @@ -231,6 +260,55 @@ func (s *updateWorkflowOptionsSuite) TearDownTest() { s.controller.Finish() } +func (s *updateWorkflowOptionsSuite) TestInvoke_TimeSkipping() { + expectedOptions := &workflowpb.WorkflowExecutionOptions{ + TimeSkippingConfig: &workflowpb.TimeSkippingConfig{Enabled: true}, + } + s.currentMutableState.EXPECT().IsWorkflowExecutionRunning().Return(true) + s.shardContext.EXPECT().GetMetricsHandler().Return(metrics.NoopMetricsHandler).AnyTimes() + // AddWorkflowExecutionOptionsUpdatedEvent is called with the time-skipping config; + // use gomock.Any() for unrelated args (versioning override is preserved from mutable state). + s.currentMutableState.EXPECT().AddWorkflowExecutionOptionsUpdatedEvent( + gomock.Any(), // versioning override — preserved from mutable state, not under test + gomock.Any(), // unsetOverride + gomock.Any(), // deployment + gomock.Any(), // deployment version + gomock.Any(), // deployment series + "test-identity", + gomock.Any(), // priority — not in mask + &workflowpb.TimeSkippingConfig{Enabled: true}, + ).Return(&historypb.HistoryEvent{}, nil) + s.currentContext.EXPECT().UpdateWorkflowExecutionAsActive(gomock.Any(), s.shardContext).Return(nil) + + updateReq := &historyservice.UpdateWorkflowExecutionOptionsRequest{ + NamespaceId: tests.NamespaceID.String(), + UpdateRequest: &workflowservice.UpdateWorkflowExecutionOptionsRequest{ + Namespace: tests.Namespace.String(), + WorkflowExecution: &commonpb.WorkflowExecution{ + WorkflowId: tests.WorkflowID, + RunId: tests.RunID, + }, + WorkflowExecutionOptions: expectedOptions, + UpdateMask: &fieldmaskpb.FieldMask{Paths: []string{"time_skipping_config"}}, + Identity: "test-identity", + }, + } + + resp, err := Invoke( + context.Background(), + updateReq, + s.shardContext, + s.workflowConsistencyChecker, + s.mockMatchingClient, + noopVersionMembershipCache{}, + noopReactivationSignalCache{}, + noopReactivationSignaler, + ) + s.NoError(err) + s.NotNil(resp) + s.True(resp.GetWorkflowExecutionOptions().GetTimeSkippingConfig().GetEnabled()) +} + func (s *updateWorkflowOptionsSuite) TestInvoke_Success() { expectedOverrideOptions := &workflowpb.WorkflowExecutionOptions{ diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 906847a840..ede76f98aa 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -3954,7 +3954,7 @@ func (ms *MutableStateImpl) AddWorkflowExecutionTimeSkippedEvent( func (ms *MutableStateImpl) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.Context, event *historypb.HistoryEvent) error { executionInfo := ms.GetExecutionInfo() - newDetails := buildTimeSkippedDetails(executionInfo.TimeSkippingInfo.TimeSkippedDetails, event) + newDetails := buildTimeSkippedDetails(event) executionInfo.TimeSkippingInfo.TimeSkippedDetails = append( executionInfo.TimeSkippingInfo.TimeSkippedDetails, newDetails, @@ -3965,40 +3965,18 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionTimeSkippedEvent(ctx context.C return NewTaskRefresher(ms.shard).Refresh(ctx, ms, false) } -// buildTimeSkippedDetails constructs a TimeSkippedDetails entry for a single skip event. -// -// For the first skip the event time equals real time (the time-skipping offset is 0 when the -// event is created). For subsequent skips the virtual time at the moment of the skip equals the -// TargetVirtualTime of the most recent preceding entry; the event time is already the -// virtual time and must NOT be used to derive virtualTimeWhenSkipped in that case. -// -// TargetVirtualTime = VirtualTimeWhenSkipped + DurationToSkip func buildTimeSkippedDetails( - existingDetails []*persistencespb.TimeSkippedDetails, event *historypb.HistoryEvent, ) *persistencespb.TimeSkippedDetails { attrs := event.GetWorkflowExecutionTimeSkippedEventAttributes() - - // Derive the virtual time at which this skip starts. - // First skip: event time == real time (offset is 0 when the event is written). - // Subsequent skips: virtual time == previous skip's target virtual time. - var virtualTimeWhenSkipped time.Time - if len(existingDetails) == 0 { - virtualTimeWhenSkipped = event.GetEventTime().AsTime() - } else { - virtualTimeWhenSkipped = existingDetails[len(existingDetails)-1].GetTargetVirtualTime().AsTime() - } - skipDuration := attrs.GetToTime().AsTime().Sub(virtualTimeWhenSkipped) - + skipDuration := attrs.GetToTime().AsTime().Sub(event.GetEventTime().AsTime()) return &persistencespb.TimeSkippedDetails{ - RealTimeWhenSkipped: event.GetEventTime(), - VirtualTimeWhenSkipped: timestamppb.New(virtualTimeWhenSkipped), - DurationToSkip: clock.TimeSkippedDurationToTimestamp(skipDuration), - TargetVirtualTime: attrs.GetToTime(), + SkippingTime: event.GetEventTime(), + DurationToSkip: clock.TimeSkippedDurationToTimestamp(skipDuration), + ToTime: attrs.GetToTime(), } } - // VirtualTimeNow returns the current effective time for this workflow. // For workflows with time skipping enabled, this returns the virtual (advanced) time. // For regular workflows, this returns the real shard time. diff --git a/service/history/workflow/mutable_state_impl_test.go b/service/history/workflow/mutable_state_impl_test.go index ad6fa50eb2..9e6850a5eb 100644 --- a/service/history/workflow/mutable_state_impl_test.go +++ b/service/history/workflow/mutable_state_impl_test.go @@ -6169,74 +6169,48 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_FirstSkip() { }, } - details := buildTimeSkippedDetails(nil, event) + details := buildTimeSkippedDetails(event) - // Real time is the event time. - s.Equal(realTime, details.GetRealTimeWhenSkipped().AsTime()) - // No previous skips: virtual time when skipped == event time (offset is 0 for first skip). - s.Equal(realTime, details.GetVirtualTimeWhenSkipped().AsTime()) + // Skipping time is the event time. + s.Equal(realTime, details.GetSkippingTime().AsTime()) // Duration encodes correctly. s.Equal(skipDuration, clock.TimeSkippedDurationFromTimestamp(details.GetDurationToSkip())) // Target = realTime + 2h. - s.Equal(targetVirtualTime, details.GetTargetVirtualTime().AsTime()) + s.Equal(targetVirtualTime, details.GetToTime().AsTime()) } -func (s *mutableStateSuite) TestBuildTimeSkippedDetails_SecondSkip_UsesTargetOfPreviousSkip() { - // First skip: real/virtual 12:00, skip 2h → virtual target 14:00. - realTime1 := time.Date(2024, 1, 1, 12, 0, 0, 0, time.UTC) - skipDuration1 := 2 * time.Hour - targetVirtual1 := realTime1.Add(skipDuration1) // 14:00 +func (s *mutableStateSuite) TestBuildTimeSkippedDetails_SecondSkip() { + // Virtual time at start of second skip = 14:00 (the previous skip's target). + eventTime := time.Date(2024, 1, 1, 14, 0, 0, 0, time.UTC) + skipDuration := 3 * time.Hour + targetTime := eventTime.Add(skipDuration) // 17:00 - event1 := &historypb.HistoryEvent{ - EventTime: timestamppb.New(realTime1), - Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ - WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - ToTime: timestamppb.New(targetVirtual1), - }, - }, - } - details1 := buildTimeSkippedDetails(nil, event1) - - // Second skip: virtual time is now targetVirtual1 = 14:00 (event time is the virtual clock - // reading, which equals targetVirtual1 after the first advance). - // Skip 3h more → target = 17:00. - skipDuration2 := 3 * time.Hour - targetVirtual2 := targetVirtual1.Add(skipDuration2) // 17:00 - - // event.EventTime reflects the virtual clock at the moment of the second skip (~= targetVirtual1). - event2EventTime := targetVirtual1 - event2 := &historypb.HistoryEvent{ - EventTime: timestamppb.New(event2EventTime), + event := &historypb.HistoryEvent{ + EventTime: timestamppb.New(eventTime), Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ - ToTime: timestamppb.New(targetVirtual2), + ToTime: timestamppb.New(targetTime), }, }, } - details2 := buildTimeSkippedDetails([]*persistencespb.TimeSkippedDetails{details1}, event2) + details := buildTimeSkippedDetails(event) - s.Equal(event2EventTime, details2.GetRealTimeWhenSkipped().AsTime()) - // VirtualTimeWhenSkipped = previous skip's TargetVirtualTime = 14:00. - s.Equal(targetVirtual1, details2.GetVirtualTimeWhenSkipped().AsTime()) - s.Equal(skipDuration2, clock.TimeSkippedDurationFromTimestamp(details2.GetDurationToSkip())) - s.Equal(targetVirtual2, details2.GetTargetVirtualTime().AsTime()) + s.Equal(eventTime, details.GetSkippingTime().AsTime()) + s.Equal(skipDuration, clock.TimeSkippedDurationFromTimestamp(details.GetDurationToSkip())) + s.Equal(targetTime, details.GetToTime().AsTime()) } func (s *mutableStateSuite) TestBuildTimeSkippedDetails_ThreeSkips_VirtualTimeAccumulates() { base := time.Date(2024, 1, 1, 10, 0, 0, 0, time.UTC) - // Each skip advances virtual time by its duration from the previous target. - // Skip N's virtualTimeWhenSkipped = accumulated[N-1].TargetVirtualTime. + // event.EventTime is the virtual clock reading at the start of each skip (= previous target). + // skipDuration = toTime - eventTime, so duration is preserved exactly. skipDurations := []time.Duration{1 * time.Hour, 2 * time.Hour, 3 * time.Hour} - var accumulated []*persistencespb.TimeSkippedDetails - prevTarget := base // for the first skip, virtualTimeWhenSkipped = event.EventTime = base + prevTarget := base for i, dur := range skipDurations { target := prevTarget.Add(dur) - eventTime := base.Add(time.Duration(i) * 15 * time.Minute) // arbitrary real clock advance - if i == 0 { - eventTime = base // first skip: event time == real time == virtual time (offset=0) - } + eventTime := prevTarget // virtual time at start of skip = previous skip's target event := &historypb.HistoryEvent{ EventTime: timestamppb.New(eventTime), Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ @@ -6245,15 +6219,12 @@ func (s *mutableStateSuite) TestBuildTimeSkippedDetails_ThreeSkips_VirtualTimeAc }, }, } - d := buildTimeSkippedDetails(accumulated, event) + d := buildTimeSkippedDetails(event) - s.Equal(eventTime, d.GetRealTimeWhenSkipped().AsTime(), "skip %d: real time", i) - // VirtualTimeWhenSkipped = previous target (base for first skip). - s.Equal(prevTarget, d.GetVirtualTimeWhenSkipped().AsTime(), "skip %d: virtual time when skipped", i) + s.Equal(eventTime, d.GetSkippingTime().AsTime(), "skip %d: skipping time", i) s.Equal(dur, clock.TimeSkippedDurationFromTimestamp(d.GetDurationToSkip()), "skip %d: duration", i) - s.Equal(target, d.GetTargetVirtualTime().AsTime(), "skip %d: target virtual time", i) + s.Equal(target, d.GetToTime().AsTime(), "skip %d: target time", i) - accumulated = append(accumulated, d) prevTarget = target } } diff --git a/service/history/workflow/task_refresher.go b/service/history/workflow/task_refresher.go index b82c6cd6ea..b562c64e99 100644 --- a/service/history/workflow/task_refresher.go +++ b/service/history/workflow/task_refresher.go @@ -709,7 +709,7 @@ func (r *TaskRefresherImpl) applyTimeSkippingOffsetToUserTimerTasks(mutableState } latestDetail := details[len(details)-1] - latestTargetVirtualTime := latestDetail.GetTargetVirtualTime().AsTime() + latestTargetVirtualTime := latestDetail.GetToTime().AsTime() skippedDuration := latestTargetVirtualTime.Sub(r.shard.GetTimeSource().Now()) if skippedDuration <= 0 { return From 824d0c6bf4a5baa16f2cf2907283081685f15b2e Mon Sep 17 00:00:00 2001 From: Feiyang Xie Date: Mon, 23 Mar 2026 23:13:58 -0700 Subject: [PATCH 7/7] persistence: regenerate executions.pb.go with to_time api-linter comment add timeSkippingEvent to workflow rebuilder fix bugs of taskRefersher, and mutable virtual time The proto source had the api-linter suppression comment for to_time but the generated .pb.go was not updated to reflect it. Co-Authored-By: Claude Sonnet 4.6 --- api/persistence/v1/executions.pb.go | 9 +- .../history/workflow/mutable_state_impl.go | 2 +- .../workflow/mutable_state_impl_test.go | 23 +++ .../workflow/mutable_state_rebuilder.go | 4 + .../workflow/mutable_state_rebuilder_test.go | 31 ++++ service/history/workflow/task_refresher.go | 31 ++-- .../history/workflow/task_refresher_test.go | 146 ++++++++++++++++++ 7 files changed, 232 insertions(+), 14 deletions(-) diff --git a/api/persistence/v1/executions.pb.go b/api/persistence/v1/executions.pb.go index 2ce01903de..62ab82a364 100644 --- a/api/persistence/v1/executions.pb.go +++ b/api/persistence/v1/executions.pb.go @@ -1284,9 +1284,12 @@ type TimeSkippedDetails struct { // api-linter: core::0140::prepositions=disabled // aip.dev/not-precedent: Ignoring lint rules. --) DurationToSkip *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=duration_to_skip,json=durationToSkip,proto3" json:"duration_to_skip,omitempty"` - ToTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=to_time,json=toTime,proto3" json:"to_time,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + // (-- api-linter: core::0140::prepositions=disabled + // + // aip.dev/not-precedent: Ignoring lint rules. --) + ToTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=to_time,json=toTime,proto3" json:"to_time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *TimeSkippedDetails) Reset() { diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index ede76f98aa..f96556de4b 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -502,7 +502,7 @@ func NewMutableStateFromDB( mutableState.approximateSize += dbRecord.ExecutionInfo.Size() - mutableState.executionInfo.Size() mutableState.executionInfo = dbRecord.ExecutionInfo - if mutableState.executionInfo.GetTimeSkippingInfo().GetEnabled() { + if mutableState.executionInfo.GetTimeSkippingInfo() != nil { mutableState.timeSource = clock.NewTimeSkippingTimeSource( mutableState.timeSource, mutableState.executionInfo.TimeSkippingInfo.TimeSkippedDetails, diff --git a/service/history/workflow/mutable_state_impl_test.go b/service/history/workflow/mutable_state_impl_test.go index 9e6850a5eb..4bd02c4f9e 100644 --- a/service/history/workflow/mutable_state_impl_test.go +++ b/service/history/workflow/mutable_state_impl_test.go @@ -6242,3 +6242,26 @@ func (s *mutableStateSuite) TestTimeSkippedDurationRoundtrip() { s.Equal(d, clock.TimeSkippedDurationFromTimestamp(clock.TimeSkippedDurationToTimestamp(d)), "duration: %v", d) } } + +func (s *mutableStateSuite) TestNewMutableStateFromDB_TimeSkippingDisabled_VirtualTimeUsed() { + // Verify that when TimeSkippingInfo exists but Enabled=false, the mutable state still uses + // a TimeSkippingTimeSource so that virtual time (real time + skipped offset) is returned. + skipDuration := 2 * time.Hour + dbState := s.buildWorkflowMutableState() + dbState.ExecutionInfo.TimeSkippingInfo = &persistencespb.TimeSkippingInfo{ + Enabled: false, + TimeSkippedDetails: []*persistencespb.TimeSkippedDetails{ + { + DurationToSkip: clock.TimeSkippedDurationToTimestamp(skipDuration), + }, + }, + } + + ms, err := NewMutableStateFromDB(s.mockShard, s.mockEventsCache, s.logger, s.namespaceEntry, dbState, 123) + s.NoError(err) + + // VirtualTimeNow should be ahead of real time by the accumulated skipped duration. + realNow := s.mockShard.GetTimeSource().Now() + virtualNow := ms.VirtualTimeNow() + s.WithinDuration(realNow.Add(skipDuration), virtualNow, time.Second) +} diff --git a/service/history/workflow/mutable_state_rebuilder.go b/service/history/workflow/mutable_state_rebuilder.go index 2724af3099..a1ba8d67fc 100644 --- a/service/history/workflow/mutable_state_rebuilder.go +++ b/service/history/workflow/mutable_state_rebuilder.go @@ -672,6 +672,10 @@ func (b *MutableStateRebuilderImpl) applyEvents( if err := b.mutableState.ApplyWorkflowExecutionUnpausedEvent(event); err != nil { return nil, err } + case enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED: + if err := b.mutableState.ApplyWorkflowExecutionTimeSkippedEvent(ctx, event); err != nil { + return nil, err + } default: def, ok := b.shard.StateMachineRegistry().EventDefinition(event.GetEventType()) diff --git a/service/history/workflow/mutable_state_rebuilder_test.go b/service/history/workflow/mutable_state_rebuilder_test.go index 966b65a5eb..f64b793044 100644 --- a/service/history/workflow/mutable_state_rebuilder_test.go +++ b/service/history/workflow/mutable_state_rebuilder_test.go @@ -2159,6 +2159,37 @@ func (s *stateBuilderSuite) TestApplyEvents_HSMRegistry() { s.Equal(enumsspb.NEXUS_OPERATION_STATE_SCHEDULED, sm.State()) } +func (s *stateBuilderSuite) TestApplyEvents_EventTypeWorkflowExecutionTimeSkipped() { + version := int64(1) + requestID := uuid.NewString() + execution := &commonpb.WorkflowExecution{ + WorkflowId: "some random workflow ID", + RunId: tests.RunID, + } + + now := time.Now().UTC() + event := &historypb.HistoryEvent{ + TaskId: rand.Int63(), + Version: version, + EventId: 130, + EventTime: timestamppb.New(now), + EventType: enumspb.EVENT_TYPE_WORKFLOW_EXECUTION_TIME_SKIPPED, + Attributes: &historypb.HistoryEvent_WorkflowExecutionTimeSkippedEventAttributes{ + WorkflowExecutionTimeSkippedEventAttributes: &historypb.WorkflowExecutionTimeSkippedEventAttributes{ + ToTime: timestamppb.New(now.Add(time.Hour)), + }, + }, + } + + s.mockMutableState.EXPECT().ApplyWorkflowExecutionTimeSkippedEvent(gomock.Any(), protomock.Eq(event)).Return(nil) + s.mockUpdateVersion(event) + s.mockMutableState.EXPECT().ClearStickyTaskQueue() + + _, err := s.stateRebuilder.ApplyEvents(context.Background(), tests.NamespaceID, requestID, execution, s.toHistory(event), nil, "") + s.NoError(err) + s.Equal(event.TaskId, s.executionInfo.LastRunningClock) +} + func (p *testTaskGeneratorProvider) NewTaskGenerator( shardContext historyi.ShardContext, mutableState historyi.MutableState, diff --git a/service/history/workflow/task_refresher.go b/service/history/workflow/task_refresher.go index b562c64e99..a3aa18c934 100644 --- a/service/history/workflow/task_refresher.go +++ b/service/history/workflow/task_refresher.go @@ -10,6 +10,7 @@ import ( enumsspb "go.temporal.io/server/api/enums/v1" persistencespb "go.temporal.io/server/api/persistence/v1" "go.temporal.io/server/common" + "go.temporal.io/server/common/clock" "go.temporal.io/server/common/persistence/transitionhistory" "go.temporal.io/server/common/primitives/timestamp" "go.temporal.io/server/service/history/hsm" @@ -76,7 +77,7 @@ func (r *TaskRefresherImpl) Refresh( return err } - r.applyTimeSkippingOffsetToUserTimerTasks(mutableState) + r.applyTimeSkippingOffsetToTimerTasks(mutableState) if err := mutableState.ChasmTree().RefreshTasks(); err != nil { return err @@ -692,13 +693,16 @@ func (r *TaskRefresherImpl) refreshTasksForSubStateMachines( return nil } -// applyTimeSkippingOffsetToUserTimerTasks shifts the VisibilityTimestamp of all user timer tasks +// applyTimeSkippingOffsetToTimerTasks shifts the VisibilityTimestamp of all pending timer tasks // that were just generated by subtracting the total skipped duration. This ensures the timer queue // fires them at the correct real-clock time relative to the advanced virtual clock. // -// skippedDuration = latestSkipToTimePoint - realNow -// adjustedFireTime = virtualFireTime - skippedDuration -func (r *TaskRefresherImpl) applyTimeSkippingOffsetToUserTimerTasks(mutableState historyi.MutableState) { +// skippedDuration = sum of all DurationToSkip in TimeSkippedDetails +// adjustedFireTime = max(now, virtualFireTime - skippedDuration) +// +// DeleteHistoryEventTask and TimeSkippingTimerTask are excluded: the former is a retention-based +// cleanup task unrelated to virtual time; the latter is the time-skipping mechanism itself. +func (r *TaskRefresherImpl) applyTimeSkippingOffsetToTimerTasks(mutableState historyi.MutableState) { timeSkippingInfo := mutableState.GetExecutionInfo().GetTimeSkippingInfo() if timeSkippingInfo == nil { return @@ -708,9 +712,7 @@ func (r *TaskRefresherImpl) applyTimeSkippingOffsetToUserTimerTasks(mutableState return } - latestDetail := details[len(details)-1] - latestTargetVirtualTime := latestDetail.GetToTime().AsTime() - skippedDuration := latestTargetVirtualTime.Sub(r.shard.GetTimeSource().Now()) + skippedDuration := clock.ComputeTotalSkippedOffset(details) if skippedDuration <= 0 { return } @@ -719,9 +721,18 @@ func (r *TaskRefresherImpl) applyTimeSkippingOffsetToUserTimerTasks(mutableState if !ok { return } + now := r.shard.GetTimeSource().Now() for _, task := range ms.InsertTasks[tasks.CategoryTimer] { - if userTimerTask, ok := task.(*tasks.UserTimerTask); ok { - userTimerTask.VisibilityTimestamp = userTimerTask.VisibilityTimestamp.Add(-skippedDuration) + switch task.GetType() { + case enumsspb.TASK_TYPE_DELETE_HISTORY_EVENT, enumsspb.TASK_TYPE_TIME_SKIPPING: + // not virtual-time based, skip + continue + default: + } + adjusted := task.GetVisibilityTime().Add(-skippedDuration) + if adjusted.Before(now) { + adjusted = now } + task.SetVisibilityTime(adjusted) } } diff --git a/service/history/workflow/task_refresher_test.go b/service/history/workflow/task_refresher_test.go index 11bdc928c7..b74f8910cc 100644 --- a/service/history/workflow/task_refresher_test.go +++ b/service/history/workflow/task_refresher_test.go @@ -14,6 +14,7 @@ import ( historyspb "go.temporal.io/server/api/history/v1" persistencespb "go.temporal.io/server/api/persistence/v1" "go.temporal.io/server/common" + "go.temporal.io/server/common/clock" "go.temporal.io/server/common/cluster" "go.temporal.io/server/common/log" "go.temporal.io/server/common/namespace" @@ -1434,6 +1435,151 @@ func (s *taskRefresherSuite) TestRefreshSubStateMachineTasks() { s.False(hsmRoot.Dirty()) } +// buildMutableStateWithTimeSkipping creates a MutableStateImpl with TimeSkippingInfo having +// the given total skipped duration in a single entry. +func (s *taskRefresherSuite) buildMutableStateWithTimeSkipping(totalSkip time.Duration, enabled bool) *MutableStateImpl { + dbRecord := &persistencespb.WorkflowMutableState{ + ExecutionInfo: &persistencespb.WorkflowExecutionInfo{ + NamespaceId: tests.NamespaceID.String(), + WorkflowId: tests.WorkflowID, + TimeSkippingInfo: &persistencespb.TimeSkippingInfo{ + Enabled: enabled, + TimeSkippedDetails: []*persistencespb.TimeSkippedDetails{ + {DurationToSkip: clock.TimeSkippedDurationToTimestamp(totalSkip)}, + }, + }, + }, + ExecutionState: &persistencespb.WorkflowExecutionState{ + RunId: tests.RunID, + State: enumsspb.WORKFLOW_EXECUTION_STATE_RUNNING, + Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING, + }, + NextEventId: 1, + } + ms, err := NewMutableStateFromDB( + s.mockShard, + s.mockShard.GetEventsCache(), + log.NewTestLogger(), + tests.LocalNamespaceEntry, + dbRecord, + 1, + ) + s.NoError(err) + return ms +} + +func (s *taskRefresherSuite) TestApplyTimeSkippingOffset_AdjustsAllTimerTaskTypes() { + skipDuration := 2 * time.Hour + ms := s.buildMutableStateWithTimeSkipping(skipDuration, true) + + now := s.mockShard.GetTimeSource().Now() + fireTime := now.Add(3 * time.Hour) + wfKey := ms.GetWorkflowKey() + + ms.InsertTasks[tasks.CategoryTimer] = []tasks.Task{ + &tasks.UserTimerTask{WorkflowKey: wfKey, VisibilityTimestamp: fireTime}, + &tasks.ActivityTimeoutTask{WorkflowKey: wfKey, VisibilityTimestamp: fireTime}, + &tasks.WorkflowRunTimeoutTask{WorkflowKey: wfKey, VisibilityTimestamp: fireTime}, + &tasks.WorkflowExecutionTimeoutTask{NamespaceID: wfKey.NamespaceID, WorkflowID: wfKey.WorkflowID, VisibilityTimestamp: fireTime}, + } + + s.taskRefresher.applyTimeSkippingOffsetToTimerTasks(ms) + + expected := fireTime.Add(-skipDuration) // now + 1h + for _, task := range ms.InsertTasks[tasks.CategoryTimer] { + s.Equal(expected, task.GetVisibilityTime(), "task type %v should be adjusted", task.GetType()) + } +} + +func (s *taskRefresherSuite) TestApplyTimeSkippingOffset_ExcludesDeleteAndTimeSkippingTasks() { + skipDuration := 2 * time.Hour + ms := s.buildMutableStateWithTimeSkipping(skipDuration, true) + + now := s.mockShard.GetTimeSource().Now() + fireTime := now.Add(3 * time.Hour) + wfKey := ms.GetWorkflowKey() + + ms.InsertTasks[tasks.CategoryTimer] = []tasks.Task{ + &tasks.DeleteHistoryEventTask{WorkflowKey: wfKey, VisibilityTimestamp: fireTime}, + &tasks.TimeSkippingTimerTask{WorkflowKey: wfKey, VisibilityTimestamp: fireTime}, + } + + s.taskRefresher.applyTimeSkippingOffsetToTimerTasks(ms) + + for _, task := range ms.InsertTasks[tasks.CategoryTimer] { + s.Equal(fireTime, task.GetVisibilityTime(), "task type %v should not be adjusted", task.GetType()) + } +} + +func (s *taskRefresherSuite) TestApplyTimeSkippingOffset_MultipleSkipEntries_UsesTotalOffset() { + // Two separate skip entries: 1h + 1h = 2h total. The old bug used + // latestTargetVirtualTime - realNow instead of summing DurationToSkip. + dbRecord := &persistencespb.WorkflowMutableState{ + ExecutionInfo: &persistencespb.WorkflowExecutionInfo{ + NamespaceId: tests.NamespaceID.String(), + WorkflowId: tests.WorkflowID, + TimeSkippingInfo: &persistencespb.TimeSkippingInfo{ + Enabled: true, + TimeSkippedDetails: []*persistencespb.TimeSkippedDetails{ + {DurationToSkip: clock.TimeSkippedDurationToTimestamp(time.Hour)}, + {DurationToSkip: clock.TimeSkippedDurationToTimestamp(time.Hour)}, + }, + }, + }, + ExecutionState: &persistencespb.WorkflowExecutionState{ + RunId: tests.RunID, + State: enumsspb.WORKFLOW_EXECUTION_STATE_RUNNING, + Status: enumspb.WORKFLOW_EXECUTION_STATUS_RUNNING, + }, + NextEventId: 1, + } + ms, err := NewMutableStateFromDB(s.mockShard, s.mockShard.GetEventsCache(), log.NewTestLogger(), tests.LocalNamespaceEntry, dbRecord, 1) + s.NoError(err) + + now := s.mockShard.GetTimeSource().Now() + fireTime := now.Add(3 * time.Hour) + ms.InsertTasks[tasks.CategoryTimer] = []tasks.Task{ + &tasks.UserTimerTask{WorkflowKey: ms.GetWorkflowKey(), VisibilityTimestamp: fireTime}, + } + + s.taskRefresher.applyTimeSkippingOffsetToTimerTasks(ms) + + // Total offset = 2h, so adjusted = now + 3h - 2h = now + 1h + s.Equal(now.Add(time.Hour), ms.InsertTasks[tasks.CategoryTimer][0].GetVisibilityTime()) +} + +func (s *taskRefresherSuite) TestApplyTimeSkippingOffset_ClampsToNow() { + skipDuration := 5 * time.Hour + ms := s.buildMutableStateWithTimeSkipping(skipDuration, true) + + now := s.mockShard.GetTimeSource().Now() + fireTime := now.Add(3 * time.Hour) // adjusted = now + 3h - 5h = 2h in the past + ms.InsertTasks[tasks.CategoryTimer] = []tasks.Task{ + &tasks.UserTimerTask{WorkflowKey: ms.GetWorkflowKey(), VisibilityTimestamp: fireTime}, + } + + s.taskRefresher.applyTimeSkippingOffsetToTimerTasks(ms) + + s.WithinDuration(now, ms.InsertTasks[tasks.CategoryTimer][0].GetVisibilityTime(), time.Second) +} + +func (s *taskRefresherSuite) TestApplyTimeSkippingOffset_DisabledButHasSkips_StillAdjusts() { + // Even when Enabled=false, accumulated skips must be applied because virtual time + // has deviated from wall clock time and tasks must fire at the correct real time. + skipDuration := 2 * time.Hour + ms := s.buildMutableStateWithTimeSkipping(skipDuration, false) + + now := s.mockShard.GetTimeSource().Now() + fireTime := now.Add(3 * time.Hour) + ms.InsertTasks[tasks.CategoryTimer] = []tasks.Task{ + &tasks.UserTimerTask{WorkflowKey: ms.GetWorkflowKey(), VisibilityTimestamp: fireTime}, + } + + s.taskRefresher.applyTimeSkippingOffsetToTimerTasks(ms) + + s.Equal(fireTime.Add(-skipDuration), ms.InsertTasks[tasks.CategoryTimer][0].GetVisibilityTime()) +} + type mockTaskGeneratorProvider struct { mockTaskGenerator *MockTaskGenerator }