From 7a147f6e34c5c11269ab1c530a2f2fc216bc3eb9 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Tue, 13 Dec 2022 22:32:52 -0800 Subject: [PATCH] Use namespace from schedule activity worker (#3680) --- api/schedule/v1/message.pb.go | 547 +++--------------- .../server/api/schedule/v1/message.proto | 7 - service/worker/scheduler/activities.go | 46 +- service/worker/scheduler/workflow.go | 26 +- service/worker/scheduler/workflow_test.go | 2 - 5 files changed, 97 insertions(+), 531 deletions(-) diff --git a/api/schedule/v1/message.pb.go b/api/schedule/v1/message.pb.go index 63c800ddfeb..f6cb3f25af6 100644 --- a/api/schedule/v1/message.pb.go +++ b/api/schedule/v1/message.pb.go @@ -418,8 +418,6 @@ func (m *DescribeResponse) GetConflictToken() int64 { } type WatchWorkflowRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // Note: this will be sent to the activity with empty execution.run_id, and // the run id that we started in first_execution_run_id. Execution *v11.WorkflowExecution `protobuf:"bytes,3,opt,name=execution,proto3" json:"execution,omitempty"` @@ -459,20 +457,6 @@ func (m *WatchWorkflowRequest) XXX_DiscardUnknown() { var xxx_messageInfo_WatchWorkflowRequest proto.InternalMessageInfo -func (m *WatchWorkflowRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *WatchWorkflowRequest) GetNamespaceId() string { - if m != nil { - return m.NamespaceId - } - return "" -} - func (m *WatchWorkflowRequest) GetExecution() *v11.WorkflowExecution { if m != nil { return m.Execution @@ -588,7 +572,6 @@ func (*WatchWorkflowResponse) XXX_OneofWrappers() []interface{} { } type StartWorkflowRequest struct { - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` Request *v14.StartWorkflowExecutionRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"` LastCompletionResult *v11.Payloads `protobuf:"bytes,4,opt,name=last_completion_result,json=lastCompletionResult,proto3" json:"last_completion_result,omitempty"` ContinuedFailure *v12.Failure `protobuf:"bytes,5,opt,name=continued_failure,json=continuedFailure,proto3" json:"continued_failure,omitempty"` @@ -626,13 +609,6 @@ func (m *StartWorkflowRequest) XXX_DiscardUnknown() { var xxx_messageInfo_StartWorkflowRequest proto.InternalMessageInfo -func (m *StartWorkflowRequest) GetNamespaceId() string { - if m != nil { - return m.NamespaceId - } - return "" -} - func (m *StartWorkflowRequest) GetRequest() *v14.StartWorkflowExecutionRequest { if m != nil { return m.Request @@ -706,10 +682,8 @@ func (m *StartWorkflowResponse) GetRealStartTime() *time.Time { } type CancelWorkflowRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` // Note: run id in execution is first execution run id Execution *v11.WorkflowExecution `protobuf:"bytes,5,opt,name=execution,proto3" json:"execution,omitempty"` Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"` @@ -747,20 +721,6 @@ func (m *CancelWorkflowRequest) XXX_DiscardUnknown() { var xxx_messageInfo_CancelWorkflowRequest proto.InternalMessageInfo -func (m *CancelWorkflowRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *CancelWorkflowRequest) GetNamespaceId() string { - if m != nil { - return m.NamespaceId - } - return "" -} - func (m *CancelWorkflowRequest) GetRequestId() string { if m != nil { return m.RequestId @@ -790,10 +750,8 @@ func (m *CancelWorkflowRequest) GetReason() string { } type TerminateWorkflowRequest struct { - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` + RequestId string `protobuf:"bytes,3,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` + Identity string `protobuf:"bytes,4,opt,name=identity,proto3" json:"identity,omitempty"` // Note: run id in execution is first execution run id Execution *v11.WorkflowExecution `protobuf:"bytes,5,opt,name=execution,proto3" json:"execution,omitempty"` Reason string `protobuf:"bytes,6,opt,name=reason,proto3" json:"reason,omitempty"` @@ -831,20 +789,6 @@ func (m *TerminateWorkflowRequest) XXX_DiscardUnknown() { var xxx_messageInfo_TerminateWorkflowRequest proto.InternalMessageInfo -func (m *TerminateWorkflowRequest) GetNamespace() string { - if m != nil { - return m.Namespace - } - return "" -} - -func (m *TerminateWorkflowRequest) GetNamespaceId() string { - if m != nil { - return m.NamespaceId - } - return "" -} - func (m *TerminateWorkflowRequest) GetRequestId() string { if m != nil { return m.RequestId @@ -892,78 +836,77 @@ func init() { } var fileDescriptor_6461b6986ba20ee7 = []byte{ - // 1128 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0x41, 0x6f, 0x1b, 0x45, + // 1117 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x41, 0x6f, 0x1b, 0x45, 0x14, 0xf6, 0xda, 0x8e, 0x63, 0x8f, 0x63, 0x37, 0xd9, 0x26, 0x91, 0x15, 0x60, 0xe3, 0x5a, 0xb4, 0x04, 0x09, 0xd6, 0x4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x3e, 0xc1, 0x6d, 0x6d, 0xed, 0xa5, 0xbd, 0xb6, 0x8c, 0x07, + 0x58, 0x48, 0x34, 0x48, 0x4c, 0xc0, 0xad, 0x08, 0x27, 0x98, 0x46, 0x98, 0x86, 0x31, 0x16, 0xed, + 0x3e, 0xeb, 0x33, 0xed, 0xd7, 0x4f, 0x59, 0x48, 0xeb, 0x9b, 0x3c, 0xa8, 0xad, 0xa7, 0xbd, 0x1e, + 0xe6, 0x38, 0xda, 0x96, 0x88, 0x4b, 0x77, 0x03, 0xcc, 0x50, 0x36, 0x88, 0x29, 0x22, 0x81, 0xe2, + 0x6b, 0x38, 0x4d, 0x67, 0xa5, 0xba, 0xb6, 0xe4, 0x67, 0x87, 0xf9, 0xf6, 0x30, 0x7f, 0xc7, 0x1e, + 0xb6, 0x5e, 0x7c, 0xfa, 0xdb, 0xb2, 0x03, 0xab, 0x06, 0xa5, 0xfc, 0xee, 0x03, 0x50, 0x45, 0xa1, + 0x4c, 0x2d, 0x47, 0xfe, 0x9a, 0x1c, 0x20, 0x03, 0x69, 0x8a, 0x6d, 0x50, 0x67, 0x07, 0x98, 0x13, + 0x94, 0x04, 0x09, 0x23, 0x71, 0x78, 0xd8, 0x28, 0x34, 0x9d, 0x95, 0xfa, 0xda, 0x5b, 0xfe, 0x48, + 0x10, 0x4a, 0x09, 0xba, 0xf8, 0xfe, 0xc1, 0xaa, 0xbf, 0x6d, 0xea, 0xfb, 0x49, 0x06, 0xea, 0x6a, + 0x0c, 0xac, 0xb1, 0xb3, 0xa6, 0xbb, 0x08, 0x4a, 0x03, 0x44, 0x53, 0x44, 0x1a, 0xc5, 0xa6, 0xb3, + 0x52, 0x86, 0xc6, 0x6a, 0x7d, 0x5b, 0x04, 0xb5, 0x0e, 0x95, 0x98, 0x53, 0x44, 0xb6, 0x25, 0x92, + 0xd8, 0x7d, 0x15, 0x54, 0x28, 0x1a, 0x60, 0x91, 0xa0, 0x30, 0xab, 0x41, 0x05, 0x9e, 0x3a, 0xdc, + 0x5b, 0x60, 0x66, 0x64, 0x04, 0x71, 0xa4, 0x3f, 0xb0, 0x02, 0xab, 0x23, 0x5f, 0x27, 0x72, 0x97, + 0x41, 0xd5, 0xb6, 0x5c, 0x45, 0x94, 0x75, 0x04, 0xb0, 0xae, 0x4e, 0xe4, 0x76, 0xc1, 0x4d, 0x82, + 0x84, 0x0c, 0x12, 0xce, 0x42, 0x2c, 0x04, 0x8e, 0xb2, 0x5a, 0x15, 0xae, 0x59, 0xab, 0x39, 0x05, + 0xee, 0x5a, 0xac, 0x2e, 0xd9, 0x2e, 0xb8, 0xb1, 0x67, 0x7a, 0x19, 0x08, 0xd5, 0x4c, 0xd1, 0x28, + 0x36, 0x0b, 0x2b, 0xd5, 0x35, 0xdf, 0xbf, 0x62, 0x88, 0xfc, 0x31, 0x0d, 0xc0, 0xfa, 0xde, 0x59, + 0x53, 0xb8, 0x9f, 0x81, 0x45, 0x9d, 0x6a, 0xc8, 0x06, 0x09, 0xc1, 0x32, 0x66, 0x54, 0x69, 0x31, + 0x25, 0xb2, 0x31, 0xa5, 0xb3, 0x6d, 0x8e, 0xf7, 0x24, 0x9b, 0x41, 0x45, 0xdb, 0x45, 0x87, 0x84, + 0xa1, 0x48, 0xc0, 0x79, 0x85, 0xdf, 0x18, 0xc1, 0xa1, 0x46, 0xbb, 0x1f, 0x83, 0xb9, 0x90, 0x51, + 0x19, 0xd3, 0x14, 0x47, 0x81, 0x99, 0xc9, 0x46, 0xe9, 0x22, 0x4a, 0xf3, 0x52, 0x71, 0x6e, 0x66, + 0x8f, 0x70, 0x76, 0x04, 0x35, 0x1e, 0xf7, 0x36, 0xa8, 0x87, 0x8c, 0xf6, 0x48, 0x1c, 0xca, 0x40, + 0xb2, 0x47, 0x98, 0x36, 0xa6, 0x9b, 0xce, 0x4a, 0x01, 0xd6, 0xac, 0x77, 0x47, 0x39, 0x75, 0xf3, + 0x30, 0x8e, 0x02, 0x8e, 0x7b, 0x1c, 0x8b, 0xfd, 0x46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, 0xea, 0x4d, 0xeb, 0x27, 0x07, 0x2c, 0x6c, 0x20, 0x1a, 0x62, 0x32, + 0xd9, 0x9a, 0xd7, 0x00, 0xb0, 0x3f, 0x49, 0x71, 0xa4, 0x65, 0x50, 0x81, 0x15, 0xe3, 0xe9, 0x44, + 0xee, 0x12, 0x28, 0xc7, 0x11, 0xa6, 0x32, 0x96, 0x87, 0x66, 0x08, 0x46, 0xf6, 0xf8, 0xdc, 0x4d, + 0xbd, 0xc4, 0xdc, 0x2d, 0x2a, 0x0d, 0x23, 0xc1, 0xa8, 0xbe, 0xc1, 0x2a, 0xd0, 0x58, 0xad, 0x5f, + 0x1c, 0xd0, 0xd8, 0xc1, 0x5c, 0xfd, 0x1c, 0x49, 0xfc, 0x3f, 0x4a, 0x7c, 0x3d, 0x3a, 0x3a, 0xf6, + 0x72, 0xcf, 0x8e, 0xbd, 0xdc, 0xf3, 0x63, 0xcf, 0xf9, 0x7a, 0xe8, 0x39, 0x3f, 0x0c, 0x3d, 0xe7, + 0xd7, 0xa1, 0xe7, 0x1c, 0x0d, 0x3d, 0xe7, 0xf7, 0xa1, 0xe7, 0xfc, 0x31, 0xf4, 0x72, 0xcf, 0x87, + 0x9e, 0xf3, 0xf4, 0xc4, 0xcb, 0x1d, 0x9d, 0x78, 0xb9, 0x67, 0x27, 0x5e, 0xee, 0x0b, 0xbf, 0xcf, + 0x4e, 0xb3, 0x88, 0xd9, 0x25, 0x3f, 0xf9, 0xef, 0xda, 0xe7, 0xbd, 0x92, 0xee, 0xfe, 0xdd, 0xbf, + 0x02, 0x00, 0x00, 0xff, 0xff, 0xa8, 0x9f, 0xa4, 0x54, 0x17, 0x0c, 0x00, 0x00, } func (this *BufferedStart) Equal(that interface{}) bool { @@ -1173,12 +1116,6 @@ func (this *WatchWorkflowRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Namespace != that1.Namespace { - return false - } - if this.NamespaceId != that1.NamespaceId { - return false - } if !this.Execution.Equal(that1.Execution) { return false } @@ -1290,9 +1227,6 @@ func (this *StartWorkflowRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.NamespaceId != that1.NamespaceId { - return false - } if !this.Request.Equal(that1.Request) { return false } @@ -1354,12 +1288,6 @@ func (this *CancelWorkflowRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Namespace != that1.Namespace { - return false - } - if this.NamespaceId != that1.NamespaceId { - return false - } if this.RequestId != that1.RequestId { return false } @@ -1393,12 +1321,6 @@ func (this *TerminateWorkflowRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Namespace != that1.Namespace { - return false - } - if this.NamespaceId != that1.NamespaceId { - return false - } if this.RequestId != that1.RequestId { return false } @@ -1504,10 +1426,8 @@ func (this *WatchWorkflowRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 9) + s := make([]string, 0, 7) s = append(s, "&schedule.WatchWorkflowRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "NamespaceId: "+fmt.Sprintf("%#v", this.NamespaceId)+",\n") if this.Execution != nil { s = append(s, "Execution: "+fmt.Sprintf("%#v", this.Execution)+",\n") } @@ -1549,9 +1469,8 @@ func (this *StartWorkflowRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 8) + s := make([]string, 0, 7) s = append(s, "&schedule.StartWorkflowRequest{") - s = append(s, "NamespaceId: "+fmt.Sprintf("%#v", this.NamespaceId)+",\n") if this.Request != nil { s = append(s, "Request: "+fmt.Sprintf("%#v", this.Request)+",\n") } @@ -1579,10 +1498,8 @@ func (this *CancelWorkflowRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 10) + s := make([]string, 0, 8) s = append(s, "&schedule.CancelWorkflowRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "NamespaceId: "+fmt.Sprintf("%#v", this.NamespaceId)+",\n") s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") s = append(s, "Identity: "+fmt.Sprintf("%#v", this.Identity)+",\n") if this.Execution != nil { @@ -1596,10 +1513,8 @@ func (this *TerminateWorkflowRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 10) + s := make([]string, 0, 8) s = append(s, "&schedule.TerminateWorkflowRequest{") - s = append(s, "Namespace: "+fmt.Sprintf("%#v", this.Namespace)+",\n") - s = append(s, "NamespaceId: "+fmt.Sprintf("%#v", this.NamespaceId)+",\n") s = append(s, "RequestId: "+fmt.Sprintf("%#v", this.RequestId)+",\n") s = append(s, "Identity: "+fmt.Sprintf("%#v", this.Identity)+",\n") if this.Execution != nil { @@ -1994,20 +1909,6 @@ func (m *WatchWorkflowRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.NamespaceId) > 0 { - i -= len(m.NamespaceId) - copy(dAtA[i:], m.NamespaceId) - i = encodeVarintMessage(dAtA, i, uint64(len(m.NamespaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -2146,13 +2047,6 @@ func (m *StartWorkflowRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.NamespaceId) > 0 { - i -= len(m.NamespaceId) - copy(dAtA[i:], m.NamespaceId) - i = encodeVarintMessage(dAtA, i, uint64(len(m.NamespaceId))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -2249,20 +2143,6 @@ func (m *CancelWorkflowRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.NamespaceId) > 0 { - i -= len(m.NamespaceId) - copy(dAtA[i:], m.NamespaceId) - i = encodeVarintMessage(dAtA, i, uint64(len(m.NamespaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -2319,20 +2199,6 @@ func (m *TerminateWorkflowRequest) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x1a } - if len(m.NamespaceId) > 0 { - i -= len(m.NamespaceId) - copy(dAtA[i:], m.NamespaceId) - i = encodeVarintMessage(dAtA, i, uint64(len(m.NamespaceId))) - i-- - dAtA[i] = 0x12 - } - if len(m.Namespace) > 0 { - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintMessage(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -2482,14 +2348,6 @@ func (m *WatchWorkflowRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.NamespaceId) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } if m.Execution != nil { l = m.Execution.Size() n += 1 + l + sovMessage(uint64(l)) @@ -2549,10 +2407,6 @@ func (m *StartWorkflowRequest) Size() (n int) { } var l int _ = l - l = len(m.NamespaceId) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } if m.Request != nil { l = m.Request.Size() n += 1 + l + sovMessage(uint64(l)) @@ -2591,14 +2445,6 @@ func (m *CancelWorkflowRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.NamespaceId) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } l = len(m.RequestId) if l > 0 { n += 1 + l + sovMessage(uint64(l)) @@ -2624,14 +2470,6 @@ func (m *TerminateWorkflowRequest) Size() (n int) { } var l int _ = l - l = len(m.Namespace) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } - l = len(m.NamespaceId) - if l > 0 { - n += 1 + l + sovMessage(uint64(l)) - } l = len(m.RequestId) if l > 0 { n += 1 + l + sovMessage(uint64(l)) @@ -2734,8 +2572,6 @@ func (this *WatchWorkflowRequest) String() string { return "nil" } s := strings.Join([]string{`&WatchWorkflowRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `NamespaceId:` + fmt.Sprintf("%v", this.NamespaceId) + `,`, `Execution:` + strings.Replace(fmt.Sprintf("%v", this.Execution), "WorkflowExecution", "v11.WorkflowExecution", 1) + `,`, `FirstExecutionRunId:` + fmt.Sprintf("%v", this.FirstExecutionRunId) + `,`, `LongPoll:` + fmt.Sprintf("%v", this.LongPoll) + `,`, @@ -2779,7 +2615,6 @@ func (this *StartWorkflowRequest) String() string { return "nil" } s := strings.Join([]string{`&StartWorkflowRequest{`, - `NamespaceId:` + fmt.Sprintf("%v", this.NamespaceId) + `,`, `Request:` + strings.Replace(fmt.Sprintf("%v", this.Request), "StartWorkflowExecutionRequest", "v14.StartWorkflowExecutionRequest", 1) + `,`, `LastCompletionResult:` + strings.Replace(fmt.Sprintf("%v", this.LastCompletionResult), "Payloads", "v11.Payloads", 1) + `,`, `ContinuedFailure:` + strings.Replace(fmt.Sprintf("%v", this.ContinuedFailure), "Failure", "v12.Failure", 1) + `,`, @@ -2803,8 +2638,6 @@ func (this *CancelWorkflowRequest) String() string { return "nil" } s := strings.Join([]string{`&CancelWorkflowRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `NamespaceId:` + fmt.Sprintf("%v", this.NamespaceId) + `,`, `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, `Identity:` + fmt.Sprintf("%v", this.Identity) + `,`, `Execution:` + strings.Replace(fmt.Sprintf("%v", this.Execution), "WorkflowExecution", "v11.WorkflowExecution", 1) + `,`, @@ -2818,8 +2651,6 @@ func (this *TerminateWorkflowRequest) String() string { return "nil" } s := strings.Join([]string{`&TerminateWorkflowRequest{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `NamespaceId:` + fmt.Sprintf("%v", this.NamespaceId) + `,`, `RequestId:` + fmt.Sprintf("%v", this.RequestId) + `,`, `Identity:` + fmt.Sprintf("%v", this.Identity) + `,`, `Execution:` + strings.Replace(fmt.Sprintf("%v", this.Execution), "WorkflowExecution", "v11.WorkflowExecution", 1) + `,`, @@ -3808,70 +3639,6 @@ func (m *WatchWorkflowRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: WatchWorkflowRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NamespaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Execution", wireType) @@ -4155,38 +3922,6 @@ func (m *StartWorkflowRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: StartWorkflowRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NamespaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) @@ -4469,70 +4204,6 @@ func (m *CancelWorkflowRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: CancelWorkflowRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NamespaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) @@ -4718,70 +4389,6 @@ func (m *TerminateWorkflowRequest) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: TerminateWorkflowRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NamespaceId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMessage - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMessage - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMessage - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NamespaceId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) diff --git a/proto/internal/temporal/server/api/schedule/v1/message.proto b/proto/internal/temporal/server/api/schedule/v1/message.proto index 5f3c27ef24b..66e01bc375b 100644 --- a/proto/internal/temporal/server/api/schedule/v1/message.proto +++ b/proto/internal/temporal/server/api/schedule/v1/message.proto @@ -84,8 +84,6 @@ message DescribeResponse { } message WatchWorkflowRequest { - string namespace = 1; - string namespace_id = 2; // Note: this will be sent to the activity with empty execution.run_id, and // the run id that we started in first_execution_run_id. temporal.api.common.v1.WorkflowExecution execution = 3; @@ -102,7 +100,6 @@ message WatchWorkflowResponse { } message StartWorkflowRequest { - string namespace_id = 1; temporal.api.workflowservice.v1.StartWorkflowExecutionRequest request = 2; reserved 3; temporal.api.common.v1.Payloads last_completion_result = 4; @@ -115,8 +112,6 @@ message StartWorkflowResponse { } message CancelWorkflowRequest { - string namespace = 1; - string namespace_id = 2; string request_id = 3; string identity = 4; // Note: run id in execution is first execution run id @@ -125,8 +120,6 @@ message CancelWorkflowRequest { } message TerminateWorkflowRequest { - string namespace = 1; - string namespace_id = 2; string request_id = 3; string identity = 4; // Note: run id in execution is first execution run id diff --git a/service/worker/scheduler/activities.go b/service/worker/scheduler/activities.go index dfaff7324c4..ba608defa78 100644 --- a/service/worker/scheduler/activities.go +++ b/service/worker/scheduler/activities.go @@ -57,29 +57,19 @@ type ( ) var ( - errTryAgain = errors.New("try again") - errWrongChain = errors.New("found running workflow with wrong FirstExecutionRunId") - errNoEvents = errors.New("GetEvents didn't return any events") - errNoAttrs = errors.New("last event did not have correct attrs") - errNamespaceMismatch = errors.New("namespace mismatch") + errTryAgain = errors.New("try again") + errWrongChain = errors.New("found running workflow with wrong FirstExecutionRunId") + errNoEvents = errors.New("GetEvents didn't return any events") + errNoAttrs = errors.New("last event did not have correct attrs") ) func (e errFollow) Error() string { return string(e) } -func (a *activities) checkNamespace(namespace, namespaceID string) error { - if namespace != a.namespace.String() || namespaceID != a.namespaceID.String() { - return errNamespaceMismatch - } - return nil -} - func (a *activities) StartWorkflow(ctx context.Context, req *schedspb.StartWorkflowRequest) (*schedspb.StartWorkflowResponse, error) { - if err := a.checkNamespace(req.Request.Namespace, req.NamespaceId); err != nil { - return nil, err - } + req.Request.Namespace = a.namespace.String() request := common.CreateHistoryStartWorkflowRequest( - req.NamespaceId, + a.namespaceID.String(), req.Request, nil, time.Now().UTC(), @@ -118,7 +108,7 @@ func (a *activities) tryWatchWorkflow(ctx context.Context, req *schedspb.WatchWo // the desired chain or not). if we have to follow (unlikely), we'll end up // back here with non-empty RunId. pollReq := &historyservice.PollMutableStateRequest{ - NamespaceId: req.NamespaceId, + NamespaceId: a.namespaceID.String(), Execution: req.Execution, } if req.LongPoll { @@ -166,7 +156,7 @@ func (a *activities) tryWatchWorkflow(ctx context.Context, req *schedspb.WatchWo // get last event from history histReq := &workflowservice.GetWorkflowExecutionHistoryRequest{ - Namespace: req.Namespace, + Namespace: a.namespace.String(), Execution: req.Execution, MaximumPageSize: 1, HistoryEventFilterType: enumspb.HISTORY_EVENT_FILTER_TYPE_CLOSE_EVENT, @@ -224,10 +214,6 @@ func (a *activities) tryWatchWorkflow(ctx context.Context, req *schedspb.WatchWo } func (a *activities) WatchWorkflow(ctx context.Context, req *schedspb.WatchWorkflowRequest) (*schedspb.WatchWorkflowResponse, error) { - if err := a.checkNamespace(req.Namespace, req.NamespaceId); err != nil { - return nil, err - } - for ctx.Err() == nil { activity.RecordHeartbeat(ctx) res, err := a.tryWatchWorkflow(ctx, req) @@ -246,14 +232,10 @@ func (a *activities) WatchWorkflow(ctx context.Context, req *schedspb.WatchWorkf } func (a *activities) CancelWorkflow(ctx context.Context, req *schedspb.CancelWorkflowRequest) error { - if err := a.checkNamespace(req.Namespace, req.NamespaceId); err != nil { - return err - } - rreq := &historyservice.RequestCancelWorkflowExecutionRequest{ - NamespaceId: req.NamespaceId, + NamespaceId: a.namespaceID.String(), CancelRequest: &workflowservice.RequestCancelWorkflowExecutionRequest{ - Namespace: req.Namespace, + Namespace: a.namespace.String(), // only set WorkflowId so we cancel the latest, but restricted by FirstExecutionRunId WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: req.Execution.WorkflowId}, Identity: req.Identity, @@ -268,14 +250,10 @@ func (a *activities) CancelWorkflow(ctx context.Context, req *schedspb.CancelWor } func (a *activities) TerminateWorkflow(ctx context.Context, req *schedspb.TerminateWorkflowRequest) error { - if err := a.checkNamespace(req.Namespace, req.NamespaceId); err != nil { - return err - } - rreq := &historyservice.TerminateWorkflowExecutionRequest{ - NamespaceId: req.NamespaceId, + NamespaceId: a.namespaceID.String(), TerminateRequest: &workflowservice.TerminateWorkflowExecutionRequest{ - Namespace: req.Namespace, + Namespace: a.namespace.String(), // only set WorkflowId so we cancel the latest, but restricted by FirstExecutionRunId WorkflowExecution: &commonpb.WorkflowExecution{WorkflowId: req.Execution.WorkflowId}, Reason: req.Reason, diff --git a/service/worker/scheduler/workflow.go b/service/worker/scheduler/workflow.go index efc241e1ce0..81191937a38 100644 --- a/service/worker/scheduler/workflow.go +++ b/service/worker/scheduler/workflow.go @@ -789,9 +789,7 @@ func (s *scheduler) startWorkflow( ctx := workflow.WithLocalActivityOptions(s.ctx, options) req := &schedspb.StartWorkflowRequest{ - NamespaceId: s.State.NamespaceId, Request: &workflowservice.StartWorkflowExecutionRequest{ - Namespace: s.State.Namespace, WorkflowId: workflowID, WorkflowType: newWorkflow.WorkflowType, TaskQueue: newWorkflow.TaskQueue, @@ -851,8 +849,6 @@ func (s *scheduler) refreshWorkflows(executions []*commonpb.WorkflowExecution) { futures := make([]workflow.Future, len(executions)) for i, ex := range executions { req := &schedspb.WatchWorkflowRequest{ - Namespace: s.State.Namespace, - NamespaceId: s.State.NamespaceId, // Note: do not send runid here so that we always get the latest one Execution: &commonpb.WorkflowExecution{WorkflowId: ex.WorkflowId}, FirstExecutionRunId: ex.RunId, @@ -880,8 +876,6 @@ func (s *scheduler) startLongPollWatcher(ex *commonpb.WorkflowExecution) { HeartbeatTimeout: 65 * time.Second, }) req := &schedspb.WatchWorkflowRequest{ - Namespace: s.State.Namespace, - NamespaceId: s.State.NamespaceId, // Note: do not send runid here so that we always get the latest one Execution: &commonpb.WorkflowExecution{WorkflowId: ex.WorkflowId}, FirstExecutionRunId: ex.RunId, @@ -894,12 +888,10 @@ func (s *scheduler) startLongPollWatcher(ex *commonpb.WorkflowExecution) { func (s *scheduler) cancelWorkflow(ex *commonpb.WorkflowExecution) { ctx := workflow.WithLocalActivityOptions(s.ctx, defaultLocalActivityOptions) areq := &schedspb.CancelWorkflowRequest{ - NamespaceId: s.State.NamespaceId, - Namespace: s.State.Namespace, - RequestId: s.newUUIDString(), - Identity: s.identity(), - Execution: ex, - Reason: "cancelled by schedule overlap policy", + RequestId: s.newUUIDString(), + Identity: s.identity(), + Execution: ex, + Reason: "cancelled by schedule overlap policy", } err := workflow.ExecuteLocalActivity(ctx, s.a.CancelWorkflow, areq).Get(s.ctx, nil) if err != nil { @@ -912,12 +904,10 @@ func (s *scheduler) cancelWorkflow(ex *commonpb.WorkflowExecution) { func (s *scheduler) terminateWorkflow(ex *commonpb.WorkflowExecution) { ctx := workflow.WithLocalActivityOptions(s.ctx, defaultLocalActivityOptions) areq := &schedspb.TerminateWorkflowRequest{ - NamespaceId: s.State.NamespaceId, - Namespace: s.State.Namespace, - RequestId: s.newUUIDString(), - Identity: s.identity(), - Execution: ex, - Reason: "terminated by schedule overlap policy", + RequestId: s.newUUIDString(), + Identity: s.identity(), + Execution: ex, + Reason: "terminated by schedule overlap policy", } err := workflow.ExecuteLocalActivity(ctx, s.a.TerminateWorkflow, areq).Get(s.ctx, nil) if err != nil { diff --git a/service/worker/scheduler/workflow_test.go b/service/worker/scheduler/workflow_test.go index 87f58b5e6bd..96b515561f8 100644 --- a/service/worker/scheduler/workflow_test.go +++ b/service/worker/scheduler/workflow_test.go @@ -311,10 +311,8 @@ func (s *workflowSuite) TestStart() { s.expectStart(func(req *schedspb.StartWorkflowRequest) (*schedspb.StartWorkflowResponse, error) { s.True(time.Date(2022, 6, 1, 0, 15, 0, 0, time.UTC).Equal(s.now())) - s.Equal("mynsid", req.NamespaceId) s.Nil(req.LastCompletionResult) s.Nil(req.ContinuedFailure) - s.Equal("myns", req.Request.Namespace) s.Equal("myid-2022-06-01T00:15:00Z", req.Request.WorkflowId) s.Equal("mywf", req.Request.WorkflowType.Name) s.Equal("mytq", req.Request.TaskQueue.Name)