diff --git a/api/enums/v1/task.go-helpers.pb.go b/api/enums/v1/task.go-helpers.pb.go index fdf9ecdb97..6953cba3fc 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, + "ActivityCommand": 34, } ) @@ -71,6 +72,24 @@ func TaskTypeFromString(s string) (TaskType, error) { return TaskType(0), fmt.Errorf("%s is not a valid TaskType", s) } +var ( + ActivityCommandType_shorthandValue = map[string]int32{ + "Unspecified": 0, + "Cancel": 1, + } +) + +// ActivityCommandTypeFromString parses a ActivityCommandType value from either the protojson +// canonical SCREAMING_CASE enum or the traditional temporal PascalCase enum to ActivityCommandType +func ActivityCommandTypeFromString(s string) (ActivityCommandType, error) { + if v, ok := ActivityCommandType_value[s]; ok { + return ActivityCommandType(v), nil + } else if v, ok := ActivityCommandType_shorthandValue[s]; ok { + return ActivityCommandType(v), nil + } + return ActivityCommandType(0), fmt.Errorf("%s is not a valid ActivityCommandType", s) +} + var ( TaskPriority_shorthandValue = map[string]int32{ "Unspecified": 0, diff --git a/api/enums/v1/task.pb.go b/api/enums/v1/task.pb.go index 2b902a95b2..bac5034329 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 to send commands to activities via Nexus. Also see ActivityCommandType. + TASK_TYPE_ACTIVITY_COMMAND 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_ACTIVITY_COMMAND", } 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_ACTIVITY_COMMAND": 34, } ) @@ -228,7 +232,7 @@ func (x TaskType) String() string { return "TransferSignalExecution" case TASK_TYPE_TRANSFER_RESET_WORKFLOW: - // TaskPriority is only used for replication task as of May 2024 + // ActivityCommandType specifies the type of command to send to activities. return "TransferResetWorkflow" case TASK_TYPE_WORKFLOW_TASK_TIMEOUT: return "WorkflowTaskTimeout" @@ -236,14 +240,12 @@ func (x TaskType) String() string { return "ActivityTimeout" case TASK_TYPE_USER_TIMER: return "UserTimer" - - // gap between index can be used for future priority levels if needed case TASK_TYPE_WORKFLOW_RUN_TIMEOUT: return "WorkflowRunTimeout" + + // Enum value maps for ActivityCommandType. case TASK_TYPE_DELETE_HISTORY_EVENT: return "DeleteHistoryEvent" - - // Enum value maps for TaskPriority. case TASK_TYPE_ACTIVITY_RETRY_TIMER: return "ActivityRetryTimer" case TASK_TYPE_WORKFLOW_BACKOFF_TIMER: @@ -269,15 +271,19 @@ func (x TaskType) String() string { case TASK_TYPE_WORKFLOW_EXECUTION_TIMEOUT: return "WorkflowExecutionTimeout" case TASK_TYPE_REPLICATION_SYNC_HSM: - return "ReplicationSyncHsm" - // Deprecated: Use TaskPriority.Descriptor instead. + // Deprecated: Use ActivityCommandType.Descriptor instead. + return "ReplicationSyncHsm" case TASK_TYPE_REPLICATION_SYNC_VERSIONED_TRANSITION: return "ReplicationSyncVersionedTransition" case TASK_TYPE_CHASM_PURE: return "ChasmPure" case TASK_TYPE_CHASM: return "Chasm" + + // TaskPriority is only used for replication task as of May 2024 + case TASK_TYPE_ACTIVITY_COMMAND: + return "ActivityCommand" default: return strconv.Itoa(int(x)) } @@ -300,15 +306,68 @@ func (TaskType) EnumDescriptor() ([]byte, []int) { return file_temporal_server_api_enums_v1_task_proto_rawDescGZIP(), []int{1} } +type ActivityCommandType int32 + +const ( + ACTIVITY_COMMAND_TYPE_UNSPECIFIED ActivityCommandType = 0 + ACTIVITY_COMMAND_TYPE_CANCEL ActivityCommandType = 1 +) + +var ( + ActivityCommandType_name = map[int32]string{ + 0: "ACTIVITY_COMMAND_TYPE_UNSPECIFIED", + 1: "ACTIVITY_COMMAND_TYPE_CANCEL", + } + ActivityCommandType_value = map[string]int32{ + "ACTIVITY_COMMAND_TYPE_UNSPECIFIED": 0, + "ACTIVITY_COMMAND_TYPE_CANCEL": 1, + } +) + +func (x ActivityCommandType) Enum() *ActivityCommandType { + p := new(ActivityCommandType) + *p = x + return p +} + +func (x ActivityCommandType) String() string { + switch x { + case ACTIVITY_COMMAND_TYPE_UNSPECIFIED: + return "Unspecified" + case ACTIVITY_COMMAND_TYPE_CANCEL: + return "Cancel" + default: + return strconv.Itoa(int(x)) + } + +} + +func (ActivityCommandType) Descriptor() protoreflect.EnumDescriptor { + return file_temporal_server_api_enums_v1_task_proto_enumTypes[2].Descriptor() +} + +func (ActivityCommandType) Type() protoreflect.EnumType { + return &file_temporal_server_api_enums_v1_task_proto_enumTypes[2] +} + +func (x ActivityCommandType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +func (ActivityCommandType) EnumDescriptor() ([]byte, []int) { + return file_temporal_server_api_enums_v1_task_proto_rawDescGZIP(), []int{2} +} + type TaskPriority int32 const ( TASK_PRIORITY_UNSPECIFIED TaskPriority = 0 TASK_PRIORITY_HIGH TaskPriority = 1 - + // gap between index can be used for future priority levels if needed TASK_PRIORITY_LOW TaskPriority = 10 ) +// Enum value maps for TaskPriority. var ( TaskPriority_name = map[int32]string{ 0: "TASK_PRIORITY_UNSPECIFIED", @@ -343,19 +402,20 @@ func (x TaskPriority) String() string { } func (TaskPriority) Descriptor() protoreflect.EnumDescriptor { - return file_temporal_server_api_enums_v1_task_proto_enumTypes[2].Descriptor() + return file_temporal_server_api_enums_v1_task_proto_enumTypes[3].Descriptor() } func (TaskPriority) Type() protoreflect.EnumType { - return &file_temporal_server_api_enums_v1_task_proto_enumTypes[2] + return &file_temporal_server_api_enums_v1_task_proto_enumTypes[3] } func (x TaskPriority) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } +// Deprecated: Use TaskPriority.Descriptor instead. func (TaskPriority) EnumDescriptor() ([]byte, []int) { - return file_temporal_server_api_enums_v1_task_proto_rawDescGZIP(), []int{2} + return file_temporal_server_api_enums_v1_task_proto_rawDescGZIP(), []int{3} } var File_temporal_server_api_enums_v1_task_proto protoreflect.FileDescriptor @@ -367,7 +427,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*\xd6\t\n" + "\bTaskType\x12\x19\n" + "\x15TASK_TYPE_UNSPECIFIED\x10\x00\x12!\n" + "\x1dTASK_TYPE_REPLICATION_HISTORY\x10\x01\x12'\n" + @@ -400,7 +460,11 @@ 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\x1e\n" + + "\x1aTASK_TYPE_ACTIVITY_COMMAND\x10\"\"\x04\b\t\x10\t\"\x04\b\v\x10\v\"\x04\b\x17\x10\x17*^\n" + + "\x13ActivityCommandType\x12%\n" + + "!ACTIVITY_COMMAND_TYPE_UNSPECIFIED\x10\x00\x12 \n" + + "\x1cACTIVITY_COMMAND_TYPE_CANCEL\x10\x01*\\\n" + "\fTaskPriority\x12\x1d\n" + "\x19TASK_PRIORITY_UNSPECIFIED\x10\x00\x12\x16\n" + "\x12TASK_PRIORITY_HIGH\x10\x01\x12\x15\n" + @@ -419,11 +483,12 @@ func file_temporal_server_api_enums_v1_task_proto_rawDescGZIP() []byte { return file_temporal_server_api_enums_v1_task_proto_rawDescData } -var file_temporal_server_api_enums_v1_task_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_temporal_server_api_enums_v1_task_proto_enumTypes = make([]protoimpl.EnumInfo, 4) var file_temporal_server_api_enums_v1_task_proto_goTypes = []any{ - (TaskSource)(0), // 0: temporal.server.api.enums.v1.TaskSource - (TaskType)(0), // 1: temporal.server.api.enums.v1.TaskType - (TaskPriority)(0), // 2: temporal.server.api.enums.v1.TaskPriority + (TaskSource)(0), // 0: temporal.server.api.enums.v1.TaskSource + (TaskType)(0), // 1: temporal.server.api.enums.v1.TaskType + (ActivityCommandType)(0), // 2: temporal.server.api.enums.v1.ActivityCommandType + (TaskPriority)(0), // 3: temporal.server.api.enums.v1.TaskPriority } var file_temporal_server_api_enums_v1_task_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type @@ -443,7 +508,7 @@ func file_temporal_server_api_enums_v1_task_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_temporal_server_api_enums_v1_task_proto_rawDesc), len(file_temporal_server_api_enums_v1_task_proto_rawDesc)), - NumEnums: 3, + NumEnums: 4, NumMessages: 0, NumExtensions: 0, NumServices: 0, diff --git a/api/persistence/v1/executions.go-helpers.pb.go b/api/persistence/v1/executions.go-helpers.pb.go index b6e6a0dcd1..965f8080bb 100644 --- a/api/persistence/v1/executions.go-helpers.pb.go +++ b/api/persistence/v1/executions.go-helpers.pb.go @@ -412,6 +412,43 @@ func (this *OutboundTaskInfo) Equal(that interface{}) bool { return proto.Equal(this, that1) } +// Marshal an object of type ActivityCommandTaskInfo to the protobuf v3 wire format +func (val *ActivityCommandTaskInfo) Marshal() ([]byte, error) { + return proto.Marshal(val) +} + +// Unmarshal an object of type ActivityCommandTaskInfo from the protobuf v3 wire format +func (val *ActivityCommandTaskInfo) Unmarshal(buf []byte) error { + return proto.Unmarshal(buf, val) +} + +// Size returns the size of the object, in bytes, once serialized +func (val *ActivityCommandTaskInfo) Size() int { + return proto.Size(val) +} + +// Equal returns whether two ActivityCommandTaskInfo 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 *ActivityCommandTaskInfo) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + var that1 *ActivityCommandTaskInfo + switch t := that.(type) { + case *ActivityCommandTaskInfo: + that1 = t + case ActivityCommandTaskInfo: + that1 = &t + default: + return false + } + + return proto.Equal(this, that1) +} + // Marshal an object of type NexusInvocationTaskInfo to the protobuf v3 wire format func (val *NexusInvocationTaskInfo) Marshal() ([]byte, error) { return proto.Marshal(val) diff --git a/api/persistence/v1/executions.pb.go b/api/persistence/v1/executions.pb.go index d14e49bf16..fea1986e34 100644 --- a/api/persistence/v1/executions.pb.go +++ b/api/persistence/v1/executions.pb.go @@ -2214,6 +2214,7 @@ type OutboundTaskInfo struct { // // *OutboundTaskInfo_StateMachineInfo // *OutboundTaskInfo_ChasmTaskInfo + // *OutboundTaskInfo_ActivityCommandInfo TaskDetails isOutboundTaskInfo_TaskDetails `protobuf_oneof:"task_details"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -2323,6 +2324,15 @@ func (x *OutboundTaskInfo) GetChasmTaskInfo() *ChasmTaskInfo { return nil } +func (x *OutboundTaskInfo) GetActivityCommandInfo() *ActivityCommandTaskInfo { + if x != nil { + if x, ok := x.TaskDetails.(*OutboundTaskInfo_ActivityCommandInfo); ok { + return x.ActivityCommandInfo + } + } + return nil +} + type isOutboundTaskInfo_TaskDetails interface { isOutboundTaskInfo_TaskDetails() } @@ -2337,10 +2347,72 @@ type OutboundTaskInfo_ChasmTaskInfo struct { ChasmTaskInfo *ChasmTaskInfo `protobuf:"bytes,9,opt,name=chasm_task_info,json=chasmTaskInfo,proto3,oneof"` } +type OutboundTaskInfo_ActivityCommandInfo struct { + // If the task is an activity command task. + ActivityCommandInfo *ActivityCommandTaskInfo `protobuf:"bytes,10,opt,name=activity_command_info,json=activityCommandInfo,proto3,oneof"` +} + func (*OutboundTaskInfo_StateMachineInfo) isOutboundTaskInfo_TaskDetails() {} func (*OutboundTaskInfo_ChasmTaskInfo) isOutboundTaskInfo_TaskDetails() {} +func (*OutboundTaskInfo_ActivityCommandInfo) isOutboundTaskInfo_TaskDetails() {} + +// ActivityCommandTaskInfo contains details for activity command operations. +type ActivityCommandTaskInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Type of command to send. + CommandType v1.ActivityCommandType `protobuf:"varint,1,opt,name=command_type,json=commandType,proto3,enum=temporal.server.api.enums.v1.ActivityCommandType" json:"command_type,omitempty"` + // Scheduled event IDs of activities to send command to. + ScheduledEventIds []int64 `protobuf:"varint,2,rep,packed,name=scheduled_event_ids,json=scheduledEventIds,proto3" json:"scheduled_event_ids,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActivityCommandTaskInfo) Reset() { + *x = ActivityCommandTaskInfo{} + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActivityCommandTaskInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActivityCommandTaskInfo) ProtoMessage() {} + +func (x *ActivityCommandTaskInfo) ProtoReflect() protoreflect.Message { + 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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ActivityCommandTaskInfo.ProtoReflect.Descriptor instead. +func (*ActivityCommandTaskInfo) Descriptor() ([]byte, []int) { + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{11} +} + +func (x *ActivityCommandTaskInfo) GetCommandType() v1.ActivityCommandType { + if x != nil { + return x.CommandType + } + return v1.ActivityCommandType(0) +} + +func (x *ActivityCommandTaskInfo) GetScheduledEventIds() []int64 { + if x != nil { + return x.ScheduledEventIds + } + return nil +} + type NexusInvocationTaskInfo struct { state protoimpl.MessageState `protogen:"open.v1"` Attempt int32 `protobuf:"varint,1,opt,name=attempt,proto3" json:"attempt,omitempty"` @@ -2350,7 +2422,7 @@ type NexusInvocationTaskInfo struct { func (x *NexusInvocationTaskInfo) Reset() { *x = NexusInvocationTaskInfo{} - 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) } @@ -2362,7 +2434,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[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 { @@ -2375,7 +2447,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{11} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{12} } func (x *NexusInvocationTaskInfo) GetAttempt() int32 { @@ -2394,7 +2466,7 @@ type NexusCancelationTaskInfo struct { func (x *NexusCancelationTaskInfo) Reset() { *x = NexusCancelationTaskInfo{} - 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) } @@ -2406,7 +2478,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[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 { @@ -2419,7 +2491,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{12} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{13} } func (x *NexusCancelationTaskInfo) GetAttempt() int32 { @@ -2529,7 +2601,7 @@ type ActivityInfo struct { func (x *ActivityInfo) Reset() { *x = ActivityInfo{} - 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) } @@ -2541,7 +2613,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[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 { @@ -2554,7 +2626,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{13} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14} } func (x *ActivityInfo) GetVersion() int64 { @@ -2943,7 +3015,7 @@ type TimerInfo struct { func (x *TimerInfo) Reset() { *x = TimerInfo{} - 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) } @@ -2955,7 +3027,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[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 { @@ -2968,7 +3040,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{14} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{15} } func (x *TimerInfo) GetVersion() int64 { @@ -3036,7 +3108,7 @@ type ChildExecutionInfo struct { func (x *ChildExecutionInfo) Reset() { *x = ChildExecutionInfo{} - 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) } @@ -3048,7 +3120,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[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 { @@ -3061,7 +3133,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{15} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{16} } func (x *ChildExecutionInfo) GetVersion() int64 { @@ -3176,7 +3248,7 @@ type RequestCancelInfo struct { func (x *RequestCancelInfo) Reset() { *x = RequestCancelInfo{} - 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) } @@ -3188,7 +3260,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[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 { @@ -3201,7 +3273,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{16} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{17} } func (x *RequestCancelInfo) GetVersion() int64 { @@ -3253,7 +3325,7 @@ type SignalInfo struct { func (x *SignalInfo) Reset() { *x = SignalInfo{} - 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) } @@ -3265,7 +3337,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[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 { @@ -3278,7 +3350,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{17} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{18} } func (x *SignalInfo) GetVersion() int64 { @@ -3328,7 +3400,7 @@ type Checksum struct { func (x *Checksum) Reset() { *x = Checksum{} - 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) } @@ -3340,7 +3412,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[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 { @@ -3353,7 +3425,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{18} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{19} } func (x *Checksum) GetVersion() int32 { @@ -3391,7 +3463,7 @@ type Callback struct { func (x *Callback) Reset() { *x = Callback{} - 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) } @@ -3403,7 +3475,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[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 { @@ -3416,7 +3488,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{19} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20} } func (x *Callback) GetVariant() isCallback_Variant { @@ -3483,7 +3555,7 @@ type HSMCompletionCallbackArg struct { func (x *HSMCompletionCallbackArg) Reset() { *x = HSMCompletionCallbackArg{} - 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) } @@ -3495,7 +3567,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[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 { @@ -3508,7 +3580,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{20} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{21} } func (x *HSMCompletionCallbackArg) GetNamespaceId() string { @@ -3565,7 +3637,7 @@ type CallbackInfo struct { func (x *CallbackInfo) Reset() { *x = CallbackInfo{} - 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) } @@ -3577,7 +3649,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[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 { @@ -3590,7 +3662,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{21} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22} } func (x *CallbackInfo) GetCallback() *Callback { @@ -3711,7 +3783,7 @@ type NexusOperationInfo struct { func (x *NexusOperationInfo) Reset() { *x = NexusOperationInfo{} - 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) } @@ -3723,7 +3795,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[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 { @@ -3736,7 +3808,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{22} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{23} } func (x *NexusOperationInfo) GetEndpoint() string { @@ -3881,7 +3953,7 @@ type NexusOperationCancellationInfo struct { func (x *NexusOperationCancellationInfo) Reset() { *x = NexusOperationCancellationInfo{} - 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) } @@ -3893,7 +3965,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[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 { @@ -3906,7 +3978,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{23} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{24} } func (x *NexusOperationCancellationInfo) GetRequestedTime() *timestamppb.Timestamp { @@ -3969,7 +4041,7 @@ type ResetChildInfo struct { func (x *ResetChildInfo) Reset() { *x = ResetChildInfo{} - 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) } @@ -3981,7 +4053,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[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 { @@ -3994,7 +4066,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{24} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{25} } func (x *ResetChildInfo) GetShouldTerminateAndStart() bool { @@ -4020,7 +4092,7 @@ type WorkflowPauseInfo struct { func (x *WorkflowPauseInfo) Reset() { *x = WorkflowPauseInfo{} - 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) } @@ -4032,7 +4104,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[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 { @@ -4045,7 +4117,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{25} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{26} } func (x *WorkflowPauseInfo) GetPauseTime() *timestamppb.Timestamp { @@ -4087,7 +4159,7 @@ type TransferTaskInfo_CloseExecutionTaskDetails struct { func (x *TransferTaskInfo_CloseExecutionTaskDetails) Reset() { *x = TransferTaskInfo_CloseExecutionTaskDetails{} - mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[34] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4099,7 +4171,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[34] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[35] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4136,7 +4208,7 @@ type ActivityInfo_UseWorkflowBuildIdInfo struct { func (x *ActivityInfo_UseWorkflowBuildIdInfo) Reset() { *x = ActivityInfo_UseWorkflowBuildIdInfo{} - 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) } @@ -4148,7 +4220,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[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 { @@ -4161,7 +4233,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{13, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14, 0} } func (x *ActivityInfo_UseWorkflowBuildIdInfo) GetLastUsedBuildId() string { @@ -4193,7 +4265,7 @@ type ActivityInfo_PauseInfo struct { func (x *ActivityInfo_PauseInfo) Reset() { *x = ActivityInfo_PauseInfo{} - 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) } @@ -4205,7 +4277,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[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 { @@ -4218,7 +4290,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{13, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14, 1} } func (x *ActivityInfo_PauseInfo) GetPauseTime() *timestamppb.Timestamp { @@ -4283,7 +4355,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[37] + mi := &file_temporal_server_api_persistence_v1_executions_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4295,7 +4367,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[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 { @@ -4308,7 +4380,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{13, 1, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{14, 1, 0} } func (x *ActivityInfo_PauseInfo_Manual) GetIdentity() string { @@ -4340,7 +4412,7 @@ type Callback_Nexus struct { func (x *Callback_Nexus) Reset() { *x = Callback_Nexus{} - 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) } @@ -4352,7 +4424,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[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 { @@ -4365,7 +4437,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{19, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20, 0} } func (x *Callback_Nexus) GetUrl() string { @@ -4402,7 +4474,7 @@ type Callback_HSM struct { func (x *Callback_HSM) Reset() { *x = Callback_HSM{} - 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) } @@ -4414,7 +4486,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[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 { @@ -4427,7 +4499,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{19, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{20, 1} } func (x *Callback_HSM) GetNamespaceId() string { @@ -4474,7 +4546,7 @@ type CallbackInfo_WorkflowClosed struct { func (x *CallbackInfo_WorkflowClosed) Reset() { *x = CallbackInfo_WorkflowClosed{} - 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) } @@ -4486,7 +4558,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[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 { @@ -4499,7 +4571,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{21, 0} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22, 0} } type CallbackInfo_Trigger struct { @@ -4514,7 +4586,7 @@ type CallbackInfo_Trigger struct { func (x *CallbackInfo_Trigger) Reset() { *x = CallbackInfo_Trigger{} - 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) } @@ -4526,7 +4598,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[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 { @@ -4539,7 +4611,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{21, 1} + return file_temporal_server_api_persistence_v1_executions_proto_rawDescGZIP(), []int{22, 1} } func (x *CallbackInfo_Trigger) GetVariant() isCallbackInfo_Trigger_Variant { @@ -4833,7 +4905,7 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\x06run_id\x18\x04 \x01(\tR\x05runId\x12C\n" + "\ttask_type\x18\x05 \x01(\x0e2&.temporal.server.api.enums.v1.TaskTypeR\btaskType\x12\x18\n" + "\aversion\x18\x06 \x01(\x03R\aversion\x12C\n" + - "\x0fvisibility_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x0evisibilityTime\"\x89\x04\n" + + "\x0fvisibility_time\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\x0evisibilityTime\"\xfc\x04\n" + "\x10OutboundTaskInfo\x12!\n" + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1f\n" + "\vworkflow_id\x18\x02 \x01(\tR\n" + @@ -4844,8 +4916,13 @@ const file_temporal_server_api_persistence_v1_executions_proto_rawDesc = "" + "\x0fvisibility_time\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\x0evisibilityTime\x12 \n" + "\vdestination\x18\a \x01(\tR\vdestination\x12h\n" + "\x12state_machine_info\x18\b \x01(\v28.temporal.server.api.persistence.v1.StateMachineTaskInfoH\x00R\x10stateMachineInfo\x12[\n" + - "\x0fchasm_task_info\x18\t \x01(\v21.temporal.server.api.persistence.v1.ChasmTaskInfoH\x00R\rchasmTaskInfoB\x0e\n" + - "\ftask_details\"3\n" + + "\x0fchasm_task_info\x18\t \x01(\v21.temporal.server.api.persistence.v1.ChasmTaskInfoH\x00R\rchasmTaskInfo\x12q\n" + + "\x15activity_command_info\x18\n" + + " \x01(\v2;.temporal.server.api.persistence.v1.ActivityCommandTaskInfoH\x00R\x13activityCommandInfoB\x0e\n" + + "\ftask_details\"\x9f\x01\n" + + "\x17ActivityCommandTaskInfo\x12T\n" + + "\fcommand_type\x18\x01 \x01(\x0e21.temporal.server.api.enums.v1.ActivityCommandTypeR\vcommandType\x12.\n" + + "\x13scheduled_event_ids\x18\x02 \x03(\x03R\x11scheduledEventIds\"3\n" + "\x17NexusInvocationTaskInfo\x12\x18\n" + "\aattempt\x18\x01 \x01(\x05R\aattempt\"4\n" + "\x18NexusCancelationTaskInfo\x12\x18\n" + @@ -5051,7 +5128,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, 43) +var file_temporal_server_api_persistence_v1_executions_proto_msgTypes = make([]protoimpl.MessageInfo, 44) 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 @@ -5064,232 +5141,236 @@ var file_temporal_server_api_persistence_v1_executions_proto_goTypes = []any{ (*TimerTaskInfo)(nil), // 8: temporal.server.api.persistence.v1.TimerTaskInfo (*ArchivalTaskInfo)(nil), // 9: temporal.server.api.persistence.v1.ArchivalTaskInfo (*OutboundTaskInfo)(nil), // 10: temporal.server.api.persistence.v1.OutboundTaskInfo - (*NexusInvocationTaskInfo)(nil), // 11: temporal.server.api.persistence.v1.NexusInvocationTaskInfo - (*NexusCancelationTaskInfo)(nil), // 12: temporal.server.api.persistence.v1.NexusCancelationTaskInfo - (*ActivityInfo)(nil), // 13: temporal.server.api.persistence.v1.ActivityInfo - (*TimerInfo)(nil), // 14: temporal.server.api.persistence.v1.TimerInfo - (*ChildExecutionInfo)(nil), // 15: temporal.server.api.persistence.v1.ChildExecutionInfo - (*RequestCancelInfo)(nil), // 16: temporal.server.api.persistence.v1.RequestCancelInfo - (*SignalInfo)(nil), // 17: temporal.server.api.persistence.v1.SignalInfo - (*Checksum)(nil), // 18: temporal.server.api.persistence.v1.Checksum - (*Callback)(nil), // 19: temporal.server.api.persistence.v1.Callback - (*HSMCompletionCallbackArg)(nil), // 20: temporal.server.api.persistence.v1.HSMCompletionCallbackArg - (*CallbackInfo)(nil), // 21: temporal.server.api.persistence.v1.CallbackInfo - (*NexusOperationInfo)(nil), // 22: temporal.server.api.persistence.v1.NexusOperationInfo - (*NexusOperationCancellationInfo)(nil), // 23: temporal.server.api.persistence.v1.NexusOperationCancellationInfo - (*ResetChildInfo)(nil), // 24: temporal.server.api.persistence.v1.ResetChildInfo - (*WorkflowPauseInfo)(nil), // 25: temporal.server.api.persistence.v1.WorkflowPauseInfo - nil, // 26: temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry - nil, // 27: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry - nil, // 28: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry - nil, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry - nil, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry - nil, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry - nil, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry - nil, // 33: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - (*TransferTaskInfo_CloseExecutionTaskDetails)(nil), // 34: temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - (*ActivityInfo_UseWorkflowBuildIdInfo)(nil), // 35: temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - (*ActivityInfo_PauseInfo)(nil), // 36: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - (*ActivityInfo_PauseInfo_Manual)(nil), // 37: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - (*Callback_Nexus)(nil), // 38: temporal.server.api.persistence.v1.Callback.Nexus - (*Callback_HSM)(nil), // 39: temporal.server.api.persistence.v1.Callback.HSM - nil, // 40: temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - (*CallbackInfo_WorkflowClosed)(nil), // 41: temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - (*CallbackInfo_Trigger)(nil), // 42: temporal.server.api.persistence.v1.CallbackInfo.Trigger - (*timestamppb.Timestamp)(nil), // 43: google.protobuf.Timestamp - (*durationpb.Duration)(nil), // 44: google.protobuf.Duration - (v1.WorkflowTaskType)(0), // 45: temporal.server.api.enums.v1.WorkflowTaskType - (v11.SuggestContinueAsNewReason)(0), // 46: temporal.api.enums.v1.SuggestContinueAsNewReason - (*v12.ResetPoints)(nil), // 47: temporal.api.workflow.v1.ResetPoints - (*v14.VersionHistories)(nil), // 48: temporal.server.api.history.v1.VersionHistories - (*v15.VectorClock)(nil), // 49: temporal.server.api.clock.v1.VectorClock - (*v16.BaseExecutionInfo)(nil), // 50: temporal.server.api.workflow.v1.BaseExecutionInfo - (*v13.WorkerVersionStamp)(nil), // 51: temporal.api.common.v1.WorkerVersionStamp - (*VersionedTransition)(nil), // 52: temporal.server.api.persistence.v1.VersionedTransition - (*StateMachineTimerGroup)(nil), // 53: temporal.server.api.persistence.v1.StateMachineTimerGroup - (*StateMachineTombstoneBatch)(nil), // 54: temporal.server.api.persistence.v1.StateMachineTombstoneBatch - (*v12.WorkflowExecutionVersioningInfo)(nil), // 55: temporal.api.workflow.v1.WorkflowExecutionVersioningInfo - (*v13.Priority)(nil), // 56: temporal.api.common.v1.Priority - (v11.WorkflowTaskFailedCause)(0), // 57: temporal.api.enums.v1.WorkflowTaskFailedCause - (v11.TimeoutType)(0), // 58: temporal.api.enums.v1.TimeoutType - (v1.WorkflowExecutionState)(0), // 59: temporal.server.api.enums.v1.WorkflowExecutionState - (v11.WorkflowExecutionStatus)(0), // 60: temporal.api.enums.v1.WorkflowExecutionStatus - (v11.EventType)(0), // 61: temporal.api.enums.v1.EventType - (v1.TaskType)(0), // 62: temporal.server.api.enums.v1.TaskType - (*ChasmTaskInfo)(nil), // 63: temporal.server.api.persistence.v1.ChasmTaskInfo - (v1.TaskPriority)(0), // 64: temporal.server.api.enums.v1.TaskPriority - (*v14.VersionHistoryItem)(nil), // 65: temporal.server.api.history.v1.VersionHistoryItem - (v1.WorkflowBackoffType)(0), // 66: temporal.server.api.enums.v1.WorkflowBackoffType - (*StateMachineTaskInfo)(nil), // 67: temporal.server.api.persistence.v1.StateMachineTaskInfo - (*v17.Failure)(nil), // 68: temporal.api.failure.v1.Failure - (*v13.Payloads)(nil), // 69: temporal.api.common.v1.Payloads - (*v13.ActivityType)(nil), // 70: temporal.api.common.v1.ActivityType - (*v18.Deployment)(nil), // 71: temporal.api.deployment.v1.Deployment - (*v18.WorkerDeploymentVersion)(nil), // 72: temporal.api.deployment.v1.WorkerDeploymentVersion - (v11.ParentClosePolicy)(0), // 73: temporal.api.enums.v1.ParentClosePolicy - (v1.ChecksumFlavor)(0), // 74: temporal.server.api.enums.v1.ChecksumFlavor - (*v13.Link)(nil), // 75: temporal.api.common.v1.Link - (*v19.HistoryEvent)(nil), // 76: temporal.api.history.v1.HistoryEvent - (v1.CallbackState)(0), // 77: temporal.server.api.enums.v1.CallbackState - (v1.NexusOperationState)(0), // 78: temporal.server.api.enums.v1.NexusOperationState - (v11.NexusOperationCancellationState)(0), // 79: temporal.api.enums.v1.NexusOperationCancellationState - (*QueueState)(nil), // 80: temporal.server.api.persistence.v1.QueueState - (*v13.Payload)(nil), // 81: temporal.api.common.v1.Payload - (*UpdateInfo)(nil), // 82: temporal.server.api.persistence.v1.UpdateInfo - (*StateMachineMap)(nil), // 83: temporal.server.api.persistence.v1.StateMachineMap - (*StateMachineRef)(nil), // 84: temporal.server.api.persistence.v1.StateMachineRef + (*ActivityCommandTaskInfo)(nil), // 11: temporal.server.api.persistence.v1.ActivityCommandTaskInfo + (*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 + (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 + (v1.ActivityCommandType)(0), // 69: temporal.server.api.enums.v1.ActivityCommandType + (*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 + (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 } var file_temporal_server_api_persistence_v1_executions_proto_depIdxs = []int32{ - 43, // 0: temporal.server.api.persistence.v1.ShardInfo.update_time:type_name -> google.protobuf.Timestamp - 26, // 1: temporal.server.api.persistence.v1.ShardInfo.replication_dlq_ack_level:type_name -> temporal.server.api.persistence.v1.ShardInfo.ReplicationDlqAckLevelEntry - 27, // 2: temporal.server.api.persistence.v1.ShardInfo.queue_states:type_name -> temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry - 44, // 3: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_timeout:type_name -> google.protobuf.Duration - 44, // 4: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_timeout:type_name -> google.protobuf.Duration - 44, // 5: temporal.server.api.persistence.v1.WorkflowExecutionInfo.default_workflow_task_timeout:type_name -> google.protobuf.Duration - 43, // 6: temporal.server.api.persistence.v1.WorkflowExecutionInfo.start_time:type_name -> google.protobuf.Timestamp - 43, // 7: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_update_time:type_name -> google.protobuf.Timestamp - 44, // 8: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_timeout:type_name -> google.protobuf.Duration - 43, // 9: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_started_time:type_name -> google.protobuf.Timestamp - 43, // 10: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_scheduled_time:type_name -> google.protobuf.Timestamp - 43, // 11: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_original_scheduled_time:type_name -> google.protobuf.Timestamp - 45, // 12: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_type:type_name -> temporal.server.api.enums.v1.WorkflowTaskType - 46, // 13: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_suggest_continue_as_new_reasons:type_name -> temporal.api.enums.v1.SuggestContinueAsNewReason - 44, // 14: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sticky_schedule_to_start_timeout:type_name -> google.protobuf.Duration - 44, // 15: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 44, // 16: temporal.server.api.persistence.v1.WorkflowExecutionInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 43, // 17: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_execution_expiration_time:type_name -> google.protobuf.Timestamp - 47, // 18: temporal.server.api.persistence.v1.WorkflowExecutionInfo.auto_reset_points:type_name -> temporal.api.workflow.v1.ResetPoints - 28, // 19: temporal.server.api.persistence.v1.WorkflowExecutionInfo.search_attributes:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry - 29, // 20: temporal.server.api.persistence.v1.WorkflowExecutionInfo.memo:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry - 48, // 21: temporal.server.api.persistence.v1.WorkflowExecutionInfo.version_histories:type_name -> temporal.server.api.history.v1.VersionHistories + 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 2, // 22: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_stats:type_name -> temporal.server.api.persistence.v1.ExecutionStats - 43, // 23: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_run_expiration_time:type_name -> google.protobuf.Timestamp - 43, // 24: temporal.server.api.persistence.v1.WorkflowExecutionInfo.execution_time:type_name -> google.protobuf.Timestamp - 49, // 25: temporal.server.api.persistence.v1.WorkflowExecutionInfo.parent_clock:type_name -> temporal.server.api.clock.v1.VectorClock - 43, // 26: temporal.server.api.persistence.v1.WorkflowExecutionInfo.close_time:type_name -> google.protobuf.Timestamp - 50, // 27: temporal.server.api.persistence.v1.WorkflowExecutionInfo.base_execution_info:type_name -> temporal.server.api.workflow.v1.BaseExecutionInfo - 51, // 28: temporal.server.api.persistence.v1.WorkflowExecutionInfo.most_recent_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 30, // 29: temporal.server.api.persistence.v1.WorkflowExecutionInfo.update_infos:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry - 52, // 30: temporal.server.api.persistence.v1.WorkflowExecutionInfo.transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 31, // 31: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machines_by_type:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry - 53, // 32: temporal.server.api.persistence.v1.WorkflowExecutionInfo.state_machine_timers:type_name -> temporal.server.api.persistence.v1.StateMachineTimerGroup - 52, // 33: temporal.server.api.persistence.v1.WorkflowExecutionInfo.workflow_task_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 52, // 34: temporal.server.api.persistence.v1.WorkflowExecutionInfo.visibility_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 52, // 35: temporal.server.api.persistence.v1.WorkflowExecutionInfo.signal_request_ids_last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 54, // 36: temporal.server.api.persistence.v1.WorkflowExecutionInfo.sub_state_machine_tombstone_batches:type_name -> temporal.server.api.persistence.v1.StateMachineTombstoneBatch - 55, // 37: temporal.server.api.persistence.v1.WorkflowExecutionInfo.versioning_info:type_name -> temporal.api.workflow.v1.WorkflowExecutionVersioningInfo - 52, // 38: temporal.server.api.persistence.v1.WorkflowExecutionInfo.previous_transition_history:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 52, // 39: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_transition_history_break_point:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 32, // 40: temporal.server.api.persistence.v1.WorkflowExecutionInfo.children_initialized_post_reset_point:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry - 56, // 41: temporal.server.api.persistence.v1.WorkflowExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 25, // 42: temporal.server.api.persistence.v1.WorkflowExecutionInfo.pause_info:type_name -> temporal.server.api.persistence.v1.WorkflowPauseInfo - 57, // 43: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_failure_cause:type_name -> temporal.api.enums.v1.WorkflowTaskFailedCause - 58, // 44: temporal.server.api.persistence.v1.WorkflowExecutionInfo.last_workflow_task_timed_out_type:type_name -> temporal.api.enums.v1.TimeoutType - 59, // 45: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState - 60, // 46: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus - 52, // 47: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 43, // 48: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp - 33, // 49: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry - 61, // 50: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType - 62, // 51: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 43, // 52: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 34, // 53: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails - 63, // 54: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 62, // 55: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 43, // 56: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 64, // 57: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority - 52, // 58: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 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 + 60, // 45: temporal.server.api.persistence.v1.WorkflowExecutionState.state:type_name -> temporal.server.api.enums.v1.WorkflowExecutionState + 61, // 46: temporal.server.api.persistence.v1.WorkflowExecutionState.status:type_name -> temporal.api.enums.v1.WorkflowExecutionStatus + 53, // 47: temporal.server.api.persistence.v1.WorkflowExecutionState.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition + 44, // 48: temporal.server.api.persistence.v1.WorkflowExecutionState.start_time:type_name -> google.protobuf.Timestamp + 34, // 49: temporal.server.api.persistence.v1.WorkflowExecutionState.request_ids:type_name -> temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry + 62, // 50: temporal.server.api.persistence.v1.RequestIDInfo.event_type:type_name -> temporal.api.enums.v1.EventType + 63, // 51: temporal.server.api.persistence.v1.TransferTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 52: temporal.server.api.persistence.v1.TransferTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 35, // 53: temporal.server.api.persistence.v1.TransferTaskInfo.close_execution_task_details:type_name -> temporal.server.api.persistence.v1.TransferTaskInfo.CloseExecutionTaskDetails + 64, // 54: temporal.server.api.persistence.v1.TransferTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 63, // 55: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 56: temporal.server.api.persistence.v1.ReplicationTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 65, // 57: temporal.server.api.persistence.v1.ReplicationTaskInfo.priority:type_name -> temporal.server.api.enums.v1.TaskPriority + 53, // 58: temporal.server.api.persistence.v1.ReplicationTaskInfo.versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition 6, // 59: temporal.server.api.persistence.v1.ReplicationTaskInfo.task_equivalents:type_name -> temporal.server.api.persistence.v1.ReplicationTaskInfo - 65, // 60: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem - 62, // 61: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 43, // 62: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 43, // 63: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp - 63, // 64: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 62, // 65: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 58, // 66: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType - 66, // 67: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType - 43, // 68: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 63, // 69: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 62, // 70: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 43, // 71: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 62, // 72: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType - 43, // 73: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp - 67, // 74: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo - 63, // 75: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo - 43, // 76: temporal.server.api.persistence.v1.ActivityInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 43, // 77: temporal.server.api.persistence.v1.ActivityInfo.started_time:type_name -> google.protobuf.Timestamp - 44, // 78: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 44, // 79: temporal.server.api.persistence.v1.ActivityInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 44, // 80: temporal.server.api.persistence.v1.ActivityInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 44, // 81: temporal.server.api.persistence.v1.ActivityInfo.heartbeat_timeout:type_name -> google.protobuf.Duration - 44, // 82: temporal.server.api.persistence.v1.ActivityInfo.retry_initial_interval:type_name -> google.protobuf.Duration - 44, // 83: temporal.server.api.persistence.v1.ActivityInfo.retry_maximum_interval:type_name -> google.protobuf.Duration - 43, // 84: temporal.server.api.persistence.v1.ActivityInfo.retry_expiration_time:type_name -> google.protobuf.Timestamp - 68, // 85: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure - 69, // 86: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_details:type_name -> temporal.api.common.v1.Payloads - 43, // 87: temporal.server.api.persistence.v1.ActivityInfo.last_heartbeat_update_time:type_name -> google.protobuf.Timestamp - 70, // 88: temporal.server.api.persistence.v1.ActivityInfo.activity_type:type_name -> temporal.api.common.v1.ActivityType - 35, // 89: temporal.server.api.persistence.v1.ActivityInfo.use_workflow_build_id_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.UseWorkflowBuildIdInfo - 51, // 90: temporal.server.api.persistence.v1.ActivityInfo.last_worker_version_stamp:type_name -> temporal.api.common.v1.WorkerVersionStamp - 52, // 91: temporal.server.api.persistence.v1.ActivityInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 43, // 92: temporal.server.api.persistence.v1.ActivityInfo.first_scheduled_time:type_name -> google.protobuf.Timestamp - 43, // 93: temporal.server.api.persistence.v1.ActivityInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 71, // 94: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment - 72, // 95: temporal.server.api.persistence.v1.ActivityInfo.last_deployment_version:type_name -> temporal.api.deployment.v1.WorkerDeploymentVersion - 56, // 96: temporal.server.api.persistence.v1.ActivityInfo.priority:type_name -> temporal.api.common.v1.Priority - 36, // 97: temporal.server.api.persistence.v1.ActivityInfo.pause_info:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo - 43, // 98: temporal.server.api.persistence.v1.TimerInfo.expiry_time:type_name -> google.protobuf.Timestamp - 52, // 99: temporal.server.api.persistence.v1.TimerInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 73, // 100: temporal.server.api.persistence.v1.ChildExecutionInfo.parent_close_policy:type_name -> temporal.api.enums.v1.ParentClosePolicy - 49, // 101: temporal.server.api.persistence.v1.ChildExecutionInfo.clock:type_name -> temporal.server.api.clock.v1.VectorClock - 52, // 102: temporal.server.api.persistence.v1.ChildExecutionInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 56, // 103: temporal.server.api.persistence.v1.ChildExecutionInfo.priority:type_name -> temporal.api.common.v1.Priority - 52, // 104: temporal.server.api.persistence.v1.RequestCancelInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 52, // 105: temporal.server.api.persistence.v1.SignalInfo.last_update_versioned_transition:type_name -> temporal.server.api.persistence.v1.VersionedTransition - 74, // 106: temporal.server.api.persistence.v1.Checksum.flavor:type_name -> temporal.server.api.enums.v1.ChecksumFlavor - 38, // 107: temporal.server.api.persistence.v1.Callback.nexus:type_name -> temporal.server.api.persistence.v1.Callback.Nexus - 39, // 108: temporal.server.api.persistence.v1.Callback.hsm:type_name -> temporal.server.api.persistence.v1.Callback.HSM - 75, // 109: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link - 76, // 110: temporal.server.api.persistence.v1.HSMCompletionCallbackArg.last_event:type_name -> temporal.api.history.v1.HistoryEvent - 19, // 111: temporal.server.api.persistence.v1.CallbackInfo.callback:type_name -> temporal.server.api.persistence.v1.Callback - 42, // 112: temporal.server.api.persistence.v1.CallbackInfo.trigger:type_name -> temporal.server.api.persistence.v1.CallbackInfo.Trigger - 43, // 113: temporal.server.api.persistence.v1.CallbackInfo.registration_time:type_name -> google.protobuf.Timestamp - 77, // 114: temporal.server.api.persistence.v1.CallbackInfo.state:type_name -> temporal.server.api.enums.v1.CallbackState - 43, // 115: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 68, // 116: temporal.server.api.persistence.v1.CallbackInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 43, // 117: temporal.server.api.persistence.v1.CallbackInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 44, // 118: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_close_timeout:type_name -> google.protobuf.Duration - 43, // 119: temporal.server.api.persistence.v1.NexusOperationInfo.scheduled_time:type_name -> google.protobuf.Timestamp - 78, // 120: temporal.server.api.persistence.v1.NexusOperationInfo.state:type_name -> temporal.server.api.enums.v1.NexusOperationState - 43, // 121: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 68, // 122: temporal.server.api.persistence.v1.NexusOperationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 43, // 123: temporal.server.api.persistence.v1.NexusOperationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 44, // 124: temporal.server.api.persistence.v1.NexusOperationInfo.schedule_to_start_timeout:type_name -> google.protobuf.Duration - 44, // 125: temporal.server.api.persistence.v1.NexusOperationInfo.start_to_close_timeout:type_name -> google.protobuf.Duration - 43, // 126: temporal.server.api.persistence.v1.NexusOperationInfo.started_time:type_name -> google.protobuf.Timestamp - 43, // 127: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.requested_time:type_name -> google.protobuf.Timestamp - 79, // 128: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.state:type_name -> temporal.api.enums.v1.NexusOperationCancellationState - 43, // 129: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_complete_time:type_name -> google.protobuf.Timestamp - 68, // 130: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.last_attempt_failure:type_name -> temporal.api.failure.v1.Failure - 43, // 131: temporal.server.api.persistence.v1.NexusOperationCancellationInfo.next_attempt_schedule_time:type_name -> google.protobuf.Timestamp - 43, // 132: temporal.server.api.persistence.v1.WorkflowPauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 80, // 133: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState - 81, // 134: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload - 81, // 135: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload - 82, // 136: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo - 83, // 137: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SubStateMachinesByTypeEntry.value:type_name -> temporal.server.api.persistence.v1.StateMachineMap - 24, // 138: temporal.server.api.persistence.v1.WorkflowExecutionInfo.ChildrenInitializedPostResetPointEntry.value:type_name -> temporal.server.api.persistence.v1.ResetChildInfo - 4, // 139: temporal.server.api.persistence.v1.WorkflowExecutionState.RequestIdsEntry.value:type_name -> temporal.server.api.persistence.v1.RequestIDInfo - 43, // 140: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.pause_time:type_name -> google.protobuf.Timestamp - 37, // 141: temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.manual:type_name -> temporal.server.api.persistence.v1.ActivityInfo.PauseInfo.Manual - 40, // 142: temporal.server.api.persistence.v1.Callback.Nexus.header:type_name -> temporal.server.api.persistence.v1.Callback.Nexus.HeaderEntry - 84, // 143: temporal.server.api.persistence.v1.Callback.HSM.ref:type_name -> temporal.server.api.persistence.v1.StateMachineRef - 41, // 144: temporal.server.api.persistence.v1.CallbackInfo.Trigger.workflow_closed:type_name -> temporal.server.api.persistence.v1.CallbackInfo.WorkflowClosed - 145, // [145:145] is the sub-list for method output_type - 145, // [145:145] is the sub-list for method input_type - 145, // [145:145] is the sub-list for extension type_name - 145, // [145:145] is the sub-list for extension extendee - 0, // [0:145] is the sub-list for field type_name + 66, // 60: temporal.server.api.persistence.v1.ReplicationTaskInfo.last_version_history_item:type_name -> temporal.server.api.history.v1.VersionHistoryItem + 63, // 61: temporal.server.api.persistence.v1.VisibilityTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 62: temporal.server.api.persistence.v1.VisibilityTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 44, // 63: temporal.server.api.persistence.v1.VisibilityTaskInfo.close_time:type_name -> google.protobuf.Timestamp + 64, // 64: temporal.server.api.persistence.v1.VisibilityTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 63, // 65: temporal.server.api.persistence.v1.TimerTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 59, // 66: temporal.server.api.persistence.v1.TimerTaskInfo.timeout_type:type_name -> temporal.api.enums.v1.TimeoutType + 67, // 67: temporal.server.api.persistence.v1.TimerTaskInfo.workflow_backoff_type:type_name -> temporal.server.api.enums.v1.WorkflowBackoffType + 44, // 68: temporal.server.api.persistence.v1.TimerTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 64, // 69: temporal.server.api.persistence.v1.TimerTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 63, // 70: temporal.server.api.persistence.v1.ArchivalTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 71: temporal.server.api.persistence.v1.ArchivalTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 63, // 72: temporal.server.api.persistence.v1.OutboundTaskInfo.task_type:type_name -> temporal.server.api.enums.v1.TaskType + 44, // 73: temporal.server.api.persistence.v1.OutboundTaskInfo.visibility_time:type_name -> google.protobuf.Timestamp + 68, // 74: temporal.server.api.persistence.v1.OutboundTaskInfo.state_machine_info:type_name -> temporal.server.api.persistence.v1.StateMachineTaskInfo + 64, // 75: temporal.server.api.persistence.v1.OutboundTaskInfo.chasm_task_info:type_name -> temporal.server.api.persistence.v1.ChasmTaskInfo + 11, // 76: temporal.server.api.persistence.v1.OutboundTaskInfo.activity_command_info:type_name -> temporal.server.api.persistence.v1.ActivityCommandTaskInfo + 69, // 77: temporal.server.api.persistence.v1.ActivityCommandTaskInfo.command_type:type_name -> temporal.server.api.enums.v1.ActivityCommandType + 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 + 70, // 87: temporal.server.api.persistence.v1.ActivityInfo.retry_last_failure:type_name -> temporal.api.failure.v1.Failure + 71, // 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 + 72, // 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 + 73, // 96: temporal.server.api.persistence.v1.ActivityInfo.last_started_deployment:type_name -> temporal.api.deployment.v1.Deployment + 74, // 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 + 75, // 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 + 76, // 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 + 77, // 111: temporal.server.api.persistence.v1.Callback.links:type_name -> temporal.api.common.v1.Link + 78, // 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 + 79, // 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 + 70, // 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 + 80, // 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 + 70, // 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 + 81, // 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 + 70, // 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 + 82, // 135: temporal.server.api.persistence.v1.ShardInfo.QueueStatesEntry.value:type_name -> temporal.server.api.persistence.v1.QueueState + 83, // 136: temporal.server.api.persistence.v1.WorkflowExecutionInfo.SearchAttributesEntry.value:type_name -> temporal.api.common.v1.Payload + 83, // 137: temporal.server.api.persistence.v1.WorkflowExecutionInfo.MemoEntry.value:type_name -> temporal.api.common.v1.Payload + 84, // 138: temporal.server.api.persistence.v1.WorkflowExecutionInfo.UpdateInfosEntry.value:type_name -> temporal.server.api.persistence.v1.UpdateInfo + 85, // 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 + 4, // 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 + 86, // 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 } func init() { file_temporal_server_api_persistence_v1_executions_proto_init() } @@ -5318,20 +5399,21 @@ func file_temporal_server_api_persistence_v1_executions_proto_init() { file_temporal_server_api_persistence_v1_executions_proto_msgTypes[10].OneofWrappers = []any{ (*OutboundTaskInfo_StateMachineInfo)(nil), (*OutboundTaskInfo_ChasmTaskInfo)(nil), + (*OutboundTaskInfo_ActivityCommandInfo)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[13].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[14].OneofWrappers = []any{ (*ActivityInfo_UseWorkflowBuildIdInfo_)(nil), (*ActivityInfo_LastIndependentlyAssignedBuildId)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[19].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[20].OneofWrappers = []any{ (*Callback_Nexus_)(nil), (*Callback_Hsm)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[36].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[37].OneofWrappers = []any{ (*ActivityInfo_PauseInfo_Manual_)(nil), (*ActivityInfo_PauseInfo_RuleId)(nil), } - file_temporal_server_api_persistence_v1_executions_proto_msgTypes[42].OneofWrappers = []any{ + file_temporal_server_api_persistence_v1_executions_proto_msgTypes[43].OneofWrappers = []any{ (*CallbackInfo_Trigger_WorkflowClosed)(nil), } type x struct{} @@ -5340,7 +5422,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: 43, + NumMessages: 44, NumExtensions: 0, NumServices: 0, }, diff --git a/common/dynamicconfig/constants.go b/common/dynamicconfig/constants.go index 81b276f118..b85f052b86 100644 --- a/common/dynamicconfig/constants.go +++ b/common/dynamicconfig/constants.go @@ -189,6 +189,11 @@ config as the other services.`, false, `EnableActivityEagerExecution indicates if activity eager execution is enabled per namespace`, ) + EnableActivityCancellationNexusTask = NewGlobalBoolSetting( + "system.enableActivityCancellationNexusTask", + false, + `EnableActivityCancellationNexusTask enables pushing activity cancellation to workers via Nexus task`, + ) NamespaceMinRetentionGlobal = NewGlobalDurationSetting( "system.namespaceMinRetentionGlobal", 24*time.Hour, diff --git a/common/persistence/serialization/task_serializers.go b/common/persistence/serialization/task_serializers.go index 598cd194dd..2e7b3a19ec 100644 --- a/common/persistence/serialization/task_serializers.go +++ b/common/persistence/serialization/task_serializers.go @@ -1446,6 +1446,22 @@ func serializeOutboundTask( ChasmTaskInfo: task.Info, }, } + case *tasks.ActivityCommandTask: + outboundTaskInfo = &persistencespb.OutboundTaskInfo{ + NamespaceId: task.NamespaceID, + WorkflowId: task.WorkflowID, + RunId: task.RunID, + TaskId: task.TaskID, + TaskType: task.GetType(), + Destination: task.Destination, + VisibilityTime: timestamppb.New(task.VisibilityTimestamp), + TaskDetails: &persistencespb.OutboundTaskInfo_ActivityCommandInfo{ + ActivityCommandInfo: &persistencespb.ActivityCommandTaskInfo{ + CommandType: task.CommandType, + ScheduledEventIds: task.ScheduledEventIDs, + }, + }, + } default: return nil, serviceerror.NewInternalf("unknown outbound task type while serializing: %v", task) } @@ -1488,6 +1504,20 @@ func deserializeOutboundTask( Info: info.GetChasmTaskInfo(), Destination: info.Destination, }, nil + case enumsspb.TASK_TYPE_ACTIVITY_COMMAND: + activityCommandInfo := info.GetActivityCommandInfo() + return &tasks.ActivityCommandTask{ + WorkflowKey: definition.NewWorkflowKey( + info.NamespaceId, + info.WorkflowId, + info.RunId, + ), + VisibilityTimestamp: info.VisibilityTime.AsTime(), + TaskID: info.TaskId, + CommandType: activityCommandInfo.GetCommandType(), + ScheduledEventIDs: activityCommandInfo.GetScheduledEventIds(), + Destination: info.Destination, + }, nil default: return nil, serviceerror.NewInternalf("unknown outbound task type while deserializing: %v", info) } diff --git a/common/persistence/serialization/task_serializers_test.go b/common/persistence/serialization/task_serializers_test.go index e3ac399c6c..3d63527463 100644 --- a/common/persistence/serialization/task_serializers_test.go +++ b/common/persistence/serialization/task_serializers_test.go @@ -169,6 +169,19 @@ func (s *taskSerializerSuite) TestTransferResetTask() { s.assertEqualTasks(resetTask) } +func (s *taskSerializerSuite) TestOutboundActivityCommandTask() { + activityCommandTask := &tasks.ActivityCommandTask{ + WorkflowKey: s.workflowKey, + VisibilityTimestamp: time.Unix(0, rand.Int63()).UTC(), + TaskID: rand.Int63(), + CommandType: enumsspb.ACTIVITY_COMMAND_TYPE_CANCEL, + ScheduledEventIDs: []int64{rand.Int63(), rand.Int63(), rand.Int63()}, + Destination: "test-control-queue", + } + + s.assertEqualTasks(activityCommandTask) +} + func (s *taskSerializerSuite) TestTimerWorkflowTask() { workflowTaskTimer := &tasks.WorkflowTaskTimeoutTask{ WorkflowKey: s.workflowKey, diff --git a/common/testing/testvars/test_vars.go b/common/testing/testvars/test_vars.go index 23e823412c..1e1ab4ec6c 100644 --- a/common/testing/testvars/test_vars.go +++ b/common/testing/testvars/test_vars.go @@ -396,6 +396,15 @@ func (tv *TestVars) WorkerIdentity() string { return getOrCreate(tv, "worker_identity", tv.uniqueString, tv.stringNSetter) } +func (tv *TestVars) WorkerInstanceKey() string { + return getOrCreate(tv, "worker_instance_key", tv.uniqueString, tv.stringNSetter) +} + +// ControlQueueName returns the Nexus task queue name used to deliver control tasks to this worker. +func (tv *TestVars) ControlQueueName(ns string) string { + return fmt.Sprintf("/temporal-sys/worker-commands/%s/%s", ns, tv.WorkerInstanceKey()) +} + func (tv *TestVars) TimerID() string { return getOrCreate(tv, "timer_id", tv.uniqueString, tv.stringNSetter) } diff --git a/proto/internal/temporal/server/api/enums/v1/task.proto b/proto/internal/temporal/server/api/enums/v1/task.proto index 34e026271a..4eb75a50fe 100644 --- a/proto/internal/temporal/server/api/enums/v1/task.proto +++ b/proto/internal/temporal/server/api/enums/v1/task.proto @@ -59,6 +59,15 @@ enum TaskType { // A task with side effects generated by a CHASM component. TASK_TYPE_CHASM = 33; + + // A task to send commands to activities via Nexus. Also see ActivityCommandType. + TASK_TYPE_ACTIVITY_COMMAND = 34; +} + +// ActivityCommandType specifies the type of command to send to activities. +enum ActivityCommandType { + ACTIVITY_COMMAND_TYPE_UNSPECIFIED = 0; + ACTIVITY_COMMAND_TYPE_CANCEL = 1; } // TaskPriority is only used for replication task as of May 2024 diff --git a/proto/internal/temporal/server/api/persistence/v1/executions.proto b/proto/internal/temporal/server/api/persistence/v1/executions.proto index fc3cf5b220..3a1d68f47d 100644 --- a/proto/internal/temporal/server/api/persistence/v1/executions.proto +++ b/proto/internal/temporal/server/api/persistence/v1/executions.proto @@ -350,6 +350,7 @@ message TransferTaskInfo { // by some other task, so this task doesn't need to worry about it. bool can_skip_visibility_archival = 1; } + oneof task_details { CloseExecutionTaskDetails close_execution_task_details = 16; @@ -482,9 +483,20 @@ message OutboundTaskInfo { // If the task addresses a CHASM component, this field will be set. ChasmTaskInfo chasm_task_info = 9; + + // If the task is an activity command task. + ActivityCommandTaskInfo activity_command_info = 10; } } +// ActivityCommandTaskInfo contains details for activity command operations. +message ActivityCommandTaskInfo { + // Type of command to send. + temporal.server.api.enums.v1.ActivityCommandType command_type = 1; + // Scheduled event IDs of activities to send command to. + repeated int64 scheduled_event_ids = 2; +} + message NexusInvocationTaskInfo { int32 attempt = 1; } diff --git a/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go b/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go index ee23a76893..46218b4f44 100644 --- a/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go +++ b/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler.go @@ -18,6 +18,7 @@ import ( protocolpb "go.temporal.io/api/protocol/v1" "go.temporal.io/api/serviceerror" "go.temporal.io/api/workflowservice/v1" + enumsspb "go.temporal.io/server/api/enums/v1" "go.temporal.io/server/api/historyservice/v1" "go.temporal.io/server/api/matchingservice/v1" "go.temporal.io/server/common" @@ -57,15 +58,16 @@ type ( workflowTaskCompletedID int64 // internal state - hasBufferedEventsOrMessages bool - workflowTaskFailedCause *workflowTaskFailedCause - activityNotStartedCancelled bool - newMutableState historyi.MutableState - stopProcessing bool // should stop processing any more commands - mutableState historyi.MutableState - effects effect.Controller - initiatedChildExecutionsInBatch map[string]struct{} // Set of initiated child executions in the workflow task - updateRegistry update.Registry + hasBufferedEventsOrMessages bool + workflowTaskFailedCause *workflowTaskFailedCause + activityNotStartedCancelled bool + newMutableState historyi.MutableState + stopProcessing bool // should stop processing any more commands + mutableState historyi.MutableState + effects effect.Controller + initiatedChildExecutionsInBatch map[string]struct{} // Set of initiated child executions in the workflow task + updateRegistry update.Registry + pendingActivityCancelsByControlQueue map[string][]int64 // Batched activity cancels by control queue // validation attrValidator *api.CommandAttrValidator @@ -210,6 +212,10 @@ func (handler *workflowTaskCompletedHandler) handleCommands( } } + if err := handler.flushBatchedActivityCommandTasks(); err != nil { + return nil, err + } + return mutations, nil } @@ -664,11 +670,35 @@ func (handler *workflowTaskCompletedHandler) handleCommandRequestCancelActivity( return nil, err } handler.activityNotStartedCancelled = true + } else if ai.StartedEventId != common.EmptyEventID && ai.WorkerControlTaskQueue != "" { + // Activity has started and worker supports Nexus control tasks - collect for batched dispatch. + if handler.pendingActivityCancelsByControlQueue == nil { + handler.pendingActivityCancelsByControlQueue = make(map[string][]int64) + } + handler.pendingActivityCancelsByControlQueue[ai.WorkerControlTaskQueue] = append( + handler.pendingActivityCancelsByControlQueue[ai.WorkerControlTaskQueue], + ai.ScheduledEventId, + ) } } return actCancelReqEvent, nil } +// flushBatchedActivityCommandTasks creates ActivityCommandTasks for all collected activity cancellations, +// batched by control queue. +func (handler *workflowTaskCompletedHandler) flushBatchedActivityCommandTasks() error { + for controlQueue, scheduledEventIDs := range handler.pendingActivityCancelsByControlQueue { + if err := handler.mutableState.AddActivityCommandTasks( + scheduledEventIDs, + controlQueue, + enumsspb.ACTIVITY_COMMAND_TYPE_CANCEL, + ); err != nil { + return err + } + } + return nil +} + func (handler *workflowTaskCompletedHandler) handleCommandStartTimer( _ context.Context, attr *commandpb.StartTimerCommandAttributes, diff --git a/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler_test.go b/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler_test.go index c68b8d1478..ec87e5f265 100644 --- a/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler_test.go +++ b/service/history/api/respondworkflowtaskcompleted/workflow_task_completed_handler_test.go @@ -16,6 +16,7 @@ import ( sdkpb "go.temporal.io/api/sdk/v1" "go.temporal.io/api/serviceerror" updatepb "go.temporal.io/api/update/v1" + enumsspb "go.temporal.io/server/api/enums/v1" persistencespb "go.temporal.io/server/api/persistence/v1" "go.temporal.io/server/common/backoff" "go.temporal.io/server/common/collection" @@ -384,3 +385,71 @@ func mustMarshalAny(t *testing.T, pb proto.Message) *anypb.Any { require.NoError(t, a.MarshalFrom(pb)) return &a } + +func TestFlushBatchedActivityCommandTasks(t *testing.T) { + t.Parallel() + + t.Run("batches activities by control queue", func(t *testing.T) { + ctrl := gomock.NewController(t) + ms := historyi.NewMockMutableState(ctrl) + + ms.EXPECT().AddActivityCommandTasks( + []int64{5, 6, 7}, + "control-queue-1", + gomock.Any(), + ).Return(nil).Times(1) + + handler := &workflowTaskCompletedHandler{ + mutableState: ms, + pendingActivityCancelsByControlQueue: map[string][]int64{ + "control-queue-1": {5, 6, 7}, + }, + } + + err := handler.flushBatchedActivityCommandTasks() + require.NoError(t, err) + }) + + t.Run("creates separate tasks for different control queues", func(t *testing.T) { + ctrl := gomock.NewController(t) + ms := historyi.NewMockMutableState(ctrl) + + // Capture calls to verify both queues are processed + calls := make(map[string][]int64) + ms.EXPECT().AddActivityCommandTasks( + gomock.Any(), + gomock.Any(), + enumsspb.ACTIVITY_COMMAND_TYPE_CANCEL, + ).DoAndReturn(func(ids []int64, queue string, _ enumsspb.ActivityCommandType) error { + calls[queue] = ids + return nil + }).Times(2) + + handler := &workflowTaskCompletedHandler{ + mutableState: ms, + pendingActivityCancelsByControlQueue: map[string][]int64{ + "control-queue-1": {5, 6}, + "control-queue-2": {7, 8}, + }, + } + + err := handler.flushBatchedActivityCommandTasks() + require.NoError(t, err) + + require.Equal(t, []int64{5, 6}, calls["control-queue-1"]) + require.Equal(t, []int64{7, 8}, calls["control-queue-2"]) + }) + + t.Run("does nothing when no pending cancels", func(t *testing.T) { + ctrl := gomock.NewController(t) + ms := historyi.NewMockMutableState(ctrl) + + handler := &workflowTaskCompletedHandler{ + mutableState: ms, + pendingActivityCancelsByControlQueue: nil, + } + + err := handler.flushBatchedActivityCommandTasks() + require.NoError(t, err) + }) +} diff --git a/service/history/configs/config.go b/service/history/configs/config.go index 1f614adabf..5e7a8d8403 100644 --- a/service/history/configs/config.go +++ b/service/history/configs/config.go @@ -354,11 +354,12 @@ type Config struct { ESProcessorFlushInterval dynamicconfig.DurationPropertyFn ESProcessorAckTimeout dynamicconfig.DurationPropertyFn - EnableCrossNamespaceCommands dynamicconfig.BoolPropertyFn - EnableActivityEagerExecution dynamicconfig.BoolPropertyFnWithNamespaceFilter - EnableActivityRetryStampIncrement dynamicconfig.BoolPropertyFn - EnableEagerWorkflowStart dynamicconfig.BoolPropertyFnWithNamespaceFilter - NamespaceCacheRefreshInterval dynamicconfig.DurationPropertyFn + EnableCrossNamespaceCommands dynamicconfig.BoolPropertyFn + EnableActivityEagerExecution dynamicconfig.BoolPropertyFnWithNamespaceFilter + EnableActivityRetryStampIncrement dynamicconfig.BoolPropertyFn + EnableActivityCancellationNexusTask dynamicconfig.BoolPropertyFn + EnableEagerWorkflowStart dynamicconfig.BoolPropertyFnWithNamespaceFilter + NamespaceCacheRefreshInterval dynamicconfig.DurationPropertyFn // ArchivalQueueProcessor settings ArchivalProcessorSchedulerWorkerCount dynamicconfig.TypedSubscribable[int] @@ -726,11 +727,12 @@ func NewConfig( ESProcessorFlushInterval: dynamicconfig.WorkerESProcessorFlushInterval.Get(dc), ESProcessorAckTimeout: dynamicconfig.WorkerESProcessorAckTimeout.Get(dc), - EnableCrossNamespaceCommands: dynamicconfig.EnableCrossNamespaceCommands.Get(dc), - EnableActivityEagerExecution: dynamicconfig.EnableActivityEagerExecution.Get(dc), - EnableActivityRetryStampIncrement: dynamicconfig.EnableActivityRetryStampIncrement.Get(dc), - EnableEagerWorkflowStart: dynamicconfig.EnableEagerWorkflowStart.Get(dc), - NamespaceCacheRefreshInterval: dynamicconfig.NamespaceCacheRefreshInterval.Get(dc), + EnableCrossNamespaceCommands: dynamicconfig.EnableCrossNamespaceCommands.Get(dc), + EnableActivityEagerExecution: dynamicconfig.EnableActivityEagerExecution.Get(dc), + EnableActivityRetryStampIncrement: dynamicconfig.EnableActivityRetryStampIncrement.Get(dc), + EnableActivityCancellationNexusTask: dynamicconfig.EnableActivityCancellationNexusTask.Get(dc), + EnableEagerWorkflowStart: dynamicconfig.EnableEagerWorkflowStart.Get(dc), + NamespaceCacheRefreshInterval: dynamicconfig.NamespaceCacheRefreshInterval.Get(dc), // Archival related ArchivalTaskBatchSize: dynamicconfig.ArchivalTaskBatchSize.Get(dc), diff --git a/service/history/interfaces/mutable_state.go b/service/history/interfaces/mutable_state.go index cd07f9ac69..631d64bc43 100644 --- a/service/history/interfaces/mutable_state.go +++ b/service/history/interfaces/mutable_state.go @@ -46,6 +46,7 @@ type ( AddActivityTaskCancelRequestedEvent(int64, int64, string) (*historypb.HistoryEvent, *persistencespb.ActivityInfo, error) AddActivityTaskCanceledEvent(int64, int64, int64, *commonpb.Payloads, string) (*historypb.HistoryEvent, error) + AddActivityCommandTasks(scheduledEventIDs []int64, controlQueue string, commandType enumsspb.ActivityCommandType) error AddActivityTaskCompletedEvent(int64, int64, *workflowservice.RespondActivityTaskCompletedRequest) (*historypb.HistoryEvent, error) AddActivityTaskFailedEvent(int64, int64, *failurepb.Failure, enumspb.RetryState, string, *commonpb.WorkerVersionStamp) (*historypb.HistoryEvent, error) AddActivityTaskScheduledEvent(int64, *commandpb.ScheduleActivityTaskCommandAttributes, bool) (*historypb.HistoryEvent, *persistencespb.ActivityInfo, error) diff --git a/service/history/interfaces/mutable_state_mock.go b/service/history/interfaces/mutable_state_mock.go index 9b89e38359..065f3cec4c 100644 --- a/service/history/interfaces/mutable_state_mock.go +++ b/service/history/interfaces/mutable_state_mock.go @@ -70,6 +70,20 @@ func (m *MockMutableState) EXPECT() *MockMutableStateMockRecorder { return m.recorder } +// AddActivityCommandTasks mocks base method. +func (m *MockMutableState) AddActivityCommandTasks(scheduledEventIDs []int64, controlQueue string, commandType enums0.ActivityCommandType) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AddActivityCommandTasks", scheduledEventIDs, controlQueue, commandType) + ret0, _ := ret[0].(error) + return ret0 +} + +// AddActivityCommandTasks indicates an expected call of AddActivityCommandTasks. +func (mr *MockMutableStateMockRecorder) AddActivityCommandTasks(scheduledEventIDs, controlQueue, commandType any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddActivityCommandTasks", reflect.TypeOf((*MockMutableState)(nil).AddActivityCommandTasks), scheduledEventIDs, controlQueue, commandType) +} + // AddActivityTaskCancelRequestedEvent mocks base method. func (m *MockMutableState) AddActivityTaskCancelRequestedEvent(arg0, arg1 int64, arg2 string) (*history.HistoryEvent, *persistence.ActivityInfo, error) { m.ctrl.T.Helper() diff --git a/service/history/queues/metrics.go b/service/history/queues/metrics.go index c836dc5451..65148834cb 100644 --- a/service/history/queues/metrics.go +++ b/service/history/queues/metrics.go @@ -196,6 +196,8 @@ func GetOutboundTaskTypeTagValue( return prefix + "." + task.StateMachineTaskType() case *tasks.ChasmTask: return prefix + "." + getCHASMTaskTypeTagValue(task, chasmRegistry) + case *tasks.ActivityCommandTask: + return prefix + ".ActivityCommand." + task.CommandType.String() default: return prefix + "Unknown" } diff --git a/service/history/tasks/activity_command_task.go b/service/history/tasks/activity_command_task.go new file mode 100644 index 0000000000..805c9d6eb0 --- /dev/null +++ b/service/history/tasks/activity_command_task.go @@ -0,0 +1,72 @@ +package tasks + +import ( + "fmt" + "time" + + enumsspb "go.temporal.io/server/api/enums/v1" + "go.temporal.io/server/common/definition" +) + +var _ Task = (*ActivityCommandTask)(nil) +var _ HasDestination = (*ActivityCommandTask)(nil) + +type ( + // ActivityCommandTask sends commands to activities via Nexus. + ActivityCommandTask struct { + definition.WorkflowKey + VisibilityTimestamp time.Time + TaskID int64 + + // CommandType specifies the type of command. + CommandType enumsspb.ActivityCommandType + // ScheduledEventIDs of activities to send command to (batched by worker). + ScheduledEventIDs []int64 + // Destination is the worker control task queue for outbound queue grouping. + Destination string + } +) + +func (t *ActivityCommandTask) GetKey() Key { + return NewImmediateKey(t.TaskID) +} + +func (t *ActivityCommandTask) GetTaskID() int64 { + return t.TaskID +} + +func (t *ActivityCommandTask) SetTaskID(id int64) { + t.TaskID = id +} + +func (t *ActivityCommandTask) GetVisibilityTime() time.Time { + return t.VisibilityTimestamp +} + +func (t *ActivityCommandTask) SetVisibilityTime(timestamp time.Time) { + t.VisibilityTimestamp = timestamp +} + +func (t *ActivityCommandTask) GetCategory() Category { + return CategoryOutbound +} + +func (t *ActivityCommandTask) GetType() enumsspb.TaskType { + return enumsspb.TASK_TYPE_ACTIVITY_COMMAND +} + +// GetDestination implements HasDestination for outbound queue grouping. +func (t *ActivityCommandTask) GetDestination() string { + return t.Destination +} + +func (t *ActivityCommandTask) String() string { + return fmt.Sprintf("ActivityCommandTask{WorkflowKey: %s, VisibilityTimestamp: %v, TaskID: %v, CommandType: %v, ScheduledEventIDs: %v, Destination: %v}", + t.WorkflowKey.String(), + t.VisibilityTimestamp, + t.TaskID, + t.CommandType, + t.ScheduledEventIDs, + t.Destination, + ) +} diff --git a/service/history/workflow/mutable_state_impl.go b/service/history/workflow/mutable_state_impl.go index 0b92eb7ddc..29b714685d 100644 --- a/service/history/workflow/mutable_state_impl.go +++ b/service/history/workflow/mutable_state_impl.go @@ -4369,6 +4369,10 @@ func (ms *MutableStateImpl) AddActivityTaskCancelRequestedEvent( return actCancelReqEvent, ai, nil } +func (ms *MutableStateImpl) AddActivityCommandTasks(scheduledEventIDs []int64, controlQueue string, commandType enumsspb.ActivityCommandType) error { + return ms.taskGenerator.GenerateActivityCommandTasks(scheduledEventIDs, controlQueue, commandType) +} + func (ms *MutableStateImpl) ApplyActivityTaskCancelRequestedEvent( event *historypb.HistoryEvent, ) error { diff --git a/service/history/workflow/task_generator.go b/service/history/workflow/task_generator.go index c06d5563b2..7c8a2db0bc 100644 --- a/service/history/workflow/task_generator.go +++ b/service/history/workflow/task_generator.go @@ -63,6 +63,7 @@ type ( activityScheduledEventID int64, ) error GenerateActivityRetryTasks(activityInfo *persistencespb.ActivityInfo) error + GenerateActivityCommandTasks(scheduledEventIDs []int64, controlQueue string, commandType enumsspb.ActivityCommandType) error GenerateChildWorkflowTasks( childInitiatedEventId int64, ) error @@ -583,6 +584,24 @@ func (r *TaskGeneratorImpl) GenerateActivityRetryTasks(activityInfo *persistence return nil } +func (r *TaskGeneratorImpl) GenerateActivityCommandTasks(scheduledEventIDs []int64, controlQueue string, commandType enumsspb.ActivityCommandType) error { + if !r.config.EnableActivityCancellationNexusTask() { + return nil + } + + if len(scheduledEventIDs) == 0 || controlQueue == "" { + return nil + } + + r.mutableState.AddTasks(&tasks.ActivityCommandTask{ + WorkflowKey: r.mutableState.GetWorkflowKey(), + CommandType: commandType, + ScheduledEventIDs: scheduledEventIDs, + Destination: controlQueue, + }) + return nil +} + func (r *TaskGeneratorImpl) GenerateChildWorkflowTasks( childInitiatedEventId int64, ) error { diff --git a/service/history/workflow/task_generator_mock.go b/service/history/workflow/task_generator_mock.go index 63f740f755..e4bfa61da0 100644 --- a/service/history/workflow/task_generator_mock.go +++ b/service/history/workflow/task_generator_mock.go @@ -14,6 +14,7 @@ import ( time "time" history "go.temporal.io/api/history/v1" + enums "go.temporal.io/server/api/enums/v1" persistence "go.temporal.io/server/api/persistence/v1" hsm "go.temporal.io/server/service/history/hsm" interfaces "go.temporal.io/server/service/history/interfaces" @@ -45,6 +46,20 @@ func (m *MockTaskGenerator) EXPECT() *MockTaskGeneratorMockRecorder { return m.recorder } +// GenerateActivityCommandTasks mocks base method. +func (m *MockTaskGenerator) GenerateActivityCommandTasks(scheduledEventIDs []int64, controlQueue string, commandType enums.ActivityCommandType) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GenerateActivityCommandTasks", scheduledEventIDs, controlQueue, commandType) + ret0, _ := ret[0].(error) + return ret0 +} + +// GenerateActivityCommandTasks indicates an expected call of GenerateActivityCommandTasks. +func (mr *MockTaskGeneratorMockRecorder) GenerateActivityCommandTasks(scheduledEventIDs, controlQueue, commandType any) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenerateActivityCommandTasks", reflect.TypeOf((*MockTaskGenerator)(nil).GenerateActivityCommandTasks), scheduledEventIDs, controlQueue, commandType) +} + // GenerateActivityRetryTasks mocks base method. func (m *MockTaskGenerator) GenerateActivityRetryTasks(activityInfo *persistence.ActivityInfo) error { m.ctrl.T.Helper() diff --git a/service/history/workflow/task_generator_test.go b/service/history/workflow/task_generator_test.go index 385762cdec..545d2e6b38 100644 --- a/service/history/workflow/task_generator_test.go +++ b/service/history/workflow/task_generator_test.go @@ -1066,3 +1066,80 @@ func TestTaskGeneratorImpl_GenerateDeleteHistoryEventTask_ActivityRetention(t *t }) } } + +func TestGenerateActivityCommandTasks(t *testing.T) { + t.Parallel() + + testCases := []struct { + name string + featureEnabled bool + scheduledEventIDs []int64 + controlQueue string + expectTask bool + }{ + { + name: "creates task when enabled with valid inputs", + featureEnabled: true, + scheduledEventIDs: []int64{5, 6, 7}, + controlQueue: "test-control-queue", + expectTask: true, + }, + { + name: "no task when feature disabled", + featureEnabled: false, + scheduledEventIDs: []int64{5, 6, 7}, + controlQueue: "test-control-queue", + expectTask: false, + }, + { + name: "no task when scheduledEventIDs empty", + featureEnabled: true, + scheduledEventIDs: []int64{}, + controlQueue: "test-control-queue", + expectTask: false, + }, + { + name: "no task when controlQueue empty", + featureEnabled: true, + scheduledEventIDs: []int64{5, 6, 7}, + controlQueue: "", + expectTask: false, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + ctrl := gomock.NewController(t) + + mutableState := historyi.NewMockMutableState(ctrl) + mutableState.EXPECT().GetWorkflowKey().Return(definition.NewWorkflowKey( + tests.NamespaceID.String(), tests.WorkflowID, tests.RunID, + )).AnyTimes() + + var capturedTasks []tasks.Task + if tc.expectTask { + mutableState.EXPECT().AddTasks(gomock.Any()).Do(func(ts ...tasks.Task) { + capturedTasks = append(capturedTasks, ts...) + }).Times(1) + } + + cfg := &configs.Config{ + EnableActivityCancellationNexusTask: func() bool { return tc.featureEnabled }, + } + + taskGenerator := NewTaskGenerator(nil, mutableState, cfg, nil, log.NewTestLogger()) + err := taskGenerator.GenerateActivityCommandTasks(tc.scheduledEventIDs, tc.controlQueue, enumsspb.ACTIVITY_COMMAND_TYPE_CANCEL) + require.NoError(t, err) + + if tc.expectTask { + require.Len(t, capturedTasks, 1) + notifyTask, ok := capturedTasks[0].(*tasks.ActivityCommandTask) + require.True(t, ok) + assert.Equal(t, tc.scheduledEventIDs, notifyTask.ScheduledEventIDs) + assert.Equal(t, tc.controlQueue, notifyTask.Destination) + assert.Equal(t, tests.NamespaceID.String(), notifyTask.NamespaceID) + assert.Equal(t, enumsspb.ACTIVITY_COMMAND_TYPE_CANCEL, notifyTask.CommandType) + } + }) + } +}