diff --git a/pkg/apis/proto/daemon/daemon.pb.go b/pkg/apis/proto/daemon/daemon.pb.go index 5e6adc1c08..a8ccb94352 100644 --- a/pkg/apis/proto/daemon/daemon.pb.go +++ b/pkg/apis/proto/daemon/daemon.pb.go @@ -232,6 +232,62 @@ func (m *VertexMetrics) GetPendings() map[string]int64 { return nil } +// PipelineStatus +type PipelineStatus struct { + Status *string `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` + Message *string `protobuf:"bytes,2,req,name=message" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PipelineStatus) Reset() { *m = PipelineStatus{} } +func (m *PipelineStatus) String() string { return proto.CompactTextString(m) } +func (*PipelineStatus) ProtoMessage() {} +func (*PipelineStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_93e327fd0d673221, []int{2} +} +func (m *PipelineStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PipelineStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PipelineStatus.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PipelineStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_PipelineStatus.Merge(m, src) +} +func (m *PipelineStatus) XXX_Size() int { + return m.Size() +} +func (m *PipelineStatus) XXX_DiscardUnknown() { + xxx_messageInfo_PipelineStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_PipelineStatus proto.InternalMessageInfo + +func (m *PipelineStatus) GetStatus() string { + if m != nil && m.Status != nil { + return *m.Status + } + return "" +} + +func (m *PipelineStatus) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + type ListBuffersRequest struct { Pipeline *string `protobuf:"bytes,1,req,name=pipeline" json:"pipeline,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -243,7 +299,7 @@ func (m *ListBuffersRequest) Reset() { *m = ListBuffersRequest{} } func (m *ListBuffersRequest) String() string { return proto.CompactTextString(m) } func (*ListBuffersRequest) ProtoMessage() {} func (*ListBuffersRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{2} + return fileDescriptor_93e327fd0d673221, []int{3} } func (m *ListBuffersRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -290,7 +346,7 @@ func (m *ListBuffersResponse) Reset() { *m = ListBuffersResponse{} } func (m *ListBuffersResponse) String() string { return proto.CompactTextString(m) } func (*ListBuffersResponse) ProtoMessage() {} func (*ListBuffersResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{3} + return fileDescriptor_93e327fd0d673221, []int{4} } func (m *ListBuffersResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -338,7 +394,7 @@ func (m *GetBufferRequest) Reset() { *m = GetBufferRequest{} } func (m *GetBufferRequest) String() string { return proto.CompactTextString(m) } func (*GetBufferRequest) ProtoMessage() {} func (*GetBufferRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{4} + return fileDescriptor_93e327fd0d673221, []int{5} } func (m *GetBufferRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -392,7 +448,7 @@ func (m *GetBufferResponse) Reset() { *m = GetBufferResponse{} } func (m *GetBufferResponse) String() string { return proto.CompactTextString(m) } func (*GetBufferResponse) ProtoMessage() {} func (*GetBufferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{5} + return fileDescriptor_93e327fd0d673221, []int{6} } func (m *GetBufferResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -428,6 +484,100 @@ func (m *GetBufferResponse) GetBuffer() *BufferInfo { return nil } +type GetPipelineStatusRequest struct { + Pipeline *string `protobuf:"bytes,1,req,name=pipeline" json:"pipeline,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetPipelineStatusRequest) Reset() { *m = GetPipelineStatusRequest{} } +func (m *GetPipelineStatusRequest) String() string { return proto.CompactTextString(m) } +func (*GetPipelineStatusRequest) ProtoMessage() {} +func (*GetPipelineStatusRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_93e327fd0d673221, []int{7} +} +func (m *GetPipelineStatusRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetPipelineStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetPipelineStatusRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetPipelineStatusRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetPipelineStatusRequest.Merge(m, src) +} +func (m *GetPipelineStatusRequest) XXX_Size() int { + return m.Size() +} +func (m *GetPipelineStatusRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetPipelineStatusRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetPipelineStatusRequest proto.InternalMessageInfo + +func (m *GetPipelineStatusRequest) GetPipeline() string { + if m != nil && m.Pipeline != nil { + return *m.Pipeline + } + return "" +} + +type GetPipelineStatusResponse struct { + Status *PipelineStatus `protobuf:"bytes,1,req,name=status" json:"status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetPipelineStatusResponse) Reset() { *m = GetPipelineStatusResponse{} } +func (m *GetPipelineStatusResponse) String() string { return proto.CompactTextString(m) } +func (*GetPipelineStatusResponse) ProtoMessage() {} +func (*GetPipelineStatusResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_93e327fd0d673221, []int{8} +} +func (m *GetPipelineStatusResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetPipelineStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetPipelineStatusResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GetPipelineStatusResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetPipelineStatusResponse.Merge(m, src) +} +func (m *GetPipelineStatusResponse) XXX_Size() int { + return m.Size() +} +func (m *GetPipelineStatusResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetPipelineStatusResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetPipelineStatusResponse proto.InternalMessageInfo + +func (m *GetPipelineStatusResponse) GetStatus() *PipelineStatus { + if m != nil { + return m.Status + } + return nil +} + type GetVertexMetricsRequest struct { Pipeline *string `protobuf:"bytes,2,req,name=pipeline" json:"pipeline,omitempty"` Vertex *string `protobuf:"bytes,3,req,name=vertex" json:"vertex,omitempty"` @@ -440,7 +590,7 @@ func (m *GetVertexMetricsRequest) Reset() { *m = GetVertexMetricsRequest func (m *GetVertexMetricsRequest) String() string { return proto.CompactTextString(m) } func (*GetVertexMetricsRequest) ProtoMessage() {} func (*GetVertexMetricsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{6} + return fileDescriptor_93e327fd0d673221, []int{9} } func (m *GetVertexMetricsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -494,7 +644,7 @@ func (m *GetVertexMetricsResponse) Reset() { *m = GetVertexMetricsRespon func (m *GetVertexMetricsResponse) String() string { return proto.CompactTextString(m) } func (*GetVertexMetricsResponse) ProtoMessage() {} func (*GetVertexMetricsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{7} + return fileDescriptor_93e327fd0d673221, []int{10} } func (m *GetVertexMetricsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -545,7 +695,7 @@ func (m *EdgeWatermark) Reset() { *m = EdgeWatermark{} } func (m *EdgeWatermark) String() string { return proto.CompactTextString(m) } func (*EdgeWatermark) ProtoMessage() {} func (*EdgeWatermark) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{8} + return fileDescriptor_93e327fd0d673221, []int{11} } func (m *EdgeWatermark) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -613,7 +763,7 @@ func (m *GetPipelineWatermarksResponse) Reset() { *m = GetPipelineWaterm func (m *GetPipelineWatermarksResponse) String() string { return proto.CompactTextString(m) } func (*GetPipelineWatermarksResponse) ProtoMessage() {} func (*GetPipelineWatermarksResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{9} + return fileDescriptor_93e327fd0d673221, []int{12} } func (m *GetPipelineWatermarksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -661,7 +811,7 @@ func (m *GetPipelineWatermarksRequest) Reset() { *m = GetPipelineWaterma func (m *GetPipelineWatermarksRequest) String() string { return proto.CompactTextString(m) } func (*GetPipelineWatermarksRequest) ProtoMessage() {} func (*GetPipelineWatermarksRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_93e327fd0d673221, []int{10} + return fileDescriptor_93e327fd0d673221, []int{13} } func (m *GetPipelineWatermarksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,10 +852,13 @@ func init() { proto.RegisterType((*VertexMetrics)(nil), "daemon.VertexMetrics") proto.RegisterMapType((map[string]int64)(nil), "daemon.VertexMetrics.PendingsEntry") proto.RegisterMapType((map[string]float64)(nil), "daemon.VertexMetrics.ProcessingRatesEntry") + proto.RegisterType((*PipelineStatus)(nil), "daemon.PipelineStatus") proto.RegisterType((*ListBuffersRequest)(nil), "daemon.ListBuffersRequest") proto.RegisterType((*ListBuffersResponse)(nil), "daemon.ListBuffersResponse") proto.RegisterType((*GetBufferRequest)(nil), "daemon.GetBufferRequest") proto.RegisterType((*GetBufferResponse)(nil), "daemon.GetBufferResponse") + proto.RegisterType((*GetPipelineStatusRequest)(nil), "daemon.GetPipelineStatusRequest") + proto.RegisterType((*GetPipelineStatusResponse)(nil), "daemon.GetPipelineStatusResponse") proto.RegisterType((*GetVertexMetricsRequest)(nil), "daemon.GetVertexMetricsRequest") proto.RegisterType((*GetVertexMetricsResponse)(nil), "daemon.GetVertexMetricsResponse") proto.RegisterType((*EdgeWatermark)(nil), "daemon.EdgeWatermark") @@ -718,60 +871,65 @@ func init() { } var fileDescriptor_93e327fd0d673221 = []byte{ - // 839 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x8e, 0xdb, 0x44, - 0x14, 0x96, 0xed, 0x6d, 0x9a, 0x9c, 0x10, 0x75, 0x19, 0xda, 0x32, 0xb8, 0x25, 0x58, 0x66, 0x01, - 0xb3, 0x2a, 0x31, 0xac, 0x04, 0xaa, 0x5a, 0x89, 0xa2, 0x2d, 0xe9, 0x0a, 0x69, 0x17, 0xad, 0xcc, - 0x4f, 0x25, 0xee, 0x9c, 0x64, 0xe2, 0x9a, 0xd8, 0x1e, 0xe3, 0x19, 0x67, 0x59, 0x55, 0x7b, 0xd3, - 0x17, 0xe0, 0x02, 0xf5, 0x35, 0x78, 0x0e, 0x2e, 0x91, 0xb8, 0xe4, 0x06, 0xad, 0x78, 0x10, 0xe4, - 0x99, 0x71, 0x62, 0x27, 0x4e, 0x76, 0xaf, 0x76, 0xce, 0xef, 0xf7, 0xcd, 0x39, 0xdf, 0x78, 0x03, - 0x76, 0x3a, 0x0b, 0x5c, 0x3f, 0x0d, 0x99, 0x9b, 0x66, 0x94, 0x53, 0x77, 0xe2, 0x93, 0x98, 0x26, - 0xea, 0xcf, 0x40, 0xf8, 0x50, 0x4b, 0x5a, 0xe6, 0xfd, 0x80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fc, 0x92, 0xbc, 0xec, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -791,6 +949,7 @@ type DaemonServiceClient interface { GetVertexMetrics(ctx context.Context, in *GetVertexMetricsRequest, opts ...grpc.CallOption) (*GetVertexMetricsResponse, error) // GetPipelineWatermarks return the watermark of the given pipeline GetPipelineWatermarks(ctx context.Context, in *GetPipelineWatermarksRequest, opts ...grpc.CallOption) (*GetPipelineWatermarksResponse, error) + GetPipelineStatus(ctx context.Context, in *GetPipelineStatusRequest, opts ...grpc.CallOption) (*GetPipelineStatusResponse, error) } type daemonServiceClient struct { @@ -837,6 +996,15 @@ func (c *daemonServiceClient) GetPipelineWatermarks(ctx context.Context, in *Get return out, nil } +func (c *daemonServiceClient) GetPipelineStatus(ctx context.Context, in *GetPipelineStatusRequest, opts ...grpc.CallOption) (*GetPipelineStatusResponse, error) { + out := new(GetPipelineStatusResponse) + err := c.cc.Invoke(ctx, "/daemon.DaemonService/GetPipelineStatus", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // DaemonServiceServer is the server API for DaemonService service. type DaemonServiceServer interface { ListBuffers(context.Context, *ListBuffersRequest) (*ListBuffersResponse, error) @@ -844,6 +1012,7 @@ type DaemonServiceServer interface { GetVertexMetrics(context.Context, *GetVertexMetricsRequest) (*GetVertexMetricsResponse, error) // GetPipelineWatermarks return the watermark of the given pipeline GetPipelineWatermarks(context.Context, *GetPipelineWatermarksRequest) (*GetPipelineWatermarksResponse, error) + GetPipelineStatus(context.Context, *GetPipelineStatusRequest) (*GetPipelineStatusResponse, error) } // UnimplementedDaemonServiceServer can be embedded to have forward compatible implementations. @@ -862,6 +1031,9 @@ func (*UnimplementedDaemonServiceServer) GetVertexMetrics(ctx context.Context, r func (*UnimplementedDaemonServiceServer) GetPipelineWatermarks(ctx context.Context, req *GetPipelineWatermarksRequest) (*GetPipelineWatermarksResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPipelineWatermarks not implemented") } +func (*UnimplementedDaemonServiceServer) GetPipelineStatus(ctx context.Context, req *GetPipelineStatusRequest) (*GetPipelineStatusResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetPipelineStatus not implemented") +} func RegisterDaemonServiceServer(s *grpc.Server, srv DaemonServiceServer) { s.RegisterService(&_DaemonService_serviceDesc, srv) @@ -939,6 +1111,24 @@ func _DaemonService_GetPipelineWatermarks_Handler(srv interface{}, ctx context.C return interceptor(ctx, in, info, handler) } +func _DaemonService_GetPipelineStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetPipelineStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DaemonServiceServer).GetPipelineStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/daemon.DaemonService/GetPipelineStatus", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DaemonServiceServer).GetPipelineStatus(ctx, req.(*GetPipelineStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _DaemonService_serviceDesc = grpc.ServiceDesc{ ServiceName: "daemon.DaemonService", HandlerType: (*DaemonServiceServer)(nil), @@ -959,6 +1149,10 @@ var _DaemonService_serviceDesc = grpc.ServiceDesc{ MethodName: "GetPipelineWatermarks", Handler: _DaemonService_GetPipelineWatermarks_Handler, }, + { + MethodName: "GetPipelineStatus", + Handler: _DaemonService_GetPipelineStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "pkg/apis/proto/daemon/daemon.proto", @@ -1163,6 +1357,51 @@ func (m *VertexMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *PipelineStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PipelineStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PipelineStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Message == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") + } else { + i -= len(*m.Message) + copy(dAtA[i:], *m.Message) + i = encodeVarintDaemon(dAtA, i, uint64(len(*m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Status == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } else { + i -= len(*m.Status) + copy(dAtA[i:], *m.Status) + i = encodeVarintDaemon(dAtA, i, uint64(len(*m.Status))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *ListBuffersRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1326,6 +1565,83 @@ func (m *GetBufferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *GetPipelineStatusRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetPipelineStatusRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetPipelineStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Pipeline == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("pipeline") + } else { + i -= len(*m.Pipeline) + copy(dAtA[i:], *m.Pipeline) + i = encodeVarintDaemon(dAtA, i, uint64(len(*m.Pipeline))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *GetPipelineStatusResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GetPipelineStatusResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetPipelineStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Status == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } else { + { + size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintDaemon(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *GetVertexMetricsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1649,6 +1965,26 @@ func (m *VertexMetrics) Size() (n int) { return n } +func (m *PipelineStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Status != nil { + l = len(*m.Status) + n += 1 + l + sovDaemon(uint64(l)) + } + if m.Message != nil { + l = len(*m.Message) + n += 1 + l + sovDaemon(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *ListBuffersRequest) Size() (n int) { if m == nil { return 0 @@ -1719,7 +2055,7 @@ func (m *GetBufferResponse) Size() (n int) { return n } -func (m *GetVertexMetricsRequest) Size() (n int) { +func (m *GetPipelineStatusRequest) Size() (n int) { if m == nil { return 0 } @@ -1729,27 +2065,59 @@ func (m *GetVertexMetricsRequest) Size() (n int) { l = len(*m.Pipeline) n += 1 + l + sovDaemon(uint64(l)) } - if m.Vertex != nil { - l = len(*m.Vertex) - n += 1 + l + sovDaemon(uint64(l)) - } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } return n } -func (m *GetVertexMetricsResponse) Size() (n int) { +func (m *GetPipelineStatusResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.VertexMetrics) > 0 { - for _, e := range m.VertexMetrics { - l = e.Size() - n += 1 + l + sovDaemon(uint64(l)) - } + if m.Status != nil { + l = m.Status.Size() + n += 1 + l + sovDaemon(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetVertexMetricsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pipeline != nil { + l = len(*m.Pipeline) + n += 1 + l + sovDaemon(uint64(l)) + } + if m.Vertex != nil { + l = len(*m.Vertex) + n += 1 + l + sovDaemon(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *GetVertexMetricsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.VertexMetrics) > 0 { + for _, e := range m.VertexMetrics { + l = e.Size() + n += 1 + l + sovDaemon(uint64(l)) + } } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -2523,6 +2891,132 @@ func (m *VertexMetrics) Unmarshal(dAtA []byte) error { } return nil } +func (m *PipelineStatus) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PipelineStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PipelineStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + 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 ErrInvalidLengthDaemon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDaemon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Status = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + 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 ErrInvalidLengthDaemon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDaemon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Message = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipDaemon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDaemon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("message") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *ListBuffersRequest) Unmarshal(dAtA []byte) error { var hasFields [1]uint64 l := len(dAtA) @@ -2915,6 +3409,187 @@ func (m *GetBufferResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GetPipelineStatusRequest) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetPipelineStatusRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetPipelineStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pipeline", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + 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 ErrInvalidLengthDaemon + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthDaemon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Pipeline = &s + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipDaemon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDaemon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("pipeline") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GetPipelineStatusResponse) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetPipelineStatusResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetPipelineStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDaemon + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthDaemon + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthDaemon + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Status == nil { + m.Status = &PipelineStatus{} + } + if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipDaemon(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDaemon + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("status") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *GetVertexMetricsRequest) Unmarshal(dAtA []byte) error { var hasFields [1]uint64 l := len(dAtA) diff --git a/pkg/apis/proto/daemon/daemon.pb.gw.go b/pkg/apis/proto/daemon/daemon.pb.gw.go index a9a11966a0..22d1d49422 100644 --- a/pkg/apis/proto/daemon/daemon.pb.gw.go +++ b/pkg/apis/proto/daemon/daemon.pb.gw.go @@ -293,6 +293,60 @@ func local_request_DaemonService_GetPipelineWatermarks_0(ctx context.Context, ma } +func request_DaemonService_GetPipelineStatus_0(ctx context.Context, marshaler runtime.Marshaler, client DaemonServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPipelineStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pipeline"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline") + } + + protoReq.Pipeline, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline", err) + } + + msg, err := client.GetPipelineStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_DaemonService_GetPipelineStatus_0(ctx context.Context, marshaler runtime.Marshaler, server DaemonServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetPipelineStatusRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["pipeline"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "pipeline") + } + + protoReq.Pipeline, err = runtime.StringP(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "pipeline", err) + } + + msg, err := server.GetPipelineStatus(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterDaemonServiceHandlerServer registers the http handlers for service DaemonService to "mux". // UnaryRPC :call DaemonServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -391,6 +445,29 @@ func RegisterDaemonServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_DaemonService_GetPipelineStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_DaemonService_GetPipelineStatus_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_DaemonService_GetPipelineStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -512,6 +589,26 @@ func RegisterDaemonServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_DaemonService_GetPipelineStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_DaemonService_GetPipelineStatus_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_DaemonService_GetPipelineStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -523,6 +620,8 @@ var ( pattern_DaemonService_GetVertexMetrics_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6}, []string{"api", "v1", "pipelines", "pipeline", "vertices", "vertex", "metrics"}, "", runtime.AssumeColonVerbOpt(true))) pattern_DaemonService_GetPipelineWatermarks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "pipelines", "pipeline", "watermarks"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_DaemonService_GetPipelineStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"api", "v1", "pipelines", "pipeline", "status"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -533,4 +632,6 @@ var ( forward_DaemonService_GetVertexMetrics_0 = runtime.ForwardResponseMessage forward_DaemonService_GetPipelineWatermarks_0 = runtime.ForwardResponseMessage + + forward_DaemonService_GetPipelineStatus_0 = runtime.ForwardResponseMessage ) diff --git a/pkg/apis/proto/daemon/daemon.proto b/pkg/apis/proto/daemon/daemon.proto index 400803b5cc..1be3ce65b2 100644 --- a/pkg/apis/proto/daemon/daemon.proto +++ b/pkg/apis/proto/daemon/daemon.proto @@ -47,6 +47,12 @@ message VertexMetrics { map pendings = 4; } +// PipelineStatus +message PipelineStatus { + required string status = 1; + required string message = 2; +} + message ListBuffersRequest { required string pipeline = 1; } @@ -64,6 +70,14 @@ message GetBufferResponse { required BufferInfo buffer = 1; } +message GetPipelineStatusRequest { + required string pipeline = 1; +} + +message GetPipelineStatusResponse { + required PipelineStatus status = 1; +} + message GetVertexMetricsRequest { required string pipeline = 2; required string vertex = 3; @@ -110,4 +124,8 @@ service DaemonService { rpc GetPipelineWatermarks (GetPipelineWatermarksRequest) returns (GetPipelineWatermarksResponse) { option (google.api.http).get = "/api/v1/pipelines/{pipeline}/watermarks"; }; + + rpc GetPipelineStatus (GetPipelineStatusRequest) returns (GetPipelineStatusResponse) { + option (google.api.http).get = "/api/v1/pipelines/{pipeline}/status"; + }; } \ No newline at end of file diff --git a/pkg/daemon/client/daemon_client.go b/pkg/daemon/client/daemon_client.go index d669419f87..b9d3d1d76c 100644 --- a/pkg/daemon/client/daemon_client.go +++ b/pkg/daemon/client/daemon_client.go @@ -108,3 +108,13 @@ func (dc *DaemonClient) GetPipelineWatermarks(ctx context.Context, pipeline stri return rspn.PipelineWatermarks, nil } } + +func (dc *DaemonClient) GetPipelineStatus(ctx context.Context, pipeline string) (*daemon.PipelineStatus, error) { + if rspn, err := dc.client.GetPipelineStatus(ctx, &daemon.GetPipelineStatusRequest{ + Pipeline: &pipeline, + }); err != nil { + return nil, err + } else { + return rspn.Status, nil + } +} diff --git a/pkg/daemon/server/service/pipeline_metrics_query.go b/pkg/daemon/server/service/pipeline_metrics_query.go index ccd4d883e4..d7004ffaaf 100644 --- a/pkg/daemon/server/service/pipeline_metrics_query.go +++ b/pkg/daemon/server/service/pipeline_metrics_query.go @@ -51,6 +51,12 @@ type pipelineMetadataQuery struct { watermarkFetchers map[string][]fetch.Fetcher } +const ( + PipelineStatusOK = "OK" + PipelineStatusError = "Error" + PipelineStatusUnknown = "Unknown" +) + // NewPipelineMetadataQuery returns a new instance of pipelineMetadataQuery func NewPipelineMetadataQuery(isbSvcClient isbsvc.ISBService, pipeline *v1alpha1.Pipeline, wmFetchers map[string][]fetch.Fetcher) (*pipelineMetadataQuery, error) { var err error @@ -233,6 +239,51 @@ func (ps *pipelineMetadataQuery) GetVertexMetrics(ctx context.Context, req *daem return resp, nil } +func (ps *pipelineMetadataQuery) GetPipelineStatus(ctx context.Context, req *daemon.GetPipelineStatusRequest) (*daemon.GetPipelineStatusResponse, error) { + + resp := new(daemon.GetPipelineStatusResponse) + + // get all vertices of pipeline + vertices := ps.pipeline.Spec.Vertices + + // loop over vertices and get metrics to check pending messages vs processing rate + for _, vertex := range vertices { + vertexReq := new(daemon.GetVertexMetricsRequest) + vertexReq.Vertex = &vertex.Name + vertexResp, err := ps.GetVertexMetrics(ctx, vertexReq) + // if err is not nil, more than likely autoscaling is down to 0 and metrics are not available + if err != nil { + resp.Status = &daemon.PipelineStatus{ + Status: pointer.String(PipelineStatusUnknown), + Message: pointer.String("Pipeline status is unknown."), + } + return resp, nil + } + + // may need to revisit later, another concern could be that the processing rate is too slow instead of just 0 + for _, vertexMetrics := range vertexResp.VertexMetrics { + if pending, ok := vertexMetrics.GetPendings()["default"]; ok { + if processingRate, ok := vertexMetrics.GetProcessingRates()["default"]; ok { + if pending > 0 && processingRate == 0 { + resp.Status = &daemon.PipelineStatus{ + Status: pointer.String(PipelineStatusError), + Message: pointer.String(fmt.Sprintf("Pipeline has an error. Vertex %s is not processing pending messages.", vertex.Name)), + } + return resp, nil + } + } + } + } + } + + resp.Status = &daemon.PipelineStatus{ + Status: pointer.String(PipelineStatusOK), + Message: pointer.String("Pipeline has no issue."), + } + + return resp, nil +} + func getBufferLimits(pl *v1alpha1.Pipeline, edge v1alpha1.Edge) (bufferLength int64, bufferUsageLimit float64) { plLimits := pl.GetPipelineLimits() bufferLength = int64(*plLimits.BufferMaxLength) diff --git a/pkg/daemon/server/service/pipeline_metrics_query_test.go b/pkg/daemon/server/service/pipeline_metrics_query_test.go index c1535f923d..856a5c3715 100644 --- a/pkg/daemon/server/service/pipeline_metrics_query_test.go +++ b/pkg/daemon/server/service/pipeline_metrics_query_test.go @@ -25,6 +25,7 @@ import ( "github.com/stretchr/testify/assert" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/pointer" "github.com/numaproj/numaflow/pkg/apis/numaflow/v1alpha1" "github.com/numaproj/numaflow/pkg/apis/proto/daemon" @@ -203,3 +204,83 @@ func TestListBuffers(t *testing.T) { assert.NoError(t, err) assert.Equal(t, len(resp.Buffers), 2) } + +func TestGetPipelineStatus(t *testing.T) { + pipelineName := "simple-pipeline" + pipeline := &v1alpha1.Pipeline{ + ObjectMeta: metav1.ObjectMeta{ + Name: pipelineName, + }, + Spec: v1alpha1.PipelineSpec{ + Vertices: []v1alpha1.AbstractVertex{ + {Name: "cat"}, + }, + }, + } + client, _ := isbsvc.NewISBJetStreamSvc(pipelineName) + pipelineMetricsQueryService, err := NewPipelineMetadataQuery(client, pipeline, nil) + assert.NoError(t, err) + + OKPipelineResponse := daemon.PipelineStatus{Status: pointer.String("OK"), Message: pointer.String("Pipeline has no issue.")} + ErrorPipelineResponse := daemon.PipelineStatus{Status: pointer.String("Error"), Message: pointer.String("Pipeline has an error. Vertex cat is not processing pending messages.")} + + metricsResponse := `# HELP vertex_processing_rate Message processing rate in the last period of seconds, tps. It represents the rate of a vertex instead of a pod. +# TYPE vertex_processing_rate gauge +vertex_processing_rate{period="15m",pipeline="simple-pipeline",vertex="cat"} 4.894736842105263 +vertex_processing_rate{period="1m",pipeline="simple-pipeline",vertex="cat"} 5.084745762711864 +vertex_processing_rate{period="5m",pipeline="simple-pipeline",vertex="cat"} 4.894736842105263 +vertex_processing_rate{period="default",pipeline="simple-pipeline",vertex="cat"} 4.894736842105263 + +# HELP vertex_pending_messages Average pending messages in the last period of seconds. It is the pending messages of a vertex, not a pod. +# TYPE vertex_pending_messages gauge +vertex_pending_messages{period="15m",pipeline="simple-pipeline",vertex="cat"} 4.011 +vertex_pending_messages{period="1m",pipeline="simple-pipeline",vertex="cat"} 5.333 +vertex_pending_messages{period="5m",pipeline="simple-pipeline",vertex="cat"} 6.002 +vertex_pending_messages{period="default",pipeline="simple-pipeline",vertex="cat"} 7.00002 +` + ioReader := io.NopCloser(bytes.NewReader([]byte(metricsResponse))) + + pipelineMetricsQueryService.httpClient = &mockHttpClient{ + MockGet: func(url string) (*http.Response, error) { + return &http.Response{ + StatusCode: 200, + Body: ioReader, + }, nil + }, + } + + req := &daemon.GetPipelineStatusRequest{Pipeline: &pipelineName} + + resp, err := pipelineMetricsQueryService.GetPipelineStatus(context.Background(), req) + assert.NoError(t, err) + assert.Equal(t, &OKPipelineResponse, resp.Status) + + errorMetricsResponse := `# HELP vertex_processing_rate Message processing rate in the last period of seconds, tps. It represents the rate of a vertex instead of a pod. +# TYPE vertex_processing_rate gauge +vertex_processing_rate{period="15m",pipeline="simple-pipeline",vertex="cat"} 0 +vertex_processing_rate{period="1m",pipeline="simple-pipeline",vertex="cat"} 0 +vertex_processing_rate{period="5m",pipeline="simple-pipeline",vertex="cat"} 0 +vertex_processing_rate{period="default",pipeline="simple-pipeline",vertex="cat"} 0 + +# HELP vertex_pending_messages Average pending messages in the last period of seconds. It is the pending messages of a vertex, not a pod. +# TYPE vertex_pending_messages gauge +vertex_pending_messages{period="15m",pipeline="simple-pipeline",vertex="cat"} 4.011 +vertex_pending_messages{period="1m",pipeline="simple-pipeline",vertex="cat"} 5.333 +vertex_pending_messages{period="5m",pipeline="simple-pipeline",vertex="cat"} 6.002 +vertex_pending_messages{period="default",pipeline="simple-pipeline",vertex="cat"} 7.00002 +` + ioReader = io.NopCloser(bytes.NewReader([]byte(errorMetricsResponse))) + + pipelineMetricsQueryService.httpClient = &mockHttpClient{ + MockGet: func(url string) (*http.Response, error) { + return &http.Response{ + StatusCode: 200, + Body: ioReader, + }, nil + }, + } + + resp, err = pipelineMetricsQueryService.GetPipelineStatus(context.Background(), req) + assert.NoError(t, err) + assert.Equal(t, &ErrorPipelineResponse, resp.Status) +} diff --git a/server/apis/v1/handler.go b/server/apis/v1/handler.go index dd8c329ee2..da223f13f6 100644 --- a/server/apis/v1/handler.go +++ b/server/apis/v1/handler.go @@ -302,6 +302,26 @@ func (h *handler) GetPipelineWatermarks(c *gin.Context) { c.JSON(http.StatusOK, l) } +// GetPipelineStatus is used to provide status check for a given pipeline +func (h *handler) GetPipelineStatus(c *gin.Context) { + ns := c.Param("namespace") + pipeline := c.Param("pipeline") + client, err := daemonclient.NewDaemonServiceClient(daemonSvcAddress(ns, pipeline)) + if err != nil { + c.JSON(http.StatusInternalServerError, err.Error()) + return + } + defer func() { + _ = client.Close() + }() + l, err := client.GetPipelineStatus(context.Background(), pipeline) + if err != nil { + c.JSON(http.StatusInternalServerError, err.Error()) + return + } + c.JSON(http.StatusOK, l) +} + func daemonSvcAddress(ns, pipeline string) string { return fmt.Sprintf("%s.%s.svc.cluster.local:%d", fmt.Sprintf("%s-daemon-svc", pipeline), ns, dfv1.DaemonServicePort) } diff --git a/server/routes/routes.go b/server/routes/routes.go index 2cec43f3fe..1423c92e8c 100644 --- a/server/routes/routes.go +++ b/server/routes/routes.go @@ -50,4 +50,5 @@ func v1Routes(r gin.IRouter) { r.GET("/namespaces/:namespace/pipelines/:pipeline/edges/:edge", handler.GetPipelineEdge) r.GET("/namespaces/:namespace/pipelines/:pipeline/vertices/:vertex/metrics", handler.GetVertexMetrics) r.GET("/namespaces/:namespace/pipelines/:pipeline/watermarks", handler.GetPipelineWatermarks) + r.GET("/namespaces/:namespace/pipelines/:pipeline/status", handler.GetPipelineStatus) }