diff --git a/api/history/v1/message.pb.go b/api/history/v1/message.pb.go index 8ba8752d2ac..14caef6fa24 100644 --- a/api/history/v1/message.pb.go +++ b/api/history/v1/message.pb.go @@ -57,12 +57,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type TransientWorkflowTaskInfo struct { - // Rather than use this field, instead add the event to the history_suffix list. - ScheduledEvent *v1.HistoryEvent `protobuf:"bytes,1,opt,name=scheduled_event,json=scheduledEvent,proto3" json:"scheduled_event,omitempty"` // Deprecated: Do not use. - // Rather than use this field, instead add the event to the history_suffix list. - StartedEvent *v1.HistoryEvent `protobuf:"bytes,2,opt,name=started_event,json=startedEvent,proto3" json:"started_event,omitempty"` // Deprecated: Do not use. - // A list of history events that are to be appended to the "real" workflow - // history. + // A list of history events that are to be appended to the "real" workflow history. HistorySuffix []*v1.HistoryEvent `protobuf:"bytes,3,rep,name=history_suffix,json=historySuffix,proto3" json:"history_suffix,omitempty"` } @@ -98,22 +93,6 @@ func (m *TransientWorkflowTaskInfo) XXX_DiscardUnknown() { var xxx_messageInfo_TransientWorkflowTaskInfo proto.InternalMessageInfo -// Deprecated: Do not use. -func (m *TransientWorkflowTaskInfo) GetScheduledEvent() *v1.HistoryEvent { - if m != nil { - return m.ScheduledEvent - } - return nil -} - -// Deprecated: Do not use. -func (m *TransientWorkflowTaskInfo) GetStartedEvent() *v1.HistoryEvent { - if m != nil { - return m.StartedEvent - } - return nil -} - func (m *TransientWorkflowTaskInfo) GetHistorySuffix() []*v1.HistoryEvent { if m != nil { return m.HistorySuffix @@ -393,45 +372,43 @@ func init() { } var fileDescriptor_670cd05c700ece14 = []byte{ - // 603 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0xb3, 0x89, 0x6d, 0xda, 0xe9, 0x0f, 0x65, 0x84, 0x9a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xdd, 0x4e, 0x4f, 0xce, - 0x5e, 0xe5, 0xf2, 0xef, 0x7f, 0xa8, 0xa7, 0xee, 0xd8, 0x9e, 0xb7, 0x1d, 0x7d, 0xf2, 0x2b, 0x00, - 0x00, 0xff, 0xff, 0x5b, 0xb3, 0x82, 0xa4, 0xd2, 0x04, 0x00, 0x00, + // 575 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x41, 0x4b, 0x1b, 0x41, + 0x14, 0xc7, 0x33, 0x89, 0x9a, 0x38, 0xb1, 0x22, 0x53, 0xb0, 0x31, 0xd0, 0x51, 0x03, 0x52, 0x0f, + 0x32, 0x8b, 0xe9, 0xb1, 0xf4, 0x50, 0xa1, 0x60, 0xac, 0x5e, 0xb6, 0xa1, 0x85, 0x22, 0x2c, 0x93, + 0xe4, 0x65, 0x1d, 0x92, 0x9d, 0x09, 0x33, 0x9b, 0x34, 0x1e, 0x0a, 0xfd, 0x08, 0x7e, 0x87, 0x5e, + 0xfa, 0x4d, 0xda, 0xa3, 0x47, 0x6f, 0xad, 0xeb, 0xa5, 0x47, 0x3f, 0x42, 0xd9, 0xd9, 0xd9, 0x04, + 0xdb, 0x62, 0xf1, 0x36, 0xf3, 0xe6, 0xff, 0x7e, 0xef, 0xff, 0xde, 0x3e, 0x16, 0xef, 0xc5, 0x10, + 0x8d, 0x94, 0xe6, 0x43, 0xcf, 0x80, 0x9e, 0x80, 0xf6, 0xf8, 0x48, 0x78, 0x67, 0xc2, 0xc4, 0x4a, + 0x9f, 0x7b, 0x93, 0x7d, 0x2f, 0x02, 0x63, 0x78, 0x08, 0x6c, 0xa4, 0x55, 0xac, 0x08, 0xcd, 0xd5, + 0x2c, 0x53, 0x33, 0x3e, 0x12, 0xcc, 0xa9, 0xd9, 0x64, 0xbf, 0xbe, 0x19, 0x2a, 0x15, 0x0e, 0xc1, + 0xb3, 0xea, 0xce, 0xb8, 0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a1, 0xe8, 0x6b, 0x42, 0xd1, 0xf7, 0x84, 0xa2, 0xcb, 0x84, 0xa2, 0x9f, 0x09, 0x45, 0xbf, + 0x12, 0x5a, 0xb8, 0x4d, 0x28, 0xba, 0xb8, 0xa1, 0x85, 0xcb, 0x1b, 0x5a, 0xb8, 0xba, 0xa1, 0x85, + 0x0f, 0x7b, 0xa1, 0x9a, 0x57, 0x15, 0xea, 0xdf, 0x3f, 0x82, 0x17, 0xee, 0xd8, 0x59, 0xb2, 0x13, + 0x7d, 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x70, 0x3d, 0xee, 0x87, 0x39, 0x04, 0x00, 0x00, } func (this *TransientWorkflowTaskInfo) Equal(that interface{}) bool { @@ -453,12 +430,6 @@ func (this *TransientWorkflowTaskInfo) Equal(that interface{}) bool { } else if this == nil { return false } - if !this.ScheduledEvent.Equal(that1.ScheduledEvent) { - return false - } - if !this.StartedEvent.Equal(that1.StartedEvent) { - return false - } if len(this.HistorySuffix) != len(that1.HistorySuffix) { return false } @@ -622,14 +593,8 @@ func (this *TransientWorkflowTaskInfo) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 5) s = append(s, "&history.TransientWorkflowTaskInfo{") - if this.ScheduledEvent != nil { - s = append(s, "ScheduledEvent: "+fmt.Sprintf("%#v", this.ScheduledEvent)+",\n") - } - if this.StartedEvent != nil { - s = append(s, "StartedEvent: "+fmt.Sprintf("%#v", this.StartedEvent)+",\n") - } if this.HistorySuffix != nil { s = append(s, "HistorySuffix: "+fmt.Sprintf("%#v", this.HistorySuffix)+",\n") } @@ -741,30 +706,6 @@ func (m *TransientWorkflowTaskInfo) MarshalToSizedBuffer(dAtA []byte) (int, erro dAtA[i] = 0x1a } } - if m.StartedEvent != nil { - { - size, err := m.StartedEvent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.ScheduledEvent != nil { - { - size, err := m.ScheduledEvent.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMessage(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -908,12 +849,12 @@ func (m *TaskKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.FireTime != nil { - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.FireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.FireTime):]) - if err3 != nil { - return 0, err3 + n1, err1 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.FireTime, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.FireTime):]) + if err1 != nil { + return 0, err1 } - i -= n3 - i = encodeVarintMessage(dAtA, i, uint64(n3)) + i -= n1 + i = encodeVarintMessage(dAtA, i, uint64(n1)) i-- dAtA[i] = 0x12 } @@ -989,14 +930,6 @@ func (m *TransientWorkflowTaskInfo) Size() (n int) { } var l int _ = l - if m.ScheduledEvent != nil { - l = m.ScheduledEvent.Size() - n += 1 + l + sovMessage(uint64(l)) - } - if m.StartedEvent != nil { - l = m.StartedEvent.Size() - n += 1 + l + sovMessage(uint64(l)) - } if len(m.HistorySuffix) > 0 { for _, e := range m.HistorySuffix { l = e.Size() @@ -1107,8 +1040,6 @@ func (this *TransientWorkflowTaskInfo) String() string { } repeatedStringForHistorySuffix += "}" s := strings.Join([]string{`&TransientWorkflowTaskInfo{`, - `ScheduledEvent:` + strings.Replace(fmt.Sprintf("%v", this.ScheduledEvent), "HistoryEvent", "v1.HistoryEvent", 1) + `,`, - `StartedEvent:` + strings.Replace(fmt.Sprintf("%v", this.StartedEvent), "HistoryEvent", "v1.HistoryEvent", 1) + `,`, `HistorySuffix:` + repeatedStringForHistorySuffix + `,`, `}`, }, "") @@ -1216,78 +1147,6 @@ func (m *TransientWorkflowTaskInfo) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: TransientWorkflowTaskInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScheduledEvent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ScheduledEvent == nil { - m.ScheduledEvent = &v1.HistoryEvent{} - } - if err := m.ScheduledEvent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedEvent", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartedEvent == nil { - m.StartedEvent = &v1.HistoryEvent{} - } - if err := m.StartedEvent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field HistorySuffix", wireType) diff --git a/proto/internal/temporal/server/api/history/v1/message.proto b/proto/internal/temporal/server/api/history/v1/message.proto index ffb4b878235..2fbc94a8955 100644 --- a/proto/internal/temporal/server/api/history/v1/message.proto +++ b/proto/internal/temporal/server/api/history/v1/message.proto @@ -31,15 +31,10 @@ import "dependencies/gogoproto/gogo.proto"; import "temporal/api/history/v1/message.proto"; message TransientWorkflowTaskInfo { - //TODO (mmcshane): remove these deprecated fields after v1.18 is released + reserved 1; + reserved 2; - // Rather than use this field, instead add the event to the history_suffix list. - temporal.api.history.v1.HistoryEvent scheduled_event = 1 [deprecated = true]; - // Rather than use this field, instead add the event to the history_suffix list. - temporal.api.history.v1.HistoryEvent started_event = 2 [deprecated = true]; - - // A list of history events that are to be appended to the "real" workflow - // history. + // A list of history events that are to be appended to the "real" workflow history. repeated temporal.api.history.v1.HistoryEvent history_suffix = 3; } diff --git a/service/frontend/workflow_handler.go b/service/frontend/workflow_handler.go index 284821da1b2..92169e43801 100644 --- a/service/frontend/workflow_handler.go +++ b/service/frontend/workflow_handler.go @@ -4078,9 +4078,7 @@ func (wh *WorkflowHandler) getRawHistory( return nil, nil, err } - suffix := extractHistorySuffix(transientWorkflowTaskInfo) - - for _, event := range suffix { + for _, event := range transientWorkflowTaskInfo.HistorySuffix { blob, err := wh.payloadSerializer.SerializeEvent(event, enumspb.ENCODING_TYPE_PROTO3) if err != nil { return nil, nil, err @@ -4161,7 +4159,7 @@ func (wh *WorkflowHandler) getHistory( tag.Error(err)) } // Append the transient workflow task events once we are done enumerating everything from the events table - historyEvents = append(historyEvents, extractHistorySuffix(transientWorkflowTaskInfo)...) + historyEvents = append(historyEvents, transientWorkflowTaskInfo.HistorySuffix...) } if err := wh.processOutgoingSearchAttributes(historyEvents, namespace); err != nil { @@ -4277,8 +4275,7 @@ func (wh *WorkflowHandler) validateTransientWorkflowTaskEvents( eventIDOffset int64, transientWorkflowTaskInfo *historyspb.TransientWorkflowTaskInfo, ) error { - suffix := extractHistorySuffix(transientWorkflowTaskInfo) - for i, event := range suffix { + for i, event := range transientWorkflowTaskInfo.HistorySuffix { expectedEventID := eventIDOffset + int64(i) if event.GetEventId() != expectedEventID { return serviceerror.NewInternal( @@ -4293,24 +4290,6 @@ func (wh *WorkflowHandler) validateTransientWorkflowTaskEvents( return nil } -func extractHistorySuffix(transientWorkflowTask *historyspb.TransientWorkflowTaskInfo) []*historypb.HistoryEvent { - // TODO (mmcshane): remove this function after v1.18 is release as we will - // be able to just use transientWorkflowTask.HistorySuffix directly and the other - // fields will be removed. - - suffix := transientWorkflowTask.HistorySuffix - if len(suffix) == 0 { - // HistorySuffix is a new field - we may still need to handle - // instances that carry the separate ScheduledEvent and StartedEvent - // fields - - // One might be tempted to check for nil here but the old code did not - // make that check and we aim to preserve compatiblity - suffix = append(suffix, transientWorkflowTask.ScheduledEvent, transientWorkflowTask.StartedEvent) - } - return suffix -} - func (wh *WorkflowHandler) validateTaskQueue(t *taskqueuepb.TaskQueue) error { if t == nil || t.GetName() == "" { return errTaskQueueNotSet diff --git a/service/frontend/workflow_handler_test.go b/service/frontend/workflow_handler_test.go index 526d31a1910..f9370958b28 100644 --- a/service/frontend/workflow_handler_test.go +++ b/service/frontend/workflow_handler_test.go @@ -293,22 +293,14 @@ func (s *workflowHandlerSuite) TestTransientTaskInjection() { taskInfo historyspb.TransientWorkflowTaskInfo transientCount int }{ - { - name: "Legacy", - taskInfo: historyspb.TransientWorkflowTaskInfo{ - ScheduledEvent: &historypb.HistoryEvent{EventId: 3}, - StartedEvent: &historypb.HistoryEvent{EventId: 4}, - }, - transientCount: 2, - }, { name: "HistorySuffix", taskInfo: historyspb.TransientWorkflowTaskInfo{ HistorySuffix: []*historypb.HistoryEvent{ - &historypb.HistoryEvent{EventId: 3}, - &historypb.HistoryEvent{EventId: 4}, - &historypb.HistoryEvent{EventId: 5}, - &historypb.HistoryEvent{EventId: 6}, + {EventId: 3}, + {EventId: 4}, + {EventId: 5}, + {EventId: 6}, }, }, transientCount: 4, @@ -1553,13 +1545,15 @@ func (s *workflowHandlerSuite) TestGetWorkflowExecutionHistory_RawHistoryWithTra NextEventId: 5, PersistenceToken: persistenceToken, TransientWorkflowTask: &historyspb.TransientWorkflowTaskInfo{ - ScheduledEvent: &historypb.HistoryEvent{ - EventId: 5, - EventType: enumspb.EVENT_TYPE_WORKFLOW_TASK_SCHEDULED, - }, - StartedEvent: &historypb.HistoryEvent{ - EventId: 6, - EventType: enumspb.EVENT_TYPE_WORKFLOW_TASK_STARTED, + HistorySuffix: []*historypb.HistoryEvent{ + { + EventId: 5, + EventType: enumspb.EVENT_TYPE_WORKFLOW_TASK_SCHEDULED, + }, + { + EventId: 6, + EventType: enumspb.EVENT_TYPE_WORKFLOW_TASK_STARTED, + }, }, }, BranchToken: branchToken, diff --git a/service/history/workflow/workflow_task_state_machine.go b/service/history/workflow/workflow_task_state_machine.go index dad92613f5a..692cc57474e 100644 --- a/service/history/workflow/workflow_task_state_machine.go +++ b/service/history/workflow/workflow_task_state_machine.go @@ -726,12 +726,8 @@ func (m *workflowTaskStateMachine) CreateTransientWorkflowTaskEvents( }, } - // TODO (mmcshane): remove population of ScheduledEvent and StartedEvent - // after v1.18 is released transientWorkflowTask = &historyspb.TransientWorkflowTaskInfo{ - ScheduledEvent: scheduledEvent, - StartedEvent: startedEvent, - HistorySuffix: append(historySuffix, scheduledEvent, startedEvent), + HistorySuffix: append(historySuffix, scheduledEvent, startedEvent), } }