From ea4b418146ba78882c8313a3255f672ddd9da063 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 11 Jul 2024 17:26:31 +0530 Subject: [PATCH 01/17] type :Fallback-pipeline addition in corev2 Signed-off-by: manisha kumari --- v2/fallback_pipeline.go | 100 +++++++++++ v2/pipeline.pb.go | 338 ++++++++++++++++++++++++++++++++++--- v2/pipeline.proto | 19 +++ v2/pipeline_workflow.go | 43 +++++ v2/pipeline_workflow.pb.go | 48 +++--- v2/pipeline_workflow.proto | 2 +- v2/pipelinepb_test.go | 124 ++++++++++++++ v2/secret.pb.go | 17 +- v2/secret.proto | 2 +- v2/typemap.go | 1 + v2/typemap_test.go | 17 ++ v2/types_gen.go | 11 +- 12 files changed, 663 insertions(+), 59 deletions(-) create mode 100644 v2/fallback_pipeline.go diff --git a/v2/fallback_pipeline.go b/v2/fallback_pipeline.go new file mode 100644 index 0000000..2aaf3b5 --- /dev/null +++ b/v2/fallback_pipeline.go @@ -0,0 +1,100 @@ +package v2 + +import ( + "errors" + "net/url" + "path" + + stringsutil "github.com/sensu/core/v2/internal/stringutil" +) + +const ( + // PipelinesResource is the name of this resource type + FallbackPipelineResource = "fallbackPipeline" +) + +// GetObjectMeta returns the object metadata for the resource. +func (f *FallbackPipeline) GetObjectMeta() ObjectMeta { + return f.ObjectMeta +} + +// SetObjectMeta sets the object metadata for the resource. +func (f *FallbackPipeline) SetObjectMeta(meta ObjectMeta) { + f.ObjectMeta = meta +} + +// SetNamespace sets the namespace of the resource. +func (f *FallbackPipeline) SetNamespace(namespace string) { + f.Namespace = namespace +} + +// StorePrefix returns the path prefix to this resource in the store. +func (f *FallbackPipeline) StorePrefix() string { + return FallbackPipelineResource +} + +// RBACName describes the name of the resource for RBAC purposes. +func (f *FallbackPipeline) RBACName() string { + return FallbackPipelineResource +} + +// URIPath gives the path component of a pipeline URI. +func (f *FallbackPipeline) URIPath() string { + if f.Namespace == "" { + return path.Join(URLPrefix, FallbackPipelineResource, url.PathEscape(f.Name)) + } + return path.Join(URLPrefix, "namespaces", url.PathEscape(f.Namespace), FallbackPipelineResource, url.PathEscape(f.Name)) +} + +// // Validate checks if a pipeline resource passes validation rules. +func (f *FallbackPipeline) Validate() error { + if err := ValidateName(f.ObjectMeta.Name); err != nil { + return errors.New("name " + err.Error()) + } + + if f.ObjectMeta.Namespace == "" { + return errors.New("namespace must be set") + } + //Manisha + //for _, workflow := range f.Fallbackflows { + // if err := workflow.Validate(); err != nil { + // return fmt.Errorf("workflow %w", err) + // } + //} + + return nil +} + +// FallbackPipelineFields returns a set of fields that represent that resource. +func FallbackPipelineFields(r Resource) map[string]string { + resource := r.(*FallbackPipeline) + fields := map[string]string{ + "fallbackPipeline.name": resource.ObjectMeta.Name, + "fallbackPipeline.namespace": resource.ObjectMeta.Namespace, + } + stringsutil.MergeMapWithPrefix(fields, resource.ObjectMeta.Labels, "fallbackPipeline.labels.") + return fields +} + +// Fields returns a set of fields that represent that resource. +func (f *FallbackPipeline) Fields() map[string]string { + return FallbackPipelineFields(f) +} + +//// FixturePipeline returns a testing fixture for a Pipeline object. +//func FixtureFallbackPipeline(name, namespace string) *Pipeline { +// return &Pipeline{ +// ObjectMeta: NewObjectMeta(name, namespace), +// Workflows: []*PipelineWorkflow{}, +// } +//} +// +//// FixturePipelineReference returns a testing fixture for a ResourceReference +//// object referencing a corev2.Pipeline. +//func FixtureFallbackPipelineReference(name string) *ResourceReference { +// return &ResourceReference{ +// APIVersion: "core/v2", +// Type: "Pipeline", +// Name: name, +// } +//} diff --git a/v2/pipeline.pb.go b/v2/pipeline.pb.go index 7623ca9..d60fba0 100644 --- a/v2/pipeline.pb.go +++ b/v2/pipeline.pb.go @@ -76,8 +76,62 @@ func (m *Pipeline) GetWorkflows() []*PipelineWorkflow { return nil } +// Pipeline represents a named collection of fallbackpipeline spec details. +// FallbackPipeline represents a named collection of fallbackpipeline spec details. +type FallbackPipeline struct { + // Metadata contains the name, namespace, labels and annotations of the + ObjectMeta `protobuf:"bytes,1,opt,name=Metadata,proto3,embedded=Metadata" json:"metadata,omitempty"` + // FallbackpipelineList contains one or more pipeline list. + //FallbackPipelineListflow Pipelinelist = 2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; + Pipelist []*ResourceReference `protobuf:"bytes,2,rep,name=pipelist,proto3" json:"pipelinelist" yaml: "pipelinelist"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FallbackPipeline) Reset() { *m = FallbackPipeline{} } +func (m *FallbackPipeline) String() string { return proto.CompactTextString(m) } +func (*FallbackPipeline) ProtoMessage() {} +func (*FallbackPipeline) Descriptor() ([]byte, []int) { + return fileDescriptor_70464c4bd162b56d, []int{1} +} +func (m *FallbackPipeline) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FallbackPipeline) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FallbackPipeline.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 *FallbackPipeline) XXX_Merge(src proto.Message) { + xxx_messageInfo_FallbackPipeline.Merge(m, src) +} +func (m *FallbackPipeline) XXX_Size() int { + return m.Size() +} +func (m *FallbackPipeline) XXX_DiscardUnknown() { + xxx_messageInfo_FallbackPipeline.DiscardUnknown(m) +} + +var xxx_messageInfo_FallbackPipeline proto.InternalMessageInfo + +func (m *FallbackPipeline) GetPipelist() []*ResourceReference { + if m != nil { + return m.Pipelist + } + return nil +} + func init() { proto.RegisterType((*Pipeline)(nil), "sensu.core.v2.Pipeline") + proto.RegisterType((*FallbackPipeline)(nil), "sensu.core.v2.FallbackPipeline") } func init() { @@ -85,7 +139,7 @@ func init() { } var fileDescriptor_70464c4bd162b56d = []byte{ - // 290 bytes of a gzipped FileDescriptorProto + // 372 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0xd5, 0x4f, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x33, 0xd2, 0x2f, 0xc8, 0x2c, 0x48, 0xcd, 0xc9, 0xcc, 0x4b, 0xd5, 0x2b, 0x28, @@ -93,18 +147,23 @@ var fileDescriptor_70464c4bd162b56d = []byte{ 0xf4, 0xa5, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x25, 0x95, 0xa6, 0x39, 0x94, 0x19, 0xea, 0x19, 0xeb, 0x19, 0x81, 0x05, 0xc1, 0x62, 0x60, 0x16, 0xc4, 0x10, 0x29, 0x65, 0x9c, 0xb6, 0xe5, 0xa6, 0x96, 0x24, 0x42, 0x15, 0x19, 0x10, 0x74, 0x52, 0x7c, 0x79, 0x7e, 0x51, 0x76, 0x5a, 0x4e, 0x7e, - 0x39, 0x44, 0x87, 0xd2, 0x11, 0x46, 0x2e, 0x8e, 0x00, 0xa8, 0x9c, 0x50, 0x28, 0x17, 0x87, 0x6f, - 0x6a, 0x49, 0x62, 0x4a, 0x62, 0x49, 0xa2, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0xa4, 0x1e, - 0x8a, 0xdb, 0xf5, 0xfc, 0x93, 0xb2, 0x52, 0x93, 0x4b, 0x40, 0x8a, 0x9c, 0xe4, 0x4e, 0xdc, 0x93, - 0x67, 0xb8, 0x70, 0x4f, 0x9e, 0xf1, 0xd5, 0x3d, 0x79, 0xa1, 0x5c, 0xa8, 0x36, 0x9d, 0xfc, 0xdc, - 0xcc, 0x92, 0xd4, 0xdc, 0x82, 0x92, 0xca, 0x20, 0xb8, 0x51, 0x42, 0x89, 0x5c, 0x9c, 0xe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 0x27, 0x3f, 0x37, 0xb3, 0x24, 0x35, 0xb7, 0xa0, 0xa4, 0x32, 0x08, 0x6e, + 0x94, 0x50, 0x22, 0x17, 0x67, 0x38, 0xd4, 0xa1, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, + 0xf2, 0x68, 0xe6, 0xc2, 0x9c, 0x00, 0x53, 0xe7, 0xa4, 0xf4, 0xea, 0x9e, 0x3c, 0x27, 0xcc, 0x7b, + 0xc5, 0x9f, 0xee, 0xc9, 0x0b, 0x56, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x28, 0xc1, 0xc5, 0x94, 0x82, + 0x10, 0xa6, 0x2a, 0x5d, 0x64, 0xe4, 0x12, 0x70, 0x4b, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0xa6, + 0xb5, 0x77, 0xd2, 0xb8, 0x38, 0x20, 0x11, 0x50, 0x5c, 0x02, 0xf5, 0x8d, 0x02, 0x9a, 0xb1, 0x41, + 0xd0, 0xd0, 0x0e, 0x82, 0x05, 0xb6, 0x93, 0xc6, 0xab, 0x7b, 0xf2, 0x3c, 0xb0, 0x68, 0x03, 0xe9, + 0xfc, 0x74, 0x4f, 0x5e, 0x04, 0xea, 0x23, 0x64, 0x61, 0xa5, 0x20, 0xb8, 0xd9, 0x4e, 0x0a, 0x3f, + 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, + 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x53, 0x99, + 0x51, 0x12, 0x1b, 0x38, 0x0e, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x16, 0xc2, 0xc4, 0x2a, + 0xbd, 0x02, 0x00, 0x00, } func (this *Pipeline) Equal(that interface{}) bool { @@ -142,6 +201,41 @@ func (this *Pipeline) Equal(that interface{}) bool { } return true } +func (this *FallbackPipeline) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FallbackPipeline) + if !ok { + that2, ok := that.(FallbackPipeline) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if !this.ObjectMeta.Equal(&that1.ObjectMeta) { + return false + } + if len(this.Pipelist) != len(that1.Pipelist) { + return false + } + for i := range this.Pipelist { + if !this.Pipelist[i].Equal(that1.Pipelist[i]) { + return false + } + } + if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { + return false + } + return true +} func (m *Pipeline) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -193,6 +287,57 @@ func (m *Pipeline) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *FallbackPipeline) 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 *FallbackPipeline) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FallbackPipeline) 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 len(m.Pipelist) > 0 { + for iNdEx := len(m.Pipelist) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Pipelist[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + { + size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPipeline(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintPipeline(dAtA []byte, offset int, v uint64) int { offset -= sovPipeline(v) base := offset @@ -221,6 +366,23 @@ func NewPopulatedPipeline(r randyPipeline, easy bool) *Pipeline { return this } +func NewPopulatedFallbackPipeline(r randyPipeline, easy bool) *FallbackPipeline { + this := &FallbackPipeline{} + v3 := NewPopulatedObjectMeta(r, easy) + this.ObjectMeta = *v3 + if r.Intn(5) != 0 { + v4 := r.Intn(5) + this.Pipelist = make([]*ResourceReference, v4) + for i := 0; i < v4; i++ { + this.Pipelist[i] = NewPopulatedResourceReference(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedPipeline(r, 3) + } + return this +} + type randyPipeline interface { Float32() float32 Float64() float64 @@ -240,9 +402,9 @@ func randUTF8RunePipeline(r randyPipeline) rune { return rune(ru + 61) } func randStringPipeline(r randyPipeline) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { tmps[i] = randUTF8RunePipeline(r) } return string(tmps) @@ -264,11 +426,11 @@ func randFieldPipeline(dAtA []byte, r randyPipeline, fieldNumber int, wire int) switch wire { case 0: dAtA = encodeVarintPopulatePipeline(dAtA, uint64(key)) - v4 := r.Int63() + v6 := r.Int63() if r.Intn(2) == 0 { - v4 *= -1 + v6 *= -1 } - dAtA = encodeVarintPopulatePipeline(dAtA, uint64(v4)) + dAtA = encodeVarintPopulatePipeline(dAtA, uint64(v6)) case 1: dAtA = encodeVarintPopulatePipeline(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -313,6 +475,26 @@ func (m *Pipeline) Size() (n int) { return n } +func (m *FallbackPipeline) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ObjectMeta.Size() + n += 1 + l + sovPipeline(uint64(l)) + if len(m.Pipelist) > 0 { + for _, e := range m.Pipelist { + l = e.Size() + n += 1 + l + sovPipeline(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func sovPipeline(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -437,6 +619,124 @@ func (m *Pipeline) Unmarshal(dAtA []byte) error { } return nil } +func (m *FallbackPipeline) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPipeline + } + 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: FallbackPipeline: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FallbackPipeline: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPipeline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPipeline + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pipelist", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPipeline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPipeline + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPipeline + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Pipelist = append(m.Pipelist, &ResourceReference{}) + if err := m.Pipelist[len(m.Pipelist)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPipeline(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPipeline + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipPipeline(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/v2/pipeline.proto b/v2/pipeline.proto index a0467f2..3e1c6da 100644 --- a/v2/pipeline.proto +++ b/v2/pipeline.proto @@ -3,6 +3,7 @@ syntax = "proto3"; import "github.com/gogo/protobuf@v1.3.2/gogoproto/gogo.proto"; import "github.com/sensu/core/v2/meta.proto"; import "github.com/sensu/core/v2/pipeline_workflow.proto"; +import "github.com/sensu/core/v2/resource_reference.proto"; package sensu.core.v2; @@ -23,3 +24,21 @@ message Pipeline { // Workflows contains one or more pipeline workflows. repeated PipelineWorkflow Workflows = 2 [ (gogoproto.jsontag) = "workflows", (gogoproto.moretags) = "yaml: \"workflows\"" ]; } + +//for fallback pipeline + + +// Pipeline represents a named collection of fallbackpipeline spec details. +// FallbackPipeline represents a named collection of fallbackpipeline spec details. +message FallbackPipeline { + // Metadata contains the name, namespace, labels and annotations of the + ObjectMeta Metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; + + // FallbackpipelineList contains one or more pipeline list. + //FallbackPipelineListflow Pipelinelist = 2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; + repeated ResourceReference pipelist =2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; +} + + + + diff --git a/v2/pipeline_workflow.go b/v2/pipeline_workflow.go index a006fb7..6aa1597 100644 --- a/v2/pipeline_workflow.go +++ b/v2/pipeline_workflow.go @@ -130,6 +130,49 @@ func (w *PipelineWorkflow) Validate() error { return nil } +//Manisha fallback validate to be written +//FallbackPipelineListflow +// +//func (w *FallbackPipelineListflow) Validate() error { +// if err := ValidateName(w.Name); err != nil { +// return errors.New("name " + err.Error()) +// } +// +// if w.Filters != nil { +// for _, filter := range w.Filters { +// if err := filter.Validate(); err != nil { +// return fmt.Errorf("filter %w", err) +// } +// if err := w.validateEventFilterReference(filter); err != nil { +// return fmt.Errorf("filter %w", err) +// } +// } +// } +// +// if w.Mutator != nil { +// if err := w.Mutator.Validate(); err != nil { +// return fmt.Errorf("mutator %w", err) +// } +// if err := w.validateMutatorReference(w.Mutator); err != nil { +// return fmt.Errorf("mutator %w", err) +// } +// } +// +// if w.Handler == nil { +// return errors.New("handler must be set") +// } +// +// if err := w.Handler.Validate(); err != nil { +// return fmt.Errorf("handler %w", err) +// } +// +// if err := w.validateHandlerReference(w.Handler); err != nil { +// return fmt.Errorf("handler %w", err) +// } +// +// return nil +//} + func (w *PipelineWorkflow) validateEventFilterReference(ref *ResourceReference) error { for _, allowed := range validPipelineWorkflowFilterReferences.references { if allowed.APIVersion == ref.APIVersion && allowed.Type == ref.Type { diff --git a/v2/pipeline_workflow.pb.go b/v2/pipeline_workflow.pb.go index 39c4a04..5b38edb 100644 --- a/v2/pipeline_workflow.pb.go +++ b/v2/pipeline_workflow.pb.go @@ -112,30 +112,30 @@ func init() { } var fileDescriptor_10fe3e5d2693196a = []byte{ - // 363 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x4b, 0xfb, 0x40, - 0x18, 0xc6, 0xff, 0xd7, 0x96, 0x7f, 0x31, 0x45, 0xa8, 0x59, 0x8c, 0x1d, 0x92, 0x10, 0x97, 0x82, - 0x72, 0xb1, 0xa9, 0x93, 0x93, 0x74, 0x10, 0x17, 0x45, 0xb2, 0x08, 0x8a, 0x94, 0x34, 0xbe, 0x69, - 0x83, 0xb9, 0x5c, 0xb8, 0x5c, 0x52, 0xfa, 0x4d, 0xfc, 0x08, 0x7e, 0x04, 0x3f, 0x82, 0xa3, 0x9f, - 0x20, 0x68, 0xdc, 0x3a, 0x76, 0x72, 0x70, 0x90, 0x26, 0x17, 0x50, 0x6a, 0xa1, 0xdb, 0xdd, 0xf3, - 0x3e, 0xcf, 0xf3, 0x7b, 0x8f, 0x93, 0x8e, 0xc6, 0x3e, 0x9f, 0x24, 0x23, 0xec, 0x52, 0x62, 0xc6, - 0x10, 0xc6, 0x89, 0xe9, 0x52, 0x06, 0x66, 0x6a, 0x99, 0x91, 0x1f, 0x41, 0xe0, 0x87, 0x30, 0x9c, - 0x52, 0xf6, 0xe0, 0x05, 0x74, 0x8a, 0x23, 0x46, 0x39, 0x95, 0xb7, 0x0b, 0x1b, 0x5e, 0xda, 0x70, - 0x6a, 0x75, 0x8e, 0x7f, 0x14, 0x8c, 0xe9, 0x98, 0x9a, 0x85, 0x6b, 0x94, 0x78, 0xa7, 0x69, 0x0f, - 0xf7, 0xb1, 0x55, 0x88, 0x85, 0x56, 0x9c, 0xca, 0x92, 0xce, 0xfe, 0x5a, 0x2c, 0x01, 0xee, 0x08, - 0x53, 0x6f, 0xad, 0x89, 0x41, 0x4c, 0x13, 0xe6, 0xc2, 0x90, 0x81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ff, 0xff, 0x4d, 0x27, 0x74, 0x2b, 0x78, 0x02, 0x00, 0x00, + // 356 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0x48, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0xd5, 0x4f, 0xce, 0x2f, + 0x4a, 0xd5, 0x2f, 0x33, 0xd2, 0x2f, 0xc8, 0x2c, 0x48, 0xcd, 0xc9, 0xcc, 0x4b, 0x8d, 0x2f, 0xcf, + 0x2f, 0xca, 0x4e, 0xcb, 0xc9, 0x2f, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x2b, + 0xd3, 0x03, 0x29, 0xd3, 0x2b, 0x33, 0x92, 0x32, 0x41, 0x32, 0x20, 0x3d, 0x3f, 0x3d, 0x5f, 0x1f, + 0xac, 0x2a, 0xa9, 0x34, 0xcd, 0xa1, 0xcc, 0x50, 0xcf, 0x58, 0xcf, 0x08, 0x2c, 0x08, 0x16, 0x03, + 0xb3, 0x20, 0x86, 0x48, 0x19, 0xe2, 0xb4, 0xb6, 0x28, 0xb5, 0x38, 0xbf, 0xb4, 0x28, 0x39, 0x35, + 0xbe, 0x28, 0x35, 0x2d, 0xb5, 0x28, 0x35, 0x2f, 0x39, 0x15, 0xa2, 0x45, 0xe9, 0x0f, 0x13, 0x97, + 0x40, 0x00, 0xd4, 0x4d, 0xe1, 0x50, 0x27, 0x09, 0x69, 0x73, 0xb1, 0xf8, 0x25, 0xe6, 0xa6, 0x4a, + 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x3a, 0x89, 0xbf, 0xba, 0x27, 0xcf, 0x92, 0x97, 0x98, 0x9b, 0xfa, + 0xe9, 0x9e, 0x3c, 0x77, 0x65, 0x62, 0x6e, 0x8e, 0x95, 0x82, 0x12, 0x88, 0x1b, 0x04, 0x56, 0x24, + 0x94, 0xc7, 0xc5, 0xee, 0x96, 0x99, 0x53, 0x92, 0x5a, 0x54, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, + 0x6d, 0xa4, 0xa0, 0x87, 0xe2, 0x17, 0xbd, 0x20, 0xa8, 0xdd, 0x41, 0x30, 0xab, 0x9d, 0x8c, 0x5e, + 0xdd, 0x93, 0x17, 0x4c, 0x83, 0x68, 0xd2, 0xc9, 0xcf, 0xcd, 0x2c, 0x49, 0xcd, 0x2d, 0x28, 0xa9, + 0xfc, 0x74, 0x4f, 0x5e, 0x12, 0x6a, 0x3c, 0x86, 0x9c, 0x52, 0x10, 0xcc, 0x12, 0x90, 0x7d, 0xbe, + 0xa5, 0x25, 0x89, 0x25, 0xf9, 0x45, 0x12, 0xcc, 0x0a, 0x8c, 0xc4, 0xdb, 0x97, 0x0b, 0xd1, 0x84, + 0xd5, 0x3e, 0x0c, 0x39, 0xa5, 0x20, 0x98, 0x25, 0x42, 0xd1, 0x5c, 0xec, 0x1e, 0x89, 0x79, 0x29, + 0x39, 0xa9, 0x45, 0x12, 0x2c, 0x44, 0xda, 0x27, 0xff, 0xea, 0x9e, 0x3c, 0x7b, 0x06, 0x44, 0xd3, + 0xa7, 0x7b, 0xf2, 0x02, 0x50, 0x5b, 0xa0, 0x22, 0xb1, 0x4a, 0x41, 0x30, 0x13, 0x9d, 0x14, 0x7e, + 0x3c, 0x94, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, + 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa6, 0x32, + 0xa3, 0x24, 0x36, 0x70, 0x3c, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xec, 0xb5, 0x94, 0xf5, + 0x53, 0x02, 0x00, 0x00, } func (this *PipelineWorkflow) Equal(that interface{}) bool { diff --git a/v2/pipeline_workflow.proto b/v2/pipeline_workflow.proto index be59aed..44b7d32 100644 --- a/v2/pipeline_workflow.proto +++ b/v2/pipeline_workflow.proto @@ -1,7 +1,6 @@ syntax = "proto3"; import "github.com/gogo/protobuf@v1.3.2/gogoproto/gogo.proto"; -import "github.com/sensu/core/v2/meta.proto"; import "github.com/sensu/core/v2/resource_reference.proto"; package sensu.core.v2; @@ -31,3 +30,4 @@ message PipelineWorkflow { // Handler contains a reference to a resource to use as an event handler. ResourceReference Handler = 4 [ (gogoproto.jsontag) = "handler", (gogoproto.moretags) = "yaml: \"handler]\"" ]; } + diff --git a/v2/pipelinepb_test.go b/v2/pipelinepb_test.go index 334fde7..9ff6a5a 100644 --- a/v2/pipelinepb_test.go +++ b/v2/pipelinepb_test.go @@ -76,6 +76,62 @@ func TestPipelineMarshalTo(t *testing.T) { } } +func TestFallbackPipelineProto(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFallbackPipeline(popr, false) + dAtA, err := github_com_golang_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FallbackPipeline{} + if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + littlefuzz := make([]byte, len(dAtA)) + copy(littlefuzz, dAtA) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } + if len(littlefuzz) > 0 { + fuzzamount := 100 + for i := 0; i < fuzzamount; i++ { + littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) + littlefuzz = append(littlefuzz, byte(popr.Intn(256))) + } + // shouldn't panic + _ = github_com_golang_protobuf_proto.Unmarshal(littlefuzz, msg) + } +} + +func TestFallbackPipelineMarshalTo(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFallbackPipeline(popr, false) + size := p.Size() + dAtA := make([]byte, size) + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + _, err := p.MarshalTo(dAtA) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FallbackPipeline{} + if err := github_com_golang_protobuf_proto.Unmarshal(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + for i := range dAtA { + dAtA[i] = byte(popr.Intn(256)) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + func TestPipelineJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -94,6 +150,24 @@ func TestPipelineJSON(t *testing.T) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } +func TestFallbackPipelineJSON(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFallbackPipeline(popr, true) + marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} + jsondata, err := marshaler.MarshalToString(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + msg := &FallbackPipeline{} + err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) + } +} func TestPipelineProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -122,6 +196,34 @@ func TestPipelineProtoCompactText(t *testing.T) { } } +func TestFallbackPipelineProtoText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFallbackPipeline(popr, true) + dAtA := github_com_golang_protobuf_proto.MarshalTextString(p) + msg := &FallbackPipeline{} + if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + +func TestFallbackPipelineProtoCompactText(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFallbackPipeline(popr, true) + dAtA := github_com_golang_protobuf_proto.CompactTextString(p) + msg := &FallbackPipeline{} + if err := github_com_golang_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + if !p.Equal(msg) { + t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) + } +} + func TestPipelineSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) @@ -144,4 +246,26 @@ func TestPipelineSize(t *testing.T) { } } +func TestFallbackPipelineSize(t *testing.T) { + seed := time.Now().UnixNano() + popr := math_rand.New(math_rand.NewSource(seed)) + p := NewPopulatedFallbackPipeline(popr, true) + size2 := github_com_golang_protobuf_proto.Size(p) + dAtA, err := github_com_golang_protobuf_proto.Marshal(p) + if err != nil { + t.Fatalf("seed = %d, err = %v", seed, err) + } + size := p.Size() + if len(dAtA) != size { + t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) + } + if size2 != size { + t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) + } + size3 := github_com_golang_protobuf_proto.Size(p) + if size3 != size { + t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) + } +} + //These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/v2/secret.pb.go b/v2/secret.pb.go index e2dc1f6..cb9f933 100644 --- a/v2/secret.pb.go +++ b/v2/secret.pb.go @@ -78,20 +78,19 @@ func init() { } var fileDescriptor_d2ceacd7de622ffa = []byte{ - // 199 bytes of a gzipped FileDescriptorProto + // 188 bytes of a gzipped FileDescriptor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16, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1a, - 0xce, 0x41, 0xdb, 0xfb, 0x00, 0x00, 0x00, + 0x81, 0x05, 0xc1, 0x62, 0x60, 0x16, 0xc4, 0x10, 0x25, 0x3b, 0x2e, 0xb6, 0x60, 0xb0, 0xa1, 0x42, + 0x42, 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, + 0x90, 0x18, 0x17, 0x1b, 0xc4, 0x4a, 0x09, 0x26, 0xb0, 0x28, 0x94, 0x67, 0xc5, 0xd1, 0xb1, 0x40, + 0x9e, 0x61, 0xc5, 0x02, 0x79, 0x46, 0x27, 0x85, 0x1f, 0x0f, 0xe5, 0x18, 0x57, 0x3c, 0x92, 0x63, + 0xdc, 0xf1, 0x48, 0x8e, 0xf1, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, + 0x63, 0x9c, 0xf1, 0x58, 0x8e, 0x21, 0x8a, 0xa9, 0xcc, 0x28, 0x89, 0x0d, 0x6c, 0x91, 0x31, 0x20, + 0x00, 0x00, 0xff, 0xff, 0x1c, 0xd1, 0x8b, 0x81, 0xd6, 0x00, 0x00, 0x00, } func (this *Secret) Equal(that interface{}) bool { diff --git a/v2/secret.proto b/v2/secret.proto index 7caad6b..8266d02 100644 --- a/v2/secret.proto +++ b/v2/secret.proto @@ -1,7 +1,7 @@ syntax = "proto3"; import "github.com/gogo/protobuf@v1.3.2/gogoproto/gogo.proto"; -import "github.com/sensu/core/v2/meta.proto"; +//import "github.com/sensu/core/v2/meta.proto"; package sensu.core.v2; diff --git a/v2/typemap.go b/v2/typemap.go index 89ca62b..0bd0e18 100644 --- a/v2/typemap.go +++ b/v2/typemap.go @@ -30,6 +30,7 @@ var typeMap = map[string]interface{}{ "event": &Event{}, "event_filter": &EventFilter{}, "extension": &Extension{}, + "fallback_pipeline": &FallbackPipeline{}, "handler": &Handler{}, "handler_socket": &HandlerSocket{}, "health_response": &HealthResponse{}, diff --git a/v2/typemap_test.go b/v2/typemap_test.go index d16f349..3da412e 100644 --- a/v2/typemap_test.go +++ b/v2/typemap_test.go @@ -344,6 +344,23 @@ func TestResolveExtension(t *testing.T) { } } +// MANISHA ADDED AUTOMATICALLY +func TestResolveFallbackPipeline(t *testing.T) { + var value interface{} = new(FallbackPipeline) + if _, ok := value.(Resource); ok { + if actual, err := apitools.Resolve("core/v2", "FallbackPipeline"); err != nil { + t.Fatal(err) + } else if _, ok := actual.(*FallbackPipeline); !ok { + t.Fatal("expected to resolve to type ") + } + return + } + _, err := apitools.Resolve("core/v2", "FallbackPipeline") + if err == nil { + t.Fatalf("expected non-nil error") + } +} + func TestResolveHandler(t *testing.T) { var value interface{} = new(Handler) if _, ok := value.(Resource); ok { diff --git a/v2/types_gen.go b/v2/types_gen.go index 3838235..b4783eb 100644 --- a/v2/types_gen.go +++ b/v2/types_gen.go @@ -1,10 +1,11 @@ package v2 -// TODO: go build will build the latest version of the protoc-gen-gofast module -// used by the project. We need a way to pin the exact version of -// protoc-gen-gofast used in this generator. We could not find a way of doing -// this at the time of this writing. - +// +//TODO: go build will build the latest version of the protoc-gen-gofast module +//used by the project. We need a way to pin the exact version of +//protoc-gen-gofast used in this generator. We could not find a way of doing +//this at the time of this writing. +// //go:generate go run ./internal/codegen/check_protoc //go:generate go build -o $GOPATH/bin/protoc-gen-gofast github.com/gogo/protobuf/protoc-gen-gofast //go:generate -command protoc protoc --plugin $GOPATH/bin/protoc-gen-gofast --gofast_out=plugins:$GOPATH/src -I=$GOPATH/pkg/mod -I=$GOPATH/src -I=$GOPATH/pkg/mod/github.com/gogo/protobuf@v1.3.2/protobuf From 11e3b42329dfcc627901d4f4e7eb9e7d2c5b52f5 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 16 Jul 2024 12:00:33 +0530 Subject: [PATCH 02/17] check.yaml changes with fallback addition Signed-off-by: manisha kumari --- v2/check.go | 5 + v2/check.pb.go | 529 ++++++++++++++++++++++++++++++++----------------- v2/check.proto | 15 +- 3 files changed, 361 insertions(+), 188 deletions(-) diff --git a/v2/check.go b/v2/check.go index f816530..a28ea90 100644 --- a/v2/check.go +++ b/v2/check.go @@ -131,6 +131,7 @@ func NewCheck(c *CheckConfig) *Check { MaxOutputSize: c.MaxOutputSize, Scheduler: c.Scheduler, Pipelines: c.Pipelines, + FallbackPipeline: c.FallbackPipeline, } if check.Labels == nil { check.Labels = make(map[string]string) @@ -268,6 +269,10 @@ func (c *Check) MarshalJSON() ([]byte, error) { if c.Pipelines == nil { c.Pipelines = []*ResourceReference{} } + //Manisha + if c.FallbackPipeline == nil { + c.FallbackPipeline = []*ResourceReference{} + } type Clone Check clone := &Clone{} diff --git a/v2/check.pb.go b/v2/check.pb.go index 00fe9de..663edfa 100644 --- a/v2/check.pb.go +++ b/v2/check.pb.go @@ -313,9 +313,11 @@ type CheckConfig struct { // setting by the user will be overridden. Scheduler string `protobuf:"bytes,31,opt,name=scheduler,proto3" json:"-" yaml: "-"` // Pipelines are the pipelines this check will use to process its events. - Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` - OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,33,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` - Subdues []*TimeWindowRepeated `protobuf:"bytes,34,rep,name=subdues,proto3" json:"subdues,omitempty"` + Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` + //Manisha added fallback pieplines detials in order of execution + FallbackPipeline []*ResourceReference `protobuf:"bytes,33,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline" yaml: "fallback_pipeline,omitempty"` + OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,34,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` + Subdues []*TimeWindowRepeated `protobuf:"bytes,35,rep,name=subdues,proto3" json:"subdues,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -464,10 +466,12 @@ type Check struct { ProcessedBy string `protobuf:"bytes,45,opt,name=ProcessedBy,proto3" json:"processed_by,omitempty" yaml: "processed_by"` // Pipelines are the pipelines this check will use to process its events. Pipelines []*ResourceReference `protobuf:"bytes,46,rep,name=pipelines,proto3" json:"pipelines"` + //Manisha added fallback pieplines detials in order of execution + FallbackPipeline []*ResourceReference `protobuf:"bytes,47,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline" yaml: "fallback_pipeline,omitempty"` // MetricThresholds are a list of thresholds to apply to metrics in order to determine // the check status. - OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,47,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` - Subdues []*TimeWindowRepeated `protobuf:"bytes,48,rep,name=subdues,proto3" json:"subdues,omitempty"` + OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,48,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` + Subdues []*TimeWindowRepeated `protobuf:"bytes,49,rep,name=subdues,proto3" json:"subdues,omitempty"` // ExtendedAttributes store serialized arbitrary JSON-encoded data ExtendedAttributes []byte `protobuf:"bytes,99,opt,name=ExtendedAttributes,proto3" json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -593,120 +597,123 @@ func init() { } var fileDescriptor_d70eac2f90fbef24 = []byte{ - // 1800 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd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0x87, 0x0b, 0xc1, 0x5d, 0x6b, 0x4c, 0xee, 0x01, - 0xbd, 0xad, 0xbc, 0x68, 0x98, 0xc1, 0x76, 0x67, 0x3c, 0xb5, 0xae, 0x2d, 0xbd, 0xae, 0x22, 0xa1, - 0x41, 0x8b, 0xc3, 0x4c, 0x17, 0x89, 0xad, 0x6f, 0xb6, 0x48, 0xdc, 0xfd, 0x76, 0x17, 0x89, 0xf7, - 0xdf, 0x50, 0x91, 0xb8, 0xe0, 0xd5, 0xef, 0xbc, 0xe6, 0xd5, 0x5f, 0xa8, 0x2d, 0x7f, 0xaf, 0xff, - 0x86, 0xdc, 0x9f, 0x64, 0x19, 0x9d, 0x07, 0x8c, 0x85, 0x79, 0xa0, 0x98, 0xfb, 0xce, 0xbf, 0x32, - 0xf7, 0xdd, 0x40, 0xab, 0xaa, 0xac, 0x1b, 0x7a, 0x7e, 0x17, 0xfe, 0x71, 0x5a, 0xcd, 0x16, 0x95, - 0xc3, 0x56, 0xfd, 0x3f, 0xff, 0xaa, 0x19, 0x9f, 0x9f, 0xd6, 0x8c, 0xbf, 0x9f, 0xd6, 0x8c, 0x2f, - 0x4e, 0x6b, 0xc6, 0x97, 0xa7, 0x35, 0xe3, 0x9f, 0xa7, 0x35, 0xe3, 0xcf, 0xff, 0xae, 0x9d, 0xfb, - 0xf5, 0xf9, 0x51, 0xbb, 0x53, 0x82, 0x7f, 0x4c, 0xdf, 0xfb, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x15, 0xf7, 0xdc, 0x16, 0xed, 0x16, 0x00, 0x00, + // 1846 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, + 0x15, 0x0f, 0xed, 0x58, 0xb6, 0x46, 0x91, 0x3f, 0x26, 0x76, 0x32, 0xf1, 0x26, 0xa2, 0xa2, 0x7c, + 0xac, 0x9b, 0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0x78, 0xb4, 0x75, 0x9c, 0x05, 0xac, + 0xcb, 0x49, 0x55, 0x39, 0xd6, 0xda, 0x3a, 0x49, 0xcc, 0x15, 0x08, 0xd6, 0x47, 0x20, 0xfb, 0x82, + 0x75, 0xb9, 0x8a, 0xc8, 0x53, 0x7c, 0xba, 0xd2, 0x1b, 0x67, 0xe1, 0x27, 0xa8, 0x02, 0x09, 0xc8, + 0x4e, 0x1f, 0x99, 0x65, 0xb8, 0x29, 0x17, 0xa7, 0x3c, 0x32, 0xea, 0x4a, 0x59, 0xe7, 0xf5, 0x65, + 0x29, 0xea, 0x50, 0x04, 0x83, 0x3d, 0x78, 0x76, 0x54, 0x7c, 0x4b, 0xd7, 0x0b, 0xc8, 0x4a, 0x21, + 0xbe, 0x15, 0x40, 0xd3, 0x06, 0x3f, 0x44, 0x25, 0x11, 0xb7, 0xdc, 0x98, 0x93, 0x55, 0xb8, 0xd6, + 0x57, 0x26, 0x96, 0xda, 0xf7, 0xba, 0xfc, 0x05, 0x3c, 0xbf, 0x2f, 0x3a, 0x3c, 0x48, 0x9f, 0xad, + 0x54, 0x81, 0xea, 0x16, 0x63, 0x74, 0xd6, 0x89, 0xc2, 0x80, 0xac, 0x41, 0x50, 0x43, 0x1f, 0x5f, + 0x42, 0xf3, 0x52, 0xfa, 0x04, 0xc3, 0x5b, 0xb7, 0x38, 0x4c, 0x4c, 0x35, 0xa4, 0xea, 0x47, 0x45, + 0x82, 0xf2, 0x5a, 0x18, 0x4b, 0x72, 0x1e, 0x82, 0x08, 0x22, 0x41, 0x43, 0x34, 0xeb, 0xe0, 0x5d, + 0xb4, 0x9c, 0x9a, 0x2b, 0xd2, 0xf7, 0x9d, 0xac, 0xc3, 0x06, 0x2f, 0x4f, 0x6c, 0x70, 0xec, 0x4d, + 0xa0, 0xd5, 0xde, 0xd8, 0x13, 0x71, 0x17, 0x55, 0xa2, 0x30, 0x0e, 0x5c, 0x3b, 0x0a, 0x5b, 0x5e, + 0x40, 0x36, 0xc0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 0xb1, 0xc9, 0xe7, 0x20, 0x4d, 0x23, + 0x44, 0x33, 0xf3, 0xac, 0x85, 0xff, 0x68, 0x20, 0x3c, 0x6e, 0x3d, 0xc9, 0xda, 0x82, 0xd4, 0x60, + 0xa6, 0xc9, 0xf4, 0x94, 0x1a, 0x72, 0x9f, 0xb5, 0xad, 0xbd, 0x61, 0x62, 0x5e, 0x3e, 0xad, 0x37, + 0x3a, 0xef, 0xcb, 0xc4, 0xbc, 0x3e, 0x60, 0x5d, 0xff, 0x7e, 0xbd, 0xf1, 0x2a, 0x5a, 0x83, 0xae, + 0x16, 0x7d, 0xb4, 0xcf, 0xda, 0x2a, 0xde, 0xca, 0xc2, 0xe9, 0x70, 0x37, 0xf6, 0x79, 0x44, 0x4c, + 0x08, 0x19, 0x0c, 0x2f, 0xc8, 0xcb, 0xc4, 0x2c, 0xeb, 0x39, 0xef, 0x34, 0xe8, 0x88, 0x84, 0x9f, + 0xa0, 0x72, 0xcf, 0xeb, 0x71, 0xdf, 0x0b, 0xb8, 0x20, 0x75, 0xd8, 0x7a, 0x7d, 0x62, 0xeb, 0x54, + 0x17, 0x57, 0x34, 0xab, 0xad, 0xac, 0xea, 0x30, 0x31, 0x47, 0x6a, 0x74, 0xd4, 0xc5, 0xbf, 0x37, + 0xd0, 0xda, 0x01, 0xf3, 0xfd, 0x16, 0x73, 0x0e, 0xed, 0x0c, 0x26, 0x57, 0xdf, 0x70, 0xde, 0x07, + 0xea, 0x91, 0x3a, 0xa5, 0xfe, 0x32, 0x31, 0xaf, 0xe9, 0xbd, 0x9f, 0x92, 0x8d, 0x99, 0x23, 0x93, + 0x3e, 0xd3, 0x42, 0xfc, 0x17, 0x03, 0x91, 0x09, 0x13, 0x66, 0x09, 0x41, 0x90, 0x06, 0x6c, 0xaa, + 0x36, 0xdd, 0x4f, 0x19, 0xcd, 0xda, 0x1f, 0x26, 0x66, 0x63, 0xd6, 0x1c, 0x63, 0x3e, 0xbb, 0x35, + 0xdd, 0x67, 0x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 0x8b, 0x15, 0xe6, 0x47, 0x10, 0x64, 0x50, 0x0d, 0xe6, 0x60, 0xb1, 0xb8, 0xdc, 0x47, 0x95, 0x67, + 0x51, 0xe8, 0x70, 0x21, 0xb8, 0x6b, 0x0d, 0xc8, 0x1d, 0xa0, 0xef, 0xa8, 0x28, 0xea, 0x65, 0xb0, + 0xdd, 0x1a, 0x8c, 0xed, 0x6b, 0x5d, 0xef, 0xab, 0x48, 0x68, 0xd0, 0xe2, 0x34, 0xe3, 0x25, 0x6b, + 0xf3, 0x3b, 0x2a, 0x59, 0xb7, 0xdf, 0xc5, 0x92, 0xf5, 0xee, 0xbb, 0x5d, 0xb2, 0xde, 0x7b, 0x4b, + 0x25, 0xeb, 0x8c, 0x2f, 0x22, 0xce, 0x6b, 0xbe, 0x88, 0x14, 0x2a, 0xdd, 0xdf, 0xea, 0x4f, 0xb4, + 0x7b, 0xa3, 0x9c, 0xa7, 0xb3, 0x92, 0x31, 0x33, 0x2b, 0x15, 0x33, 0xf1, 0xdc, 0x2b, 0x33, 0xf1, + 0x55, 0xb4, 0xa4, 0x8a, 0xcc, 0x9e, 0x17, 0xb4, 0xe1, 0x6b, 0xdc, 0x52, 0xb6, 0xa9, 0x1c, 0xb6, + 0xea, 0xff, 0xfe, 0x47, 0xcd, 0xf8, 0xfa, 0xa4, 0x66, 0xfc, 0xed, 0xa4, 0x66, 0x7c, 0x73, 0x52, + 0x33, 0xbe, 0x3d, 0xa9, 0x19, 0x7f, 0x3f, 0xa9, 0x19, 0x7f, 0xfa, 0x67, 0xed, 0xcc, 0x2f, 0xe7, + 0xfa, 0x3b, 0xad, 0x12, 0x7c, 0x4d, 0xfe, 0xf8, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0x38, + 0x25, 0xe7, 0x09, 0x18, 0x00, 0x00, } func (this *CheckRequest) Equal(that interface{}) bool { @@ -989,6 +996,14 @@ func (this *CheckConfig) Equal(that interface{}) bool { return false } } + if len(this.FallbackPipeline) != len(that1.FallbackPipeline) { + return false + } + for i := range this.FallbackPipeline { + if !this.FallbackPipeline[i].Equal(that1.FallbackPipeline[i]) { + return false + } + } if len(this.OutputMetricThresholds) != len(that1.OutputMetricThresholds) { return false } @@ -1215,6 +1230,14 @@ func (this *Check) Equal(that interface{}) bool { return false } } + if len(this.FallbackPipeline) != len(that1.FallbackPipeline) { + return false + } + for i := range this.FallbackPipeline { + if !this.FallbackPipeline[i].Equal(that1.FallbackPipeline[i]) { + return false + } + } if len(this.OutputMetricThresholds) != len(that1.OutputMetricThresholds) { return false } @@ -1303,6 +1326,7 @@ type CheckConfigFace interface { GetOutputMetricTags() []*MetricTag GetScheduler() string GetPipelines() []*ResourceReference + GetFallbackPipeline() []*ResourceReference GetOutputMetricThresholds() []*MetricThreshold GetSubdues() []*TimeWindowRepeated } @@ -1427,6 +1451,10 @@ func (this *CheckConfig) GetPipelines() []*ResourceReference { return this.Pipelines } +func (this *CheckConfig) GetFallbackPipeline() []*ResourceReference { + return this.FallbackPipeline +} + func (this *CheckConfig) GetOutputMetricThresholds() []*MetricThreshold { return this.OutputMetricThresholds } @@ -1465,6 +1493,7 @@ func NewCheckConfigFromFace(that CheckConfigFace) *CheckConfig { this.OutputMetricTags = that.GetOutputMetricTags() this.Scheduler = that.GetScheduler() this.Pipelines = that.GetPipelines() + this.FallbackPipeline = that.GetFallbackPipeline() this.OutputMetricThresholds = that.GetOutputMetricThresholds() this.Subdues = that.GetSubdues() return this @@ -1514,6 +1543,7 @@ type CheckFace interface { GetScheduler() string GetProcessedBy() string GetPipelines() []*ResourceReference + GetFallbackPipeline() []*ResourceReference GetOutputMetricThresholds() []*MetricThreshold GetSubdues() []*TimeWindowRepeated GetExtendedAttributes() []byte @@ -1695,6 +1725,10 @@ func (this *Check) GetPipelines() []*ResourceReference { return this.Pipelines } +func (this *Check) GetFallbackPipeline() []*ResourceReference { + return this.FallbackPipeline +} + func (this *Check) GetOutputMetricThresholds() []*MetricThreshold { return this.OutputMetricThresholds } @@ -1751,6 +1785,7 @@ func NewCheckFromFace(that CheckFace) *Check { this.Scheduler = that.GetScheduler() this.ProcessedBy = that.GetProcessedBy() this.Pipelines = that.GetPipelines() + this.FallbackPipeline = that.GetFallbackPipeline() this.OutputMetricThresholds = that.GetOutputMetricThresholds() this.Subdues = that.GetSubdues() this.ExtendedAttributes = that.GetExtendedAttributes() @@ -1993,7 +2028,7 @@ func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2 i-- - dAtA[i] = 0x92 + dAtA[i] = 0x9a } } if len(m.OutputMetricThresholds) > 0 { @@ -2009,6 +2044,22 @@ func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x2 i-- + dAtA[i] = 0x92 + } + } + if len(m.FallbackPipeline) > 0 { + for iNdEx := len(m.FallbackPipeline) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FallbackPipeline[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCheck(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2 + i-- dAtA[i] = 0x8a } } @@ -2340,7 +2391,7 @@ func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3 i-- - dAtA[i] = 0x82 + dAtA[i] = 0x8a } } if len(m.OutputMetricThresholds) > 0 { @@ -2354,6 +2405,22 @@ func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintCheck(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0x82 + } + } + if len(m.FallbackPipeline) > 0 { + for iNdEx := len(m.FallbackPipeline) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FallbackPipeline[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintCheck(dAtA, i, uint64(size)) + } + i-- dAtA[i] = 0x2 i-- dAtA[i] = 0xfa @@ -2997,20 +3064,27 @@ func NewPopulatedCheckConfig(r randyCheck, easy bool) *CheckConfig { } if r.Intn(5) != 0 { v22 := r.Intn(5) - this.OutputMetricThresholds = make([]*MetricThreshold, v22) + this.FallbackPipeline = make([]*ResourceReference, v22) for i := 0; i < v22; i++ { - this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) + this.FallbackPipeline[i] = NewPopulatedResourceReference(r, easy) } } if r.Intn(5) != 0 { v23 := r.Intn(5) - this.Subdues = make([]*TimeWindowRepeated, v23) + this.OutputMetricThresholds = make([]*MetricThreshold, v23) for i := 0; i < v23; i++ { + this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) + } + } + if r.Intn(5) != 0 { + v24 := r.Intn(5) + this.Subdues = make([]*TimeWindowRepeated, v24) + for i := 0; i < v24; i++ { this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) } } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedCheck(r, 35) + this.XXX_unrecognized = randUnrecognizedCheck(r, 36) } return this } @@ -3018,32 +3092,32 @@ func NewPopulatedCheckConfig(r randyCheck, easy bool) *CheckConfig { func NewPopulatedCheck(r randyCheck, easy bool) *Check { this := &Check{} this.Command = string(randStringCheck(r)) - v24 := r.Intn(10) - this.Handlers = make([]string, v24) - for i := 0; i < v24; i++ { + v25 := r.Intn(10) + this.Handlers = make([]string, v25) + for i := 0; i < v25; i++ { this.Handlers[i] = string(randStringCheck(r)) } this.HighFlapThreshold = uint32(r.Uint32()) this.Interval = uint32(r.Uint32()) this.LowFlapThreshold = uint32(r.Uint32()) this.Publish = bool(bool(r.Intn(2) == 0)) - v25 := r.Intn(10) - this.RuntimeAssets = make([]string, v25) - for i := 0; i < v25; i++ { - this.RuntimeAssets[i] = string(randStringCheck(r)) - } v26 := r.Intn(10) - this.Subscriptions = make([]string, v26) + this.RuntimeAssets = make([]string, v26) for i := 0; i < v26; i++ { + this.RuntimeAssets[i] = string(randStringCheck(r)) + } + v27 := r.Intn(10) + this.Subscriptions = make([]string, v27) + for i := 0; i < v27; i++ { this.Subscriptions[i] = string(randStringCheck(r)) } this.ProxyEntityName = string(randStringCheck(r)) if r.Intn(5) != 0 { - v27 := r.Intn(5) - this.CheckHooks = make([]HookList, v27) - for i := 0; i < v27; i++ { - v28 := NewPopulatedHookList(r, easy) - this.CheckHooks[i] = *v28 + v28 := r.Intn(5) + this.CheckHooks = make([]HookList, v28) + for i := 0; i < v28; i++ { + v29 := NewPopulatedHookList(r, easy) + this.CheckHooks[i] = *v29 } } this.Stdin = bool(bool(r.Intn(2) == 0)) @@ -3069,11 +3143,11 @@ func NewPopulatedCheck(r randyCheck, easy bool) *Check { this.Executed *= -1 } if r.Intn(5) != 0 { - v29 := r.Intn(5) - this.History = make([]CheckHistory, v29) - for i := 0; i < v29; i++ { - v30 := NewPopulatedCheckHistory(r, easy) - this.History[i] = *v30 + v30 := r.Intn(5) + this.History = make([]CheckHistory, v30) + for i := 0; i < v30; i++ { + v31 := NewPopulatedCheckHistory(r, easy) + this.History[i] = *v31 } } this.Issued = int64(r.Int63()) @@ -3096,77 +3170,84 @@ func NewPopulatedCheck(r randyCheck, easy bool) *Check { if r.Intn(2) == 0 { this.OccurrencesWatermark *= -1 } - v31 := r.Intn(10) - this.Silenced = make([]string, v31) - for i := 0; i < v31; i++ { + v32 := r.Intn(10) + this.Silenced = make([]string, v32) + for i := 0; i < v32; i++ { this.Silenced[i] = string(randStringCheck(r)) } if r.Intn(5) != 0 { - v32 := r.Intn(5) - this.Hooks = make([]*Hook, v32) - for i := 0; i < v32; i++ { + v33 := r.Intn(5) + this.Hooks = make([]*Hook, v33) + for i := 0; i < v33; i++ { this.Hooks[i] = NewPopulatedHook(r, easy) } } this.OutputMetricFormat = string(randStringCheck(r)) - v33 := r.Intn(10) - this.OutputMetricHandlers = make([]string, v33) - for i := 0; i < v33; i++ { - this.OutputMetricHandlers[i] = string(randStringCheck(r)) - } v34 := r.Intn(10) - this.EnvVars = make([]string, v34) + this.OutputMetricHandlers = make([]string, v34) for i := 0; i < v34; i++ { + this.OutputMetricHandlers[i] = string(randStringCheck(r)) + } + v35 := r.Intn(10) + this.EnvVars = make([]string, v35) + for i := 0; i < v35; i++ { this.EnvVars[i] = string(randStringCheck(r)) } - v35 := NewPopulatedObjectMeta(r, easy) - this.ObjectMeta = *v35 + v36 := NewPopulatedObjectMeta(r, easy) + this.ObjectMeta = *v36 this.MaxOutputSize = int64(r.Int63()) if r.Intn(2) == 0 { this.MaxOutputSize *= -1 } this.DiscardOutput = bool(bool(r.Intn(2) == 0)) if r.Intn(5) != 0 { - v36 := r.Intn(5) - this.Secrets = make([]*Secret, v36) - for i := 0; i < v36; i++ { + v37 := r.Intn(5) + this.Secrets = make([]*Secret, v37) + for i := 0; i < v37; i++ { this.Secrets[i] = NewPopulatedSecret(r, easy) } } this.IsSilenced = bool(bool(r.Intn(2) == 0)) if r.Intn(5) != 0 { - v37 := r.Intn(5) - this.OutputMetricTags = make([]*MetricTag, v37) - for i := 0; i < v37; i++ { + v38 := r.Intn(5) + this.OutputMetricTags = make([]*MetricTag, v38) + for i := 0; i < v38; i++ { this.OutputMetricTags[i] = NewPopulatedMetricTag(r, easy) } } this.Scheduler = string(randStringCheck(r)) this.ProcessedBy = string(randStringCheck(r)) if r.Intn(5) != 0 { - v38 := r.Intn(5) - this.Pipelines = make([]*ResourceReference, v38) - for i := 0; i < v38; i++ { + v39 := r.Intn(5) + this.Pipelines = make([]*ResourceReference, v39) + for i := 0; i < v39; i++ { this.Pipelines[i] = NewPopulatedResourceReference(r, easy) } } if r.Intn(5) != 0 { - v39 := r.Intn(5) - this.OutputMetricThresholds = make([]*MetricThreshold, v39) - for i := 0; i < v39; i++ { + v40 := r.Intn(5) + this.FallbackPipeline = make([]*ResourceReference, v40) + for i := 0; i < v40; i++ { + this.FallbackPipeline[i] = NewPopulatedResourceReference(r, easy) + } + } + if r.Intn(5) != 0 { + v41 := r.Intn(5) + this.OutputMetricThresholds = make([]*MetricThreshold, v41) + for i := 0; i < v41; i++ { this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) } } if r.Intn(5) != 0 { - v40 := r.Intn(5) - this.Subdues = make([]*TimeWindowRepeated, v40) - for i := 0; i < v40; i++ { + v42 := r.Intn(5) + this.Subdues = make([]*TimeWindowRepeated, v42) + for i := 0; i < v42; i++ { this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) } } - v41 := r.Intn(100) - this.ExtendedAttributes = make([]byte, v41) - for i := 0; i < v41; i++ { + v43 := r.Intn(100) + this.ExtendedAttributes = make([]byte, v43) + for i := 0; i < v43; i++ { this.ExtendedAttributes[i] = byte(r.Intn(256)) } if !easy && r.Intn(10) != 0 { @@ -3208,9 +3289,9 @@ func randUTF8RuneCheck(r randyCheck) rune { return rune(ru + 61) } func randStringCheck(r randyCheck) string { - v42 := r.Intn(100) - tmps := make([]rune, v42) - for i := 0; i < v42; i++ { + v44 := r.Intn(100) + tmps := make([]rune, v44) + for i := 0; i < v44; i++ { tmps[i] = randUTF8RuneCheck(r) } return string(tmps) @@ -3232,11 +3313,11 @@ func randFieldCheck(dAtA []byte, r randyCheck, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateCheck(dAtA, uint64(key)) - v43 := r.Int63() + v45 := r.Int63() if r.Intn(2) == 0 { - v43 *= -1 + v45 *= -1 } - dAtA = encodeVarintPopulateCheck(dAtA, uint64(v43)) + dAtA = encodeVarintPopulateCheck(dAtA, uint64(v45)) case 1: dAtA = encodeVarintPopulateCheck(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -3477,6 +3558,12 @@ func (m *CheckConfig) Size() (n int) { n += 2 + l + sovCheck(uint64(l)) } } + if len(m.FallbackPipeline) > 0 { + for _, e := range m.FallbackPipeline { + l = e.Size() + n += 2 + l + sovCheck(uint64(l)) + } + } if len(m.OutputMetricThresholds) > 0 { for _, e := range m.OutputMetricThresholds { l = e.Size() @@ -3672,6 +3759,12 @@ func (m *Check) Size() (n int) { n += 2 + l + sovCheck(uint64(l)) } } + if len(m.FallbackPipeline) > 0 { + for _, e := range m.FallbackPipeline { + l = e.Size() + n += 2 + l + sovCheck(uint64(l)) + } + } if len(m.OutputMetricThresholds) > 0 { for _, e := range m.OutputMetricThresholds { l = e.Size() @@ -5082,6 +5175,40 @@ func (m *CheckConfig) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 33: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipeline", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCheck + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCheck + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCheck + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FallbackPipeline = append(m.FallbackPipeline, &ResourceReference{}) + if err := m.FallbackPipeline[len(m.FallbackPipeline)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 34: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) } @@ -5115,7 +5242,7 @@ func (m *CheckConfig) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 34: + case 35: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) } @@ -6316,6 +6443,40 @@ func (m *Check) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 47: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipeline", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowCheck + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthCheck + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthCheck + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FallbackPipeline = append(m.FallbackPipeline, &ResourceReference{}) + if err := m.FallbackPipeline[len(m.FallbackPipeline)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 48: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) } @@ -6349,7 +6510,7 @@ func (m *Check) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 48: + case 49: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) } diff --git a/v2/check.proto b/v2/check.proto index 5f5f5a2..35b1987 100644 --- a/v2/check.proto +++ b/v2/check.proto @@ -168,9 +168,13 @@ message CheckConfig { // Pipelines are the pipelines this check will use to process its events. repeated ResourceReference pipelines = 32 [ (gogoproto.jsontag) = "pipelines" ]; - repeated MetricThreshold output_metric_thresholds = 33 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; + //Manisha added fallback pieplines detials in order of execution + repeated ResourceReference fallback_pipeline = 33 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; - repeated TimeWindowRepeated subdues = 34 [ (gogoproto.jsontag) = "subdues,omitempty" ]; + + repeated MetricThreshold output_metric_thresholds = 34 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; + + repeated TimeWindowRepeated subdues = 35 [ (gogoproto.jsontag) = "subdues,omitempty" ]; } // A Check is a check specification and optionally the results of the check's @@ -328,11 +332,14 @@ message Check { // Pipelines are the pipelines this check will use to process its events. repeated ResourceReference pipelines = 46 [ (gogoproto.jsontag) = "pipelines" ]; + //Manisha added fallback pieplines detials in order of execution + repeated ResourceReference fallback_pipeline = 47 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; + // MetricThresholds are a list of thresholds to apply to metrics in order to determine // the check status. - repeated MetricThreshold output_metric_thresholds = 47 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; + repeated MetricThreshold output_metric_thresholds = 48 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; - repeated TimeWindowRepeated subdues = 48 [ (gogoproto.jsontag) = "subdues,omitempty" ]; + repeated TimeWindowRepeated subdues = 49 [ (gogoproto.jsontag) = "subdues,omitempty" ]; // ExtendedAttributes store serialized arbitrary JSON-encoded data bytes ExtendedAttributes = 99 [ (gogoproto.jsontag) = "-" ]; From e995dd3db043116db4ce94d3dae8861043a1444b Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 16 Jul 2024 12:16:50 +0530 Subject: [PATCH 03/17] fallback-pipeline in event.yaml Signed-off-by: manisha kumari --- v2/event.go | 20 +++++++ v2/event.pb.go | 153 +++++++++++++++++++++++++++++++++++++------------ v2/event.proto | 2 + 3 files changed, 138 insertions(+), 37 deletions(-) diff --git a/v2/event.go b/v2/event.go index 29d8afe..b355773 100644 --- a/v2/event.go +++ b/v2/event.go @@ -76,6 +76,13 @@ func (e *Event) Validate() error { } } + //Manisha added + for _, fallpipeline := range e.FallbackPipeline { + if err := e.validateFallbackPipelineReference(fallpipeline); err != nil { + return errors.New("Fallback-pipeline reference is invalid: " + err.Error()) + } + } + if e.Name != "" { return errors.New("events cannot be named") } @@ -205,6 +212,19 @@ func (e *Event) validatePipelineReference(ref *ResourceReference) error { return fmt.Errorf("resource type not capable of acting as a pipeline: %s.%s", ref.APIVersion, ref.Type) } +// validateFallbackPipelineReference validates that a resource reference is capable of +// acting as a pipeline. +func (e *Event) validateFallbackPipelineReference(ref *ResourceReference) error { + switch ref.APIVersion { + case "core/v2": + switch ref.Type { + case "FallbackPipeline": + return nil + } + } + return fmt.Errorf("resource type not capable of acting as a fallbackpipeline: %s.%s", ref.APIVersion, ref.Type) +} + // FixtureEvent returns a testing fixture for an Event object. func FixtureEvent(entityName, checkID string) *Event { id := uuid.New() diff --git a/v2/event.pb.go b/v2/event.pb.go index 4b1da67..e4f4fff 100644 --- a/v2/event.pb.go +++ b/v2/event.pb.go @@ -47,7 +47,9 @@ type Event struct { // Pipelines are the pipelines that should be used to process an event. // APIVersion should default to "core/v2" and Type should default to // "Pipeline". - Pipelines []*ResourceReference `protobuf:"bytes,8,rep,name=pipelines,proto3" json:"pipelines"` + Pipelines []*ResourceReference `protobuf:"bytes,8,rep,name=pipelines,proto3" json:"pipelines"` + //Manisha added + FallbackPipeline []*ResourceReference `protobuf:"bytes,9,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -95,35 +97,37 @@ func init() { } var fileDescriptor_f911c654eafd4c9b = []byte{ - // 442 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x4f, 0x6e, 0xd3, 0x40, - 0x14, 0x87, 0x33, 0x4e, 0x93, 0xa6, 0xd3, 0x76, 0x33, 0x2a, 0xd5, 0x50, 0x21, 0x8f, 0xc5, 0x3f, - 0x79, 0x35, 0xa6, 0x0e, 0x62, 0xc1, 0x0a, 0x99, 0x76, 0x51, 0xa1, 0x08, 0x69, 0xd8, 0xb1, 0x41, - 0xce, 0xf4,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x8f, 0xca, 0x46, - 0x5f, 0x7f, 0xd9, 0xbd, 0xb7, 0x56, 0xe1, 0x4f, 0x87, 0xfa, 0xae, 0xe3, 0x3f, 0x01, 0x00, 0x00, - 0xff, 0xff, 0xec, 0x33, 0x11, 0xb5, 0x11, 0x03, 0x00, 0x00, + // 473 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcb, 0x6e, 0xd3, 0x4c, + 0x18, 0x86, 0x33, 0xce, 0xa1, 0xc9, 0xb4, 0x95, 0xfe, 0x7f, 0xd4, 0x56, 0xa6, 0x42, 0x1e, 0x8b, + 0x93, 0xbc, 0xb2, 0xa9, 0x83, 0x58, 0xb0, 0x42, 0xa6, 0x5d, 0x54, 0x28, 0x02, 0x0d, 0x3b, 0x36, + 0x95, 0x3d, 0xf9, 0x92, 0x9a, 0x26, 0x76, 0xb0, 0xc7, 0x96, 0xb8, 0x03, 0xd6, 0xac, 0x58, 0x76, + 0xd9, 0x4b, 0xe0, 0x12, 0xb2, 0xec, 0x15, 0x58, 0x60, 0x76, 0xb9, 0x02, 0x96, 0xc8, 0xe3, 0x49, + 0x02, 0x41, 0x41, 0xec, 0x46, 0xef, 0xfb, 0x3c, 0xe3, 0x99, 0x6f, 0x8c, 0x1f, 0x8c, 0x43, 0x71, + 0x99, 0x05, 0x36, 0x8f, 0xa7, 0x4e, 0x0a, 0x51, 0x9a, 0x39, 0x3c, 0x4e, 0xc0, 0xc9, 0x5d, 0x07, + 0x72, 0x88, 0x84, 0x3d, 0x4b, 0x62, 0x11, 0x93, 0x7d, 0x59, 0xd9, 0x55, 0x65, 0xe7, 0xee, 0xf1, + 0x93, 0x5f, 0xa4, 0x71, 0x3c, 0x8e, 0x1d, 0x49, 0x05, 0xd9, 0xe8, 0x79, 0x7e, 0x62, 0xf7, 0x6d, + 0x57, 0x86, 0x32, 0x93, 0xab, 0x7a, 0x93, 0xe3, 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, 0x76, 0x7e, + 0x4a, 0x2c, 0xdc, 0x7d, 0x03, 0xef, 0xb3, 0x6a, 0x7a, 0xfa, 0x4e, 0x35, 0x20, 0x6f, 0xaf, 0xda, + 0x21, 0x55, 0x19, 0x5b, 0xb5, 0x64, 0x80, 0x7b, 0xb3, 0x70, 0x06, 0x93, 0x30, 0x82, 0x54, 0xef, + 0x9a, 0x4d, 0x6b, 0xd7, 0x35, 0x37, 0xce, 0xc3, 0xd4, 0x8b, 0xb0, 0xe5, 0x83, 0x78, 0xfb, 0x8b, + 0x82, 0xae, 0x35, 0xb6, 0x5e, 0x92, 0x21, 0xfe, 0x7f, 0xe4, 0x4f, 0x26, 0x81, 0xcf, 0xaf, 0x2e, + 0x96, 0xa9, 0xde, 0xfb, 0xc7, 0x6d, 0x0f, 0x17, 0x05, 0xfd, 0x53, 0x67, 0xff, 0x2d, 0xa3, 0xd7, + 0x2a, 0x79, 0xd6, 0xfd, 0x78, 0x4d, 0x1b, 0x37, 0xd7, 0x14, 0x79, 0xe6, 0x8f, 0x6f, 0x06, 0xba, + 0x29, 0x0d, 0xf4, 0xa5, 0x34, 0xd0, 0xbc, 0x34, 0xd0, 0x6d, 0x69, 0xa0, 0xaf, 0xa5, 0x81, 0x3e, + 0x7f, 0x37, 0x1a, 0x6f, 0xb5, 0xdc, 0x0d, 0x3a, 0xf2, 0xef, 0xe9, 0xff, 0x0c, 0x00, 0x00, 0xff, + 0xff, 0xc9, 0x10, 0x77, 0xb5, 0x77, 0x03, 0x00, 0x00, } func (this *Event) Equal(that interface{}) bool { @@ -174,6 +178,14 @@ func (this *Event) Equal(that interface{}) bool { return false } } + if len(this.FallbackPipeline) != len(that1.FallbackPipeline) { + return false + } + for i := range this.FallbackPipeline { + if !this.FallbackPipeline[i].Equal(that1.FallbackPipeline[i]) { + return false + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -190,6 +202,7 @@ type EventFace interface { GetID() []byte GetSequence() int64 GetPipelines() []*ResourceReference + GetFallbackPipeline() []*ResourceReference } func (this *Event) Proto() github_com_golang_protobuf_proto.Message { @@ -232,6 +245,10 @@ func (this *Event) GetPipelines() []*ResourceReference { return this.Pipelines } +func (this *Event) GetFallbackPipeline() []*ResourceReference { + return this.FallbackPipeline +} + func NewEventFromFace(that EventFace) *Event { this := &Event{} this.Timestamp = that.GetTimestamp() @@ -242,6 +259,7 @@ func NewEventFromFace(that EventFace) *Event { this.ID = that.GetID() this.Sequence = that.GetSequence() this.Pipelines = that.GetPipelines() + this.FallbackPipeline = that.GetFallbackPipeline() return this } @@ -269,6 +287,20 @@ func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if len(m.FallbackPipeline) > 0 { + for iNdEx := len(m.FallbackPipeline) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FallbackPipeline[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintEvent(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } if len(m.Pipelines) > 0 { for iNdEx := len(m.Pipelines) - 1; iNdEx >= 0; iNdEx-- { { @@ -393,8 +425,15 @@ func NewPopulatedEvent(r randyEvent, easy bool) *Event { this.Pipelines[i] = NewPopulatedResourceReference(r, easy) } } + if r.Intn(5) != 0 { + v4 := r.Intn(5) + this.FallbackPipeline = make([]*ResourceReference, v4) + for i := 0; i < v4; i++ { + this.FallbackPipeline[i] = NewPopulatedResourceReference(r, easy) + } + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEvent(r, 9) + this.XXX_unrecognized = randUnrecognizedEvent(r, 10) } return this } @@ -418,9 +457,9 @@ func randUTF8RuneEvent(r randyEvent) rune { return rune(ru + 61) } func randStringEvent(r randyEvent) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { + v5 := r.Intn(100) + tmps := make([]rune, v5) + for i := 0; i < v5; i++ { tmps[i] = randUTF8RuneEvent(r) } return string(tmps) @@ -442,11 +481,11 @@ func randFieldEvent(dAtA []byte, r randyEvent, fieldNumber int, wire int) []byte switch wire { case 0: dAtA = encodeVarintPopulateEvent(dAtA, uint64(key)) - v5 := r.Int63() + v6 := r.Int63() if r.Intn(2) == 0 { - v5 *= -1 + v6 *= -1 } - dAtA = encodeVarintPopulateEvent(dAtA, uint64(v5)) + dAtA = encodeVarintPopulateEvent(dAtA, uint64(v6)) case 1: dAtA = encodeVarintPopulateEvent(dAtA, uint64(key)) dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) @@ -507,6 +546,12 @@ func (m *Event) Size() (n int) { n += 1 + l + sovEvent(uint64(l)) } } + if len(m.FallbackPipeline) > 0 { + for _, e := range m.FallbackPipeline { + l = e.Size() + n += 1 + l + sovEvent(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -795,6 +840,40 @@ func (m *Event) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipeline", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthEvent + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthEvent + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FallbackPipeline = append(m.FallbackPipeline, &ResourceReference{}) + if err := m.FallbackPipeline[len(m.FallbackPipeline)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvent(dAtA[iNdEx:]) diff --git a/v2/event.proto b/v2/event.proto index 9ae7d67..4ec231d 100644 --- a/v2/event.proto +++ b/v2/event.proto @@ -50,4 +50,6 @@ message Event { // APIVersion should default to "core/v2" and Type should default to // "Pipeline". repeated ResourceReference pipelines = 8 [ (gogoproto.jsontag) = "pipelines" ]; + //Manisha added + repeated ResourceReference fallback_pipeline = 9 [ (gogoproto.jsontag) = "fallback_pipeline" ]; } From 5cd4bb8ae4db9eeacb7bc3738f4d896e79f46da5 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 16 Jul 2024 14:56:19 +0530 Subject: [PATCH 04/17] fallback_code added Signed-off-by: manisha kumari --- v2/event.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/event.go b/v2/event.go index b355773..493ee93 100644 --- a/v2/event.go +++ b/v2/event.go @@ -218,7 +218,7 @@ func (e *Event) validateFallbackPipelineReference(ref *ResourceReference) error switch ref.APIVersion { case "core/v2": switch ref.Type { - case "FallbackPipeline": + case "LegacyPipeline": return nil } } From 0cc3d53b2a08c5e2e80d1b69aa488984abaa844c Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Wed, 17 Jul 2024 18:04:32 +0530 Subject: [PATCH 05/17] fixture fallback pipeline Signed-off-by: manisha kumari --- v2/fallback_pipeline.go | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/v2/fallback_pipeline.go b/v2/fallback_pipeline.go index 2aaf3b5..9706c1c 100644 --- a/v2/fallback_pipeline.go +++ b/v2/fallback_pipeline.go @@ -81,20 +81,20 @@ func (f *FallbackPipeline) Fields() map[string]string { return FallbackPipelineFields(f) } -//// FixturePipeline returns a testing fixture for a Pipeline object. -//func FixtureFallbackPipeline(name, namespace string) *Pipeline { -// return &Pipeline{ -// ObjectMeta: NewObjectMeta(name, namespace), -// Workflows: []*PipelineWorkflow{}, -// } -//} -// -//// FixturePipelineReference returns a testing fixture for a ResourceReference -//// object referencing a corev2.Pipeline. -//func FixtureFallbackPipelineReference(name string) *ResourceReference { -// return &ResourceReference{ -// APIVersion: "core/v2", -// Type: "Pipeline", -// Name: name, -// } -//} +// // FixturePipeline returns a testing fixture for a Pipeline object. +func FixtureFallbackPipeline(name, namespace string) *FallbackPipeline { + return &FallbackPipeline{ + ObjectMeta: NewObjectMeta(name, namespace), + Pipelist: []*ResourceReference{}, + } +} + +// // FixturePipelineReference returns a testing fixture for a ResourceReference +// // object referencing a corev2.Pipeline. +func FixtureFallbackPipelineReference(name string) *ResourceReference { + return &ResourceReference{ + APIVersion: "core/v2", + Type: "FallbackPipeline", + Name: name, + } +} From d3d2d32e2076ab8623d5be5ed7de6d3a74c20df0 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 18 Jul 2024 16:52:50 +0530 Subject: [PATCH 06/17] golang version update in v2 Signed-off-by: manisha kumari --- v2/go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/go.mod b/v2/go.mod index 4597fed..7967cd0 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/core/v2 -go 1.18 +go 1.19 require ( github.com/echlebek/crock v1.0.1 From 4f5a02dd619931fbe182f404fd20047ca033b509 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 18 Jul 2024 16:57:07 +0530 Subject: [PATCH 07/17] golang version update in v2 Signed-off-by: manisha kumari --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d55c0e..6e2ca8a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: working_directory: ~/core/<< parameters.module>> executor: name: go/default - tag: '1.18' + tag: '1.19' steps: - checkout: path: ~/core From 5b8ee99f5d7ce667dd0a3f7a7e288d2a0f0adc30 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 23 Jul 2024 19:15:27 +0530 Subject: [PATCH 08/17] removal of unnecessary comments Signed-off-by: manisha kumari --- v2/check.go | 1 - v2/check.pb.go | 4 ++-- v2/check.proto | 4 ++-- v2/event.go | 1 - v2/event.pb.go | 2 +- v2/event.proto | 2 +- v2/fallback_pipeline.go | 7 ------- v2/pipeline_workflow.go | 43 ----------------------------------------- v2/typemap_test.go | 1 - 9 files changed, 6 insertions(+), 59 deletions(-) diff --git a/v2/check.go b/v2/check.go index a28ea90..17d10f5 100644 --- a/v2/check.go +++ b/v2/check.go @@ -269,7 +269,6 @@ func (c *Check) MarshalJSON() ([]byte, error) { if c.Pipelines == nil { c.Pipelines = []*ResourceReference{} } - //Manisha if c.FallbackPipeline == nil { c.FallbackPipeline = []*ResourceReference{} } diff --git a/v2/check.pb.go b/v2/check.pb.go index 663edfa..2763469 100644 --- a/v2/check.pb.go +++ b/v2/check.pb.go @@ -314,7 +314,7 @@ type CheckConfig struct { Scheduler string `protobuf:"bytes,31,opt,name=scheduler,proto3" json:"-" yaml: "-"` // Pipelines are the pipelines this check will use to process its events. Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` - //Manisha added fallback pieplines detials in order of execution + //added fallback pieplines detials in order of execution FallbackPipeline []*ResourceReference `protobuf:"bytes,33,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline" yaml: "fallback_pipeline,omitempty"` OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,34,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` Subdues []*TimeWindowRepeated `protobuf:"bytes,35,rep,name=subdues,proto3" json:"subdues,omitempty"` @@ -466,7 +466,7 @@ type Check struct { ProcessedBy string `protobuf:"bytes,45,opt,name=ProcessedBy,proto3" json:"processed_by,omitempty" yaml: "processed_by"` // Pipelines are the pipelines this check will use to process its events. Pipelines []*ResourceReference `protobuf:"bytes,46,rep,name=pipelines,proto3" json:"pipelines"` - //Manisha added fallback pieplines detials in order of execution + //fallback pieplines detials in order of execution FallbackPipeline []*ResourceReference `protobuf:"bytes,47,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline" yaml: "fallback_pipeline,omitempty"` // MetricThresholds are a list of thresholds to apply to metrics in order to determine // the check status. diff --git a/v2/check.proto b/v2/check.proto index 35b1987..5db7679 100644 --- a/v2/check.proto +++ b/v2/check.proto @@ -168,7 +168,7 @@ message CheckConfig { // Pipelines are the pipelines this check will use to process its events. repeated ResourceReference pipelines = 32 [ (gogoproto.jsontag) = "pipelines" ]; - //Manisha added fallback pieplines detials in order of execution + //added fallback pieplines detials in order of execution repeated ResourceReference fallback_pipeline = 33 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; @@ -332,7 +332,7 @@ message Check { // Pipelines are the pipelines this check will use to process its events. repeated ResourceReference pipelines = 46 [ (gogoproto.jsontag) = "pipelines" ]; - //Manisha added fallback pieplines detials in order of execution + //fallback pieplines detials in order of execution repeated ResourceReference fallback_pipeline = 47 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; // MetricThresholds are a list of thresholds to apply to metrics in order to determine diff --git a/v2/event.go b/v2/event.go index 493ee93..1c5227b 100644 --- a/v2/event.go +++ b/v2/event.go @@ -76,7 +76,6 @@ func (e *Event) Validate() error { } } - //Manisha added for _, fallpipeline := range e.FallbackPipeline { if err := e.validateFallbackPipelineReference(fallpipeline); err != nil { return errors.New("Fallback-pipeline reference is invalid: " + err.Error()) diff --git a/v2/event.pb.go b/v2/event.pb.go index e4f4fff..f8ff1e8 100644 --- a/v2/event.pb.go +++ b/v2/event.pb.go @@ -48,7 +48,7 @@ type Event struct { // APIVersion should default to "core/v2" and Type should default to // "Pipeline". Pipelines []*ResourceReference `protobuf:"bytes,8,rep,name=pipelines,proto3" json:"pipelines"` - //Manisha added + //fallback pipeline FallbackPipeline []*ResourceReference `protobuf:"bytes,9,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/v2/event.proto b/v2/event.proto index 4ec231d..2b64fef 100644 --- a/v2/event.proto +++ b/v2/event.proto @@ -50,6 +50,6 @@ message Event { // APIVersion should default to "core/v2" and Type should default to // "Pipeline". repeated ResourceReference pipelines = 8 [ (gogoproto.jsontag) = "pipelines" ]; - //Manisha added + //fallback pipeline repeated ResourceReference fallback_pipeline = 9 [ (gogoproto.jsontag) = "fallback_pipeline" ]; } diff --git a/v2/fallback_pipeline.go b/v2/fallback_pipeline.go index 9706c1c..18223aa 100644 --- a/v2/fallback_pipeline.go +++ b/v2/fallback_pipeline.go @@ -55,13 +55,6 @@ func (f *FallbackPipeline) Validate() error { if f.ObjectMeta.Namespace == "" { return errors.New("namespace must be set") } - //Manisha - //for _, workflow := range f.Fallbackflows { - // if err := workflow.Validate(); err != nil { - // return fmt.Errorf("workflow %w", err) - // } - //} - return nil } diff --git a/v2/pipeline_workflow.go b/v2/pipeline_workflow.go index 6aa1597..a006fb7 100644 --- a/v2/pipeline_workflow.go +++ b/v2/pipeline_workflow.go @@ -130,49 +130,6 @@ func (w *PipelineWorkflow) Validate() error { return nil } -//Manisha fallback validate to be written -//FallbackPipelineListflow -// -//func (w *FallbackPipelineListflow) Validate() error { -// if err := ValidateName(w.Name); err != nil { -// return errors.New("name " + err.Error()) -// } -// -// if w.Filters != nil { -// for _, filter := range w.Filters { -// if err := filter.Validate(); err != nil { -// return fmt.Errorf("filter %w", err) -// } -// if err := w.validateEventFilterReference(filter); err != nil { -// return fmt.Errorf("filter %w", err) -// } -// } -// } -// -// if w.Mutator != nil { -// if err := w.Mutator.Validate(); err != nil { -// return fmt.Errorf("mutator %w", err) -// } -// if err := w.validateMutatorReference(w.Mutator); err != nil { -// return fmt.Errorf("mutator %w", err) -// } -// } -// -// if w.Handler == nil { -// return errors.New("handler must be set") -// } -// -// if err := w.Handler.Validate(); err != nil { -// return fmt.Errorf("handler %w", err) -// } -// -// if err := w.validateHandlerReference(w.Handler); err != nil { -// return fmt.Errorf("handler %w", err) -// } -// -// return nil -//} - func (w *PipelineWorkflow) validateEventFilterReference(ref *ResourceReference) error { for _, allowed := range validPipelineWorkflowFilterReferences.references { if allowed.APIVersion == ref.APIVersion && allowed.Type == ref.Type { diff --git a/v2/typemap_test.go b/v2/typemap_test.go index 3da412e..c90923c 100644 --- a/v2/typemap_test.go +++ b/v2/typemap_test.go @@ -344,7 +344,6 @@ func TestResolveExtension(t *testing.T) { } } -// MANISHA ADDED AUTOMATICALLY func TestResolveFallbackPipeline(t *testing.T) { var value interface{} = new(FallbackPipeline) if _, ok := value.(Resource); ok { From 8b73142b300c8ac1bc35f14e81044bae45e568a9 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 17:28:33 +0530 Subject: [PATCH 09/17] addressed review points Signed-off-by: manisha kumari --- v2/check.pb.go | 432 +++++++++++++++++++++++----------------------- v2/check.proto | 20 ++- v2/pipeline.pb.go | 84 +++++---- v2/pipeline.proto | 8 +- v2/secret.proto | 1 - v2/types_gen.go | 11 +- 6 files changed, 274 insertions(+), 282 deletions(-) diff --git a/v2/check.pb.go b/v2/check.pb.go index 2763469..507bb29 100644 --- a/v2/check.pb.go +++ b/v2/check.pb.go @@ -313,14 +313,14 @@ type CheckConfig struct { // setting by the user will be overridden. Scheduler string `protobuf:"bytes,31,opt,name=scheduler,proto3" json:"-" yaml: "-"` // Pipelines are the pipelines this check will use to process its events. - Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` + Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` + OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,33,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` + Subdues []*TimeWindowRepeated `protobuf:"bytes,34,rep,name=subdues,proto3" json:"subdues,omitempty"` //added fallback pieplines detials in order of execution - FallbackPipeline []*ResourceReference `protobuf:"bytes,33,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline" yaml: "fallback_pipeline,omitempty"` - OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,34,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` - Subdues []*TimeWindowRepeated `protobuf:"bytes,35,rep,name=subdues,proto3" json:"subdues,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + FallbackPipelines []*ResourceReference `protobuf:"bytes,35,rep,name=fallback_pipelines,json=fallbackPipelines,proto3" json:"fallback_pipelines" yaml: "fallback_pipelines,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *CheckConfig) Reset() { *m = CheckConfig{} } @@ -466,12 +466,12 @@ type Check struct { ProcessedBy string `protobuf:"bytes,45,opt,name=ProcessedBy,proto3" json:"processed_by,omitempty" yaml: "processed_by"` // Pipelines are the pipelines this check will use to process its events. Pipelines []*ResourceReference `protobuf:"bytes,46,rep,name=pipelines,proto3" json:"pipelines"` - //fallback pieplines detials in order of execution - FallbackPipeline []*ResourceReference `protobuf:"bytes,47,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline" yaml: "fallback_pipeline,omitempty"` // MetricThresholds are a list of thresholds to apply to metrics in order to determine // the check status. - OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,48,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` - Subdues []*TimeWindowRepeated `protobuf:"bytes,49,rep,name=subdues,proto3" json:"subdues,omitempty"` + OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,47,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` + Subdues []*TimeWindowRepeated `protobuf:"bytes,48,rep,name=subdues,proto3" json:"subdues,omitempty"` + //fallback pieplines details in order of execution + FallbackPipelines []*ResourceReference `protobuf:"bytes,49,rep,name=fallback_pipelines,json=fallbackPipelines,proto3" json:"fallback_pipelines" yaml: "fallback_pipelines,omitempty"` // ExtendedAttributes store serialized arbitrary JSON-encoded data ExtendedAttributes []byte `protobuf:"bytes,99,opt,name=ExtendedAttributes,proto3" json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -597,123 +597,123 @@ func init() { } var fileDescriptor_d70eac2f90fbef24 = []byte{ - // 1846 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0xdb, 0xc8, - 0x15, 0x0f, 0xed, 0x58, 0xb6, 0x46, 0x91, 0x3f, 0x26, 0x76, 0x32, 0xf1, 0x26, 0xa2, 0xa2, 0x7c, - 0xac, 0x9b, 0x6c, 0xe4, 0xc4, 0xdb, 0x45, 0xb7, 0x41, 0x0e, 0x0d, 0xdd, 0xa4, 0xde, 0x76, 0xb3, - 0x09, 0x26, 0x6e, 0x03, 0x14, 0x28, 0x88, 0x11, 0x39, 0x96, 0x58, 0x53, 0xa4, 0xca, 0x19, 0xca, - 0xd6, 0x5e, 0x7a, 0x2d, 0x50, 0xa0, 0xe8, 0xb1, 0xc7, 0x3d, 0x6e, 0x2f, 0xed, 0xb5, 0x7f, 0xc2, - 0x1e, 0xf7, 0x2f, 0x20, 0x5a, 0xf7, 0x50, 0x40, 0xc7, 0x9c, 0x7a, 0x2c, 0xe6, 0x71, 0x48, 0x51, - 0xb2, 0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, 0x32, 0xc3, 0x68, 0xde, 0xc3, 0x3f, 0x46, 0xd8, 0x0f, 0x8f, 0x26, 0x57, 0x2c, - 0x81, 0xce, 0x85, 0x61, 0x62, 0x4e, 0x91, 0xd2, 0x55, 0x3f, 0x3c, 0x1a, 0x5f, 0xef, 0x06, 0x5a, - 0xec, 0xc5, 0x2d, 0xdf, 0x13, 0x1d, 0x52, 0x06, 0x53, 0x57, 0x86, 0x89, 0x99, 0x41, 0x34, 0xeb, - 0x28, 0x73, 0x47, 0x71, 0x00, 0x97, 0x5e, 0xc7, 0x0a, 0x02, 0x7b, 0x80, 0xb9, 0xc7, 0x25, 0xb4, - 0xaa, 0xc7, 0x3a, 0xbc, 0x7f, 0x80, 0xaa, 0x22, 0x6e, 0x09, 0x27, 0xf2, 0x7a, 0xd2, 0x0b, 0x03, - 0x41, 0x2a, 0xa0, 0xb9, 0x36, 0x4c, 0xcc, 0x71, 0x01, 0x1d, 0x1f, 0xe2, 0x4f, 0x10, 0x7e, 0x74, - 0x2c, 0x79, 0xe0, 0x72, 0x77, 0x14, 0x19, 0xe4, 0x5c, 0xdd, 0xd8, 0x3a, 0x67, 0x2d, 0x0c, 0x13, - 0xd3, 0xb8, 0x43, 0xa7, 0x10, 0xf0, 0x3e, 0x5a, 0xeb, 0xa9, 0x78, 0xb4, 0x75, 0x9c, 0x05, 0xac, - 0xcb, 0x49, 0x55, 0x39, 0xd6, 0xda, 0x3a, 0x49, 0xcc, 0x15, 0x08, 0xd6, 0x47, 0x20, 0xfb, 0x82, - 0x75, 0xb9, 0x8a, 0xc8, 0x53, 0x7c, 0xba, 0xd2, 0x1b, 0x67, 0xe1, 0x27, 0xa8, 0x02, 0x09, 0xc8, - 0x4e, 0x1f, 0x99, 0x65, 0xb8, 0x29, 0x17, 0xa7, 0x3c, 0x32, 0xea, 0x4a, 0x59, 0xe7, 0xf5, 0x65, - 0x29, 0xea, 0x50, 0x04, 0x83, 0x3d, 0x78, 0x76, 0x54, 0x7c, 0x4b, 0xd7, 0x0b, 0xc8, 0x4a, 0x21, - 0xbe, 0x15, 0x40, 0xd3, 0x06, 0x3f, 0x44, 0x25, 0x11, 0xb7, 0xdc, 0x98, 0x93, 0x55, 0xb8, 0xd6, - 0x57, 0x26, 0x96, 0xda, 0xf7, 0xba, 0xfc, 0x05, 0x3c, 0xbf, 0x2f, 0x3a, 0x3c, 0x48, 0x9f, 0xad, - 0x54, 0x81, 0xea, 0x16, 0x63, 0x74, 0xd6, 0x89, 0xc2, 0x80, 0xac, 0x41, 0x50, 0x43, 0x1f, 0x5f, - 0x42, 0xf3, 0x52, 0xfa, 0x04, 0xc3, 0x5b, 0xb7, 0x38, 0x4c, 0x4c, 0x35, 0xa4, 0xea, 0x47, 0x45, - 0x82, 0xf2, 0x5a, 0x18, 0x4b, 0x72, 0x1e, 0x82, 0x08, 0x22, 0x41, 0x43, 0x34, 0xeb, 0xe0, 0x5d, - 0xb4, 0x9c, 0x9a, 0x2b, 0xd2, 0xf7, 0x9d, 0xac, 0xc3, 0x06, 0x2f, 0x4f, 0x6c, 0x70, 0xec, 0x4d, - 0xa0, 0xd5, 0xde, 0xd8, 0x13, 0x71, 0x17, 0x55, 0xa2, 0x30, 0x0e, 0x5c, 0x3b, 0x0a, 0x5b, 0x5e, - 0x40, 0x36, 0xc0, 0x08, 0xf0, 0x48, 0x16, 0x60, 0x8a, 0x60, 0x40, 0x55, 0x1f, 0xff, 0x14, 0xad, - 0x87, 0xb1, 0xec, 0xc5, 0xd2, 0xd6, 0xc9, 0xf2, 0x20, 0x8c, 0xba, 0x4c, 0x92, 0x0b, 0xe0, 0x58, - 0x32, 0x4c, 0xcc, 0xa9, 0x72, 0x8a, 0x53, 0xf4, 0x09, 0x80, 0x8f, 0x01, 0xc3, 0xcf, 0xd0, 0x85, - 0x71, 0x6e, 0x7e, 0xc9, 0x2f, 0x42, 0x68, 0x6e, 0x0e, 0x13, 0x73, 0x06, 0x83, 0xae, 0x17, 0xe7, - 0xdb, 0xcb, 0xae,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xe9, 0x70, 0x37, 0xf6, 0x79, 0x44, 0x4c, - 0x08, 0x19, 0x0c, 0x2f, 0xc8, 0xcb, 0xc4, 0x2c, 0xeb, 0x39, 0xef, 0x34, 0xe8, 0x88, 0x84, 0x9f, - 0xa0, 0x72, 0xcf, 0xeb, 0x71, 0xdf, 0x0b, 0xb8, 0x20, 0x75, 0xd8, 0x7a, 0x7d, 0x62, 0xeb, 0x54, - 0x17, 0x57, 0x34, 0xab, 0xad, 0xac, 0xea, 0x30, 0x31, 0x47, 0x6a, 0x74, 0xd4, 0xc5, 0xbf, 0x37, - 0xd0, 0xda, 0x01, 0xf3, 0xfd, 0x16, 0x73, 0x0e, 0xed, 0x0c, 0x26, 0x57, 0xdf, 0x70, 0xde, 0x07, - 0xea, 0x91, 0x3a, 0xa5, 0xfe, 0x32, 0x31, 0xaf, 0xe9, 0xbd, 0x9f, 0x92, 0x8d, 0x99, 0x23, 0x93, - 0x3e, 0xd3, 0x42, 0xfc, 0x17, 0x03, 0x91, 0x09, 0x13, 0x66, 0x09, 0x41, 0x90, 0x06, 0x6c, 0xaa, - 0x36, 0xdd, 0x4f, 0x19, 0xcd, 0xda, 0x1f, 0x26, 0x66, 0x63, 0xd6, 0x1c, 0x63, 0x3e, 0xbb, 0x35, - 0xdd, 0x67, 0x53, 0xc8, 0x0d, 0x7a, 0x61, 0xcc, 0x73, 0x39, 0x05, 0x53, 0xb4, 0x98, 0x3e, 0x6a, - 0x82, 0x5c, 0x83, 0xed, 0x5d, 0x9d, 0xf9, 0x1c, 0x52, 0xde, 0xe3, 0x4c, 0x72, 0x37, 0xad, 0x35, - 0xb4, 0x56, 0xe1, 0xd2, 0x64, 0x13, 0xdd, 0x5f, 0xfa, 0xdd, 0x57, 0xe6, 0x99, 0xaf, 0xbf, 0x32, - 0x8d, 0xc6, 0xbf, 0x36, 0xd0, 0x02, 0x14, 0x04, 0xef, 0x4b, 0x81, 0x77, 0xb4, 0x14, 0x78, 0x9f, - 0xd3, 0xff, 0x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x4b, - 0x25, 0xeb, 0x8c, 0x2f, 0x22, 0xce, 0x6b, 0xbe, 0x88, 0x14, 0x2a, 0xdd, 0xdf, 0xea, 0x4f, 0xb4, - 0x7b, 0xa3, 0x9c, 0xa7, 0xb3, 0x92, 0x31, 0x33, 0x2b, 0x15, 0x33, 0xf1, 0xdc, 0x2b, 0x33, 0xf1, - 0x55, 0xb4, 0xa4, 0x8a, 0xcc, 0x9e, 0x17, 0xb4, 0xe1, 0x6b, 0xdc, 0x52, 0xb6, 0xa9, 0x1c, 0xb6, - 0xea, 0xff, 0xfe, 0x47, 0xcd, 0xf8, 0xfa, 0xa4, 0x66, 0xfc, 0xed, 0xa4, 0x66, 0x7c, 0x73, 0x52, - 0x33, 0xbe, 0x3d, 0xa9, 0x19, 0x7f, 0x3f, 0xa9, 0x19, 0x7f, 0xfa, 0x67, 0xed, 0xcc, 0x2f, 0xe7, - 0xfa, 0x3b, 0xad, 0x12, 0x7c, 0x4d, 0xfe, 0xf8, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0x38, - 0x25, 0xe7, 0x09, 0x18, 0x00, 0x00, + // 1842 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, + 0x15, 0xf7, 0x4a, 0x11, 0x25, 0x0e, 0x4d, 0x7d, 0x8c, 0x25, 0x7b, 0xac, 0xd8, 0x5c, 0x9a, 0xfe, + 0x88, 0x6a, 0xc7, 0x94, 0xcd, 0x34, 0x68, 0x6a, 0x04, 0x45, 0xbd, 0xaa, 0x5d, 0xa5, 0x8d, 0x63, + 0x63, 0xac, 0xd6, 0x40, 0x81, 0x62, 0x31, 0xdc, 0x1d, 0x91, 0x5b, 0x2d, 0x77, 0xd9, 0x9d, 0x59, + 0x4a, 0xcc, 0xa5, 0xd7, 0xde, 0x5a, 0xf4, 0xd4, 0x63, 0x8e, 0x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, 0x6d, 0xea, 0x7d, 0x15, 0x09, 0x0d, 0x5a, 0x9c, 0x66, 0xb2, 0x6c, 0x6d, 0xbe, 0xd9, 0xb2, + 0x75, 0xf7, 0xdb, 0x5d, 0xb6, 0xde, 0x7b, 0xc3, 0x65, 0xeb, 0xfd, 0x6f, 0xac, 0x6c, 0x9d, 0xf3, + 0x65, 0xc4, 0x79, 0xc5, 0x97, 0x91, 0x42, 0xb5, 0xfb, 0x3b, 0xfd, 0xa9, 0x76, 0x7f, 0x9c, 0xf7, + 0x74, 0x66, 0x32, 0xe6, 0x66, 0xa6, 0x62, 0x36, 0x5e, 0x78, 0x69, 0x36, 0xbe, 0x86, 0x56, 0x54, + 0xa1, 0xd9, 0xf7, 0x82, 0x0e, 0x7c, 0x95, 0x5b, 0xc9, 0x36, 0x95, 0xc3, 0x56, 0xfd, 0x3f, 0xff, + 0xac, 0x19, 0x9f, 0x9f, 0xd6, 0x8c, 0xbf, 0x9f, 0xd6, 0x8c, 0x2f, 0x4e, 0x6b, 0xc6, 0x97, 0xa7, + 0x35, 0xe3, 0x1f, 0xa7, 0x35, 0xe3, 0xcf, 0xff, 0xaa, 0x9d, 0xfb, 0xd5, 0xc2, 0xa0, 0xd5, 0x2e, + 0xc1, 0x57, 0xe5, 0xf7, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x81, 0xba, 0xde, 0x93, 0x11, 0x18, + 0x00, 0x00, } func (this *CheckRequest) Equal(that interface{}) bool { @@ -996,14 +996,6 @@ func (this *CheckConfig) Equal(that interface{}) bool { return false } } - if len(this.FallbackPipeline) != len(that1.FallbackPipeline) { - return false - } - for i := range this.FallbackPipeline { - if !this.FallbackPipeline[i].Equal(that1.FallbackPipeline[i]) { - return false - } - } if len(this.OutputMetricThresholds) != len(that1.OutputMetricThresholds) { return false } @@ -1020,6 +1012,14 @@ func (this *CheckConfig) Equal(that interface{}) bool { return false } } + if len(this.FallbackPipelines) != len(that1.FallbackPipelines) { + return false + } + for i := range this.FallbackPipelines { + if !this.FallbackPipelines[i].Equal(that1.FallbackPipelines[i]) { + return false + } + } if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { return false } @@ -1230,14 +1230,6 @@ func (this *Check) Equal(that interface{}) bool { return false } } - if len(this.FallbackPipeline) != len(that1.FallbackPipeline) { - return false - } - for i := range this.FallbackPipeline { - if !this.FallbackPipeline[i].Equal(that1.FallbackPipeline[i]) { - return false - } - } if len(this.OutputMetricThresholds) != len(that1.OutputMetricThresholds) { return false } @@ -1254,6 +1246,14 @@ func (this *Check) Equal(that interface{}) bool { return false } } + if len(this.FallbackPipelines) != len(that1.FallbackPipelines) { + return false + } + for i := range this.FallbackPipelines { + if !this.FallbackPipelines[i].Equal(that1.FallbackPipelines[i]) { + return false + } + } if !bytes.Equal(this.ExtendedAttributes, that1.ExtendedAttributes) { return false } @@ -1326,9 +1326,9 @@ type CheckConfigFace interface { GetOutputMetricTags() []*MetricTag GetScheduler() string GetPipelines() []*ResourceReference - GetFallbackPipeline() []*ResourceReference GetOutputMetricThresholds() []*MetricThreshold GetSubdues() []*TimeWindowRepeated + GetFallbackPipelines() []*ResourceReference } func (this *CheckConfig) Proto() github_com_golang_protobuf_proto.Message { @@ -1451,10 +1451,6 @@ func (this *CheckConfig) GetPipelines() []*ResourceReference { return this.Pipelines } -func (this *CheckConfig) GetFallbackPipeline() []*ResourceReference { - return this.FallbackPipeline -} - func (this *CheckConfig) GetOutputMetricThresholds() []*MetricThreshold { return this.OutputMetricThresholds } @@ -1463,6 +1459,10 @@ func (this *CheckConfig) GetSubdues() []*TimeWindowRepeated { return this.Subdues } +func (this *CheckConfig) GetFallbackPipelines() []*ResourceReference { + return this.FallbackPipelines +} + func NewCheckConfigFromFace(that CheckConfigFace) *CheckConfig { this := &CheckConfig{} this.Command = that.GetCommand() @@ -1493,9 +1493,9 @@ func NewCheckConfigFromFace(that CheckConfigFace) *CheckConfig { this.OutputMetricTags = that.GetOutputMetricTags() this.Scheduler = that.GetScheduler() this.Pipelines = that.GetPipelines() - this.FallbackPipeline = that.GetFallbackPipeline() this.OutputMetricThresholds = that.GetOutputMetricThresholds() this.Subdues = that.GetSubdues() + this.FallbackPipelines = that.GetFallbackPipelines() return this } @@ -1543,9 +1543,9 @@ type CheckFace interface { GetScheduler() string GetProcessedBy() string GetPipelines() []*ResourceReference - GetFallbackPipeline() []*ResourceReference GetOutputMetricThresholds() []*MetricThreshold GetSubdues() []*TimeWindowRepeated + GetFallbackPipelines() []*ResourceReference GetExtendedAttributes() []byte } @@ -1725,10 +1725,6 @@ func (this *Check) GetPipelines() []*ResourceReference { return this.Pipelines } -func (this *Check) GetFallbackPipeline() []*ResourceReference { - return this.FallbackPipeline -} - func (this *Check) GetOutputMetricThresholds() []*MetricThreshold { return this.OutputMetricThresholds } @@ -1737,6 +1733,10 @@ func (this *Check) GetSubdues() []*TimeWindowRepeated { return this.Subdues } +func (this *Check) GetFallbackPipelines() []*ResourceReference { + return this.FallbackPipelines +} + func (this *Check) GetExtendedAttributes() []byte { return this.ExtendedAttributes } @@ -1785,9 +1785,9 @@ func NewCheckFromFace(that CheckFace) *Check { this.Scheduler = that.GetScheduler() this.ProcessedBy = that.GetProcessedBy() this.Pipelines = that.GetPipelines() - this.FallbackPipeline = that.GetFallbackPipeline() this.OutputMetricThresholds = that.GetOutputMetricThresholds() this.Subdues = that.GetSubdues() + this.FallbackPipelines = that.GetFallbackPipelines() this.ExtendedAttributes = that.GetExtendedAttributes() return this } @@ -2015,10 +2015,10 @@ func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Subdues) > 0 { - for iNdEx := len(m.Subdues) - 1; iNdEx >= 0; iNdEx-- { + if len(m.FallbackPipelines) > 0 { + for iNdEx := len(m.FallbackPipelines) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Subdues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.FallbackPipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2031,10 +2031,10 @@ func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x9a } } - if len(m.OutputMetricThresholds) > 0 { - for iNdEx := len(m.OutputMetricThresholds) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Subdues) > 0 { + for iNdEx := len(m.Subdues) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.OutputMetricThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Subdues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2047,10 +2047,10 @@ func (m *CheckConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x92 } } - if len(m.FallbackPipeline) > 0 { - for iNdEx := len(m.FallbackPipeline) - 1; iNdEx >= 0; iNdEx-- { + if len(m.OutputMetricThresholds) > 0 { + for iNdEx := len(m.OutputMetricThresholds) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.FallbackPipeline[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.OutputMetricThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2378,10 +2378,10 @@ func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x9a } - if len(m.Subdues) > 0 { - for iNdEx := len(m.Subdues) - 1; iNdEx >= 0; iNdEx-- { + if len(m.FallbackPipelines) > 0 { + for iNdEx := len(m.FallbackPipelines) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Subdues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.FallbackPipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2394,10 +2394,10 @@ func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x8a } } - if len(m.OutputMetricThresholds) > 0 { - for iNdEx := len(m.OutputMetricThresholds) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Subdues) > 0 { + for iNdEx := len(m.Subdues) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.OutputMetricThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Subdues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -2410,10 +2410,10 @@ func (m *Check) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x82 } } - if len(m.FallbackPipeline) > 0 { - for iNdEx := len(m.FallbackPipeline) - 1; iNdEx >= 0; iNdEx-- { + if len(m.OutputMetricThresholds) > 0 { + for iNdEx := len(m.OutputMetricThresholds) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.FallbackPipeline[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.OutputMetricThresholds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3064,23 +3064,23 @@ func NewPopulatedCheckConfig(r randyCheck, easy bool) *CheckConfig { } if r.Intn(5) != 0 { v22 := r.Intn(5) - this.FallbackPipeline = make([]*ResourceReference, v22) + this.OutputMetricThresholds = make([]*MetricThreshold, v22) for i := 0; i < v22; i++ { - this.FallbackPipeline[i] = NewPopulatedResourceReference(r, easy) + this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) } } if r.Intn(5) != 0 { v23 := r.Intn(5) - this.OutputMetricThresholds = make([]*MetricThreshold, v23) + this.Subdues = make([]*TimeWindowRepeated, v23) for i := 0; i < v23; i++ { - this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) + this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) } } if r.Intn(5) != 0 { v24 := r.Intn(5) - this.Subdues = make([]*TimeWindowRepeated, v24) + this.FallbackPipelines = make([]*ResourceReference, v24) for i := 0; i < v24; i++ { - this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) + this.FallbackPipelines[i] = NewPopulatedResourceReference(r, easy) } } if !easy && r.Intn(10) != 0 { @@ -3226,23 +3226,23 @@ func NewPopulatedCheck(r randyCheck, easy bool) *Check { } if r.Intn(5) != 0 { v40 := r.Intn(5) - this.FallbackPipeline = make([]*ResourceReference, v40) + this.OutputMetricThresholds = make([]*MetricThreshold, v40) for i := 0; i < v40; i++ { - this.FallbackPipeline[i] = NewPopulatedResourceReference(r, easy) + this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) } } if r.Intn(5) != 0 { v41 := r.Intn(5) - this.OutputMetricThresholds = make([]*MetricThreshold, v41) + this.Subdues = make([]*TimeWindowRepeated, v41) for i := 0; i < v41; i++ { - this.OutputMetricThresholds[i] = NewPopulatedMetricThreshold(r, easy) + this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) } } if r.Intn(5) != 0 { v42 := r.Intn(5) - this.Subdues = make([]*TimeWindowRepeated, v42) + this.FallbackPipelines = make([]*ResourceReference, v42) for i := 0; i < v42; i++ { - this.Subdues[i] = NewPopulatedTimeWindowRepeated(r, easy) + this.FallbackPipelines[i] = NewPopulatedResourceReference(r, easy) } } v43 := r.Intn(100) @@ -3558,12 +3558,6 @@ func (m *CheckConfig) Size() (n int) { n += 2 + l + sovCheck(uint64(l)) } } - if len(m.FallbackPipeline) > 0 { - for _, e := range m.FallbackPipeline { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } if len(m.OutputMetricThresholds) > 0 { for _, e := range m.OutputMetricThresholds { l = e.Size() @@ -3576,6 +3570,12 @@ func (m *CheckConfig) Size() (n int) { n += 2 + l + sovCheck(uint64(l)) } } + if len(m.FallbackPipelines) > 0 { + for _, e := range m.FallbackPipelines { + l = e.Size() + n += 2 + l + sovCheck(uint64(l)) + } + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3759,12 +3759,6 @@ func (m *Check) Size() (n int) { n += 2 + l + sovCheck(uint64(l)) } } - if len(m.FallbackPipeline) > 0 { - for _, e := range m.FallbackPipeline { - l = e.Size() - n += 2 + l + sovCheck(uint64(l)) - } - } if len(m.OutputMetricThresholds) > 0 { for _, e := range m.OutputMetricThresholds { l = e.Size() @@ -3777,6 +3771,12 @@ func (m *Check) Size() (n int) { n += 2 + l + sovCheck(uint64(l)) } } + if len(m.FallbackPipelines) > 0 { + for _, e := range m.FallbackPipelines { + l = e.Size() + n += 2 + l + sovCheck(uint64(l)) + } + } l = len(m.ExtendedAttributes) if l > 0 { n += 2 + l + sovCheck(uint64(l)) @@ -5176,7 +5176,7 @@ func (m *CheckConfig) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 33: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipeline", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5203,14 +5203,14 @@ func (m *CheckConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FallbackPipeline = append(m.FallbackPipeline, &ResourceReference{}) - if err := m.FallbackPipeline[len(m.FallbackPipeline)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.OutputMetricThresholds = append(m.OutputMetricThresholds, &MetricThreshold{}) + if err := m.OutputMetricThresholds[len(m.OutputMetricThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 34: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5237,14 +5237,14 @@ func (m *CheckConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputMetricThresholds = append(m.OutputMetricThresholds, &MetricThreshold{}) - if err := m.OutputMetricThresholds[len(m.OutputMetricThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Subdues = append(m.Subdues, &TimeWindowRepeated{}) + if err := m.Subdues[len(m.Subdues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 35: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipelines", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5271,8 +5271,8 @@ func (m *CheckConfig) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Subdues = append(m.Subdues, &TimeWindowRepeated{}) - if err := m.Subdues[len(m.Subdues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.FallbackPipelines = append(m.FallbackPipelines, &ResourceReference{}) + if err := m.FallbackPipelines[len(m.FallbackPipelines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -6444,7 +6444,7 @@ func (m *Check) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 47: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipeline", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6471,14 +6471,14 @@ func (m *Check) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FallbackPipeline = append(m.FallbackPipeline, &ResourceReference{}) - if err := m.FallbackPipeline[len(m.FallbackPipeline)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.OutputMetricThresholds = append(m.OutputMetricThresholds, &MetricThreshold{}) + if err := m.OutputMetricThresholds[len(m.OutputMetricThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 48: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputMetricThresholds", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6505,14 +6505,14 @@ func (m *Check) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OutputMetricThresholds = append(m.OutputMetricThresholds, &MetricThreshold{}) - if err := m.OutputMetricThresholds[len(m.OutputMetricThresholds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.Subdues = append(m.Subdues, &TimeWindowRepeated{}) + if err := m.Subdues[len(m.Subdues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 49: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdues", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipelines", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6539,8 +6539,8 @@ func (m *Check) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Subdues = append(m.Subdues, &TimeWindowRepeated{}) - if err := m.Subdues[len(m.Subdues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.FallbackPipelines = append(m.FallbackPipelines, &ResourceReference{}) + if err := m.FallbackPipelines[len(m.FallbackPipelines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/v2/check.proto b/v2/check.proto index 5db7679..6d88fba 100644 --- a/v2/check.proto +++ b/v2/check.proto @@ -168,13 +168,13 @@ message CheckConfig { // Pipelines are the pipelines this check will use to process its events. repeated ResourceReference pipelines = 32 [ (gogoproto.jsontag) = "pipelines" ]; - //added fallback pieplines detials in order of execution - repeated ResourceReference fallback_pipeline = 33 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; + repeated MetricThreshold output_metric_thresholds = 33 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; + repeated TimeWindowRepeated subdues = 34 [ (gogoproto.jsontag) = "subdues,omitempty" ]; - repeated MetricThreshold output_metric_thresholds = 34 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; + //added fallback pieplines detials in order of execution + repeated ResourceReference fallback_pipelines = 35 [ (gogoproto.jsontag) = "fallback_pipelines" ,(gogoproto.moretags) = "yaml: \"fallback_pipelines,omitempty\"" ]; - repeated TimeWindowRepeated subdues = 35 [ (gogoproto.jsontag) = "subdues,omitempty" ]; } // A Check is a check specification and optionally the results of the check's @@ -332,17 +332,19 @@ message Check { // Pipelines are the pipelines this check will use to process its events. repeated ResourceReference pipelines = 46 [ (gogoproto.jsontag) = "pipelines" ]; - //fallback pieplines detials in order of execution - repeated ResourceReference fallback_pipeline = 47 [ (gogoproto.jsontag) = "fallback_pipeline" ,(gogoproto.moretags) = "yaml: \"fallback_pipeline,omitempty\"" ]; - // MetricThresholds are a list of thresholds to apply to metrics in order to determine // the check status. - repeated MetricThreshold output_metric_thresholds = 48 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; + repeated MetricThreshold output_metric_thresholds = 47 [ (gogoproto.jsontag) = "output_metric_thresholds,omitempty", (gogoproto.moretags) = "yaml: \"output_metric_thresholds,omitempty\"" ]; - repeated TimeWindowRepeated subdues = 49 [ (gogoproto.jsontag) = "subdues,omitempty" ]; + repeated TimeWindowRepeated subdues = 48 [ (gogoproto.jsontag) = "subdues,omitempty" ]; + + //fallback pieplines details in order of execution + repeated ResourceReference fallback_pipelines = 49 [ (gogoproto.jsontag) = "fallback_pipelines" ,(gogoproto.moretags) = "yaml: \"fallback_pipelines,omitempty\"" ]; // ExtendedAttributes store serialized arbitrary JSON-encoded data bytes ExtendedAttributes = 99 [ (gogoproto.jsontag) = "-" ]; + + } // CheckHistory is a record of a check execution and its status diff --git a/v2/pipeline.pb.go b/v2/pipeline.pb.go index d60fba0..c26e458 100644 --- a/v2/pipeline.pb.go +++ b/v2/pipeline.pb.go @@ -76,14 +76,12 @@ func (m *Pipeline) GetWorkflows() []*PipelineWorkflow { return nil } -// Pipeline represents a named collection of fallbackpipeline spec details. // FallbackPipeline represents a named collection of fallbackpipeline spec details. type FallbackPipeline struct { // Metadata contains the name, namespace, labels and annotations of the ObjectMeta `protobuf:"bytes,1,opt,name=Metadata,proto3,embedded=Metadata" json:"metadata,omitempty"` // FallbackpipelineList contains one or more pipeline list. - //FallbackPipelineListflow Pipelinelist = 2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; - Pipelist []*ResourceReference `protobuf:"bytes,2,rep,name=pipelist,proto3" json:"pipelinelist" yaml: "pipelinelist"` + PipelineList []*ResourceReference `protobuf:"bytes,2,rep,name=pipelineList,proto3" json:"pipelinelist" yaml: "pipelinelist"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -122,9 +120,9 @@ func (m *FallbackPipeline) XXX_DiscardUnknown() { var xxx_messageInfo_FallbackPipeline proto.InternalMessageInfo -func (m *FallbackPipeline) GetPipelist() []*ResourceReference { +func (m *FallbackPipeline) GetPipelineList() []*ResourceReference { if m != nil { - return m.Pipelist + return m.PipelineList } return nil } @@ -139,31 +137,31 @@ func init() { } var fileDescriptor_70464c4bd162b56d = []byte{ - // 372 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4f, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x2f, 0x4e, 0xcd, 0x2b, 0x2e, 0xd5, 0x4f, 0xce, 0x2f, - 0x4a, 0xd5, 0x2f, 0x33, 0xd2, 0x2f, 0xc8, 0x2c, 0x48, 0xcd, 0xc9, 0xcc, 0x4b, 0xd5, 0x2b, 0x28, - 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0xcb, 0xea, 0x81, 0x64, 0xf5, 0xca, 0x8c, 0xa4, 0x4c, 0x90, - 0xf4, 0xa5, 0xe7, 0xa7, 0xe7, 0xeb, 0x83, 0x55, 0x25, 0x95, 0xa6, 0x39, 0x94, 0x19, 0xea, 0x19, - 0xeb, 0x19, 0x81, 0x05, 0xc1, 0x62, 0x60, 0x16, 0xc4, 0x10, 0x29, 0x65, 0x9c, 0xb6, 0xe5, 0xa6, - 0x96, 0x24, 0x42, 0x15, 0x19, 0x10, 0x74, 0x52, 0x7c, 0x79, 0x7e, 0x51, 0x76, 0x5a, 0x4e, 0x7e, - 0x39, 0x54, 0x87, 0x21, 0x4e, 0x1d, 0x45, 0xa9, 0xc5, 0xf9, 0xa5, 0x45, 0xc9, 0xa9, 0xf1, 0x45, - 0xa9, 0x69, 0xa9, 0x45, 0xa9, 0x79, 0xc9, 0x50, 0xef, 0x28, 0x1d, 0x61, 0xe4, 0xe2, 0x08, 0x80, - 0x1a, 0x27, 0x14, 0xca, 0xc5, 0xe1, 0x9b, 0x5a, 0x92, 0x98, 0x92, 0x58, 0x92, 0x28, 0xc1, 0xa8, - 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa9, 0x87, 0xe2, 0x5d, 0x3d, 0xff, 0xa4, 0xac, 0xd4, 0xe4, 0x12, - 0x90, 0x22, 0x27, 0xb9, 0x13, 0xf7, 0xe4, 0x19, 0x2e, 0xdc, 0x93, 0x67, 0x7c, 0x75, 0x4f, 0x5e, - 0x28, 0x17, 0xaa, 0x4d, 0x27, 0x3f, 0x37, 0xb3, 0x24, 0x35, 0xb7, 0xa0, 0xa4, 0x32, 0x08, 0x6e, - 0x94, 0x50, 0x22, 0x17, 0x67, 0x38, 0xd4, 0xa1, 0xc5, 0x12, 0x4c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, - 0xf2, 0x68, 0xe6, 0xc2, 0x9c, 0x00, 0x53, 0xe7, 0xa4, 0xf4, 0xea, 0x9e, 0x3c, 0x27, 0xcc, 0x7b, - 0xc5, 0x9f, 0xee, 0xc9, 0x0b, 0x56, 0x26, 0xe6, 0xe6, 0x58, 0x29, 0x28, 0xc1, 0xc5, 0x94, 0x82, - 0x10, 0xa6, 0x2a, 0x5d, 0x64, 0xe4, 0x12, 0x70, 0x4b, 0xcc, 0xc9, 0x49, 0x4a, 0x4c, 0xce, 0xa6, - 0xb5, 0x77, 0xd2, 0xb8, 0x38, 0x20, 0x11, 0x50, 0x5c, 0x02, 0xf5, 0x8d, 0x02, 0x9a, 0xb1, 0x41, - 0xd0, 0xd0, 0x0e, 0x82, 0x05, 0xb6, 0x93, 0xc6, 0xab, 0x7b, 0xf2, 0x3c, 0xb0, 0x68, 0x03, 0xe9, - 0xfc, 0x74, 0x4f, 0x5e, 0x04, 0xea, 0x23, 0x64, 0x61, 0xa5, 0x20, 0xb8, 0xd9, 0x4e, 0x0a, 0x3f, - 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0xb8, 0xe3, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, - 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x43, 0x14, 0x53, 0x99, - 0x51, 0x12, 0x1b, 0x38, 0x0e, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x16, 0xc2, 0xc4, 0x2a, - 0xbd, 0x02, 0x00, 0x00, + // 373 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x91, 0xb1, 0x4e, 0xc2, 0x40, + 0x1c, 0xc6, 0x39, 0x4c, 0x0c, 0x14, 0x4d, 0xb4, 0x71, 0x40, 0x86, 0xbb, 0xa6, 0x0e, 0x32, 0x98, + 0xab, 0x14, 0x27, 0x27, 0xd3, 0xc1, 0x49, 0xa3, 0x69, 0x62, 0x4c, 0x5c, 0xc8, 0xb5, 0x1e,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f3, 0x1c, 0x4e, 0xbd, 0x80, 0x0f, 0xcd, 0x39, 0x4a, 0x26, + 0x52, 0xf5, 0x56, 0x0c, 0x1a, 0xd5, 0xcb, 0xca, 0x46, 0xb3, 0xa6, 0xa3, 0x15, 0x6e, 0x31, 0x42, + 0xe1, 0x33, 0xd4, 0x49, 0x8a, 0xaa, 0x45, 0xbd, 0x68, 0x9a, 0xa2, 0xdd, 0x21, 0xf1, 0xdc, 0x53, + 0x45, 0x9d, 0x6b, 0xaa, 0xf9, 0x4b, 0x55, 0xdf, 0x80, 0xb4, 0x73, 0x4e, 0x5c, 0xd7, 0x22, 0x76, + 0xff, 0xbf, 0xeb, 0xf8, 0xd2, 0x56, 0x71, 0x80, 0x0b, 0x27, 0xe2, 0xa2, 0x91, 0xb2, 0x82, 0x36, + 0xc5, 0xc6, 0xcd, 0x62, 0xe1, 0x46, 0x73, 0x92, 0xa2, 0x79, 0xd2, 0x75, 0x22, 0x3e, 0x4d, 0xd1, + 0x9e, 0x68, 0xb5, 0x28, 0xab, 0xe6, 0x12, 0xdf, 0x50, 0xbe, 0x3e, 0x20, 0x78, 0xce, 0x20, 0x78, + 0xc9, 0x20, 0x18, 0x65, 0x10, 0x8c, 0x33, 0x08, 0xde, 0x33, 0x08, 0x9e, 0x3e, 0x61, 0xe9, 0xae, + 0x9c, 0xe8, 0xd6, 0x66, 0x7e, 0xcb, 0xf6, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x16, 0x94, 0x8f, + 0xfe, 0xc5, 0x02, 0x00, 0x00, } func (this *Pipeline) Equal(that interface{}) bool { @@ -223,11 +221,11 @@ func (this *FallbackPipeline) Equal(that interface{}) bool { if !this.ObjectMeta.Equal(&that1.ObjectMeta) { return false } - if len(this.Pipelist) != len(that1.Pipelist) { + if len(this.PipelineList) != len(that1.PipelineList) { return false } - for i := range this.Pipelist { - if !this.Pipelist[i].Equal(that1.Pipelist[i]) { + for i := range this.PipelineList { + if !this.PipelineList[i].Equal(that1.PipelineList[i]) { return false } } @@ -311,10 +309,10 @@ func (m *FallbackPipeline) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Pipelist) > 0 { - for iNdEx := len(m.Pipelist) - 1; iNdEx >= 0; iNdEx-- { + if len(m.PipelineList) > 0 { + for iNdEx := len(m.PipelineList) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Pipelist[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.PipelineList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -372,9 +370,9 @@ func NewPopulatedFallbackPipeline(r randyPipeline, easy bool) *FallbackPipeline this.ObjectMeta = *v3 if r.Intn(5) != 0 { v4 := r.Intn(5) - this.Pipelist = make([]*ResourceReference, v4) + this.PipelineList = make([]*ResourceReference, v4) for i := 0; i < v4; i++ { - this.Pipelist[i] = NewPopulatedResourceReference(r, easy) + this.PipelineList[i] = NewPopulatedResourceReference(r, easy) } } if !easy && r.Intn(10) != 0 { @@ -483,8 +481,8 @@ func (m *FallbackPipeline) Size() (n int) { _ = l l = m.ObjectMeta.Size() n += 1 + l + sovPipeline(uint64(l)) - if len(m.Pipelist) > 0 { - for _, e := range m.Pipelist { + if len(m.PipelineList) > 0 { + for _, e := range m.PipelineList { l = e.Size() n += 1 + l + sovPipeline(uint64(l)) } @@ -683,7 +681,7 @@ func (m *FallbackPipeline) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pipelist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field PipelineList", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -710,8 +708,8 @@ func (m *FallbackPipeline) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Pipelist = append(m.Pipelist, &ResourceReference{}) - if err := m.Pipelist[len(m.Pipelist)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.PipelineList = append(m.PipelineList, &ResourceReference{}) + if err := m.PipelineList[len(m.PipelineList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/v2/pipeline.proto b/v2/pipeline.proto index 3e1c6da..d02ba09 100644 --- a/v2/pipeline.proto +++ b/v2/pipeline.proto @@ -25,18 +25,12 @@ message Pipeline { repeated PipelineWorkflow Workflows = 2 [ (gogoproto.jsontag) = "workflows", (gogoproto.moretags) = "yaml: \"workflows\"" ]; } -//for fallback pipeline - - -// Pipeline represents a named collection of fallbackpipeline spec details. // FallbackPipeline represents a named collection of fallbackpipeline spec details. message FallbackPipeline { // Metadata contains the name, namespace, labels and annotations of the ObjectMeta Metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; - // FallbackpipelineList contains one or more pipeline list. - //FallbackPipelineListflow Pipelinelist = 2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; - repeated ResourceReference pipelist =2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; + repeated ResourceReference pipelineList =2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; } diff --git a/v2/secret.proto b/v2/secret.proto index 8266d02..25f1f53 100644 --- a/v2/secret.proto +++ b/v2/secret.proto @@ -1,7 +1,6 @@ syntax = "proto3"; import "github.com/gogo/protobuf@v1.3.2/gogoproto/gogo.proto"; -//import "github.com/sensu/core/v2/meta.proto"; package sensu.core.v2; diff --git a/v2/types_gen.go b/v2/types_gen.go index b4783eb..3838235 100644 --- a/v2/types_gen.go +++ b/v2/types_gen.go @@ -1,11 +1,10 @@ package v2 -// -//TODO: go build will build the latest version of the protoc-gen-gofast module -//used by the project. We need a way to pin the exact version of -//protoc-gen-gofast used in this generator. We could not find a way of doing -//this at the time of this writing. -// +// TODO: go build will build the latest version of the protoc-gen-gofast module +// used by the project. We need a way to pin the exact version of +// protoc-gen-gofast used in this generator. We could not find a way of doing +// this at the time of this writing. + //go:generate go run ./internal/codegen/check_protoc //go:generate go build -o $GOPATH/bin/protoc-gen-gofast github.com/gogo/protobuf/protoc-gen-gofast //go:generate -command protoc protoc --plugin $GOPATH/bin/protoc-gen-gofast --gofast_out=plugins:$GOPATH/src -I=$GOPATH/pkg/mod -I=$GOPATH/src -I=$GOPATH/pkg/mod/github.com/gogo/protobuf@v1.3.2/protobuf From d8b5f448f1442bcdf2342cc59195edef9cab8e29 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 17:38:33 +0530 Subject: [PATCH 10/17] review points addressed Signed-off-by: manisha kumari --- v2/fallback_pipeline.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/fallback_pipeline.go b/v2/fallback_pipeline.go index 18223aa..5daada7 100644 --- a/v2/fallback_pipeline.go +++ b/v2/fallback_pipeline.go @@ -77,8 +77,8 @@ func (f *FallbackPipeline) Fields() map[string]string { // // FixturePipeline returns a testing fixture for a Pipeline object. func FixtureFallbackPipeline(name, namespace string) *FallbackPipeline { return &FallbackPipeline{ - ObjectMeta: NewObjectMeta(name, namespace), - Pipelist: []*ResourceReference{}, + ObjectMeta: NewObjectMeta(name, namespace), + PipelineList: []*ResourceReference{}, } } From dab253f586e0fe0aa35f99475510dea30cc8cc28 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 18:00:19 +0530 Subject: [PATCH 11/17] review points addressed Signed-off-by: manisha kumari --- v2/check.go | 6 +-- v2/check.pb.go | 2 +- v2/check.proto | 2 +- v2/event.go | 4 +- v2/event.pb.go | 100 ++++++++++++++++++++-------------------- v2/event.proto | 4 +- v2/fallback_pipeline.go | 2 +- v2/pipeline.pb.go | 2 +- v2/pipeline.proto | 2 +- 9 files changed, 62 insertions(+), 62 deletions(-) diff --git a/v2/check.go b/v2/check.go index 17d10f5..3b2c188 100644 --- a/v2/check.go +++ b/v2/check.go @@ -131,7 +131,7 @@ func NewCheck(c *CheckConfig) *Check { MaxOutputSize: c.MaxOutputSize, Scheduler: c.Scheduler, Pipelines: c.Pipelines, - FallbackPipeline: c.FallbackPipeline, + FallbackPipelines: c.FallbackPipelines, } if check.Labels == nil { check.Labels = make(map[string]string) @@ -269,8 +269,8 @@ func (c *Check) MarshalJSON() ([]byte, error) { if c.Pipelines == nil { c.Pipelines = []*ResourceReference{} } - if c.FallbackPipeline == nil { - c.FallbackPipeline = []*ResourceReference{} + if c.FallbackPipelines == nil { + c.FallbackPipelines = []*ResourceReference{} } type Clone Check diff --git a/v2/check.pb.go b/v2/check.pb.go index 507bb29..d116eb9 100644 --- a/v2/check.pb.go +++ b/v2/check.pb.go @@ -316,7 +316,7 @@ type CheckConfig struct { Pipelines []*ResourceReference `protobuf:"bytes,32,rep,name=pipelines,proto3" json:"pipelines"` OutputMetricThresholds []*MetricThreshold `protobuf:"bytes,33,rep,name=output_metric_thresholds,json=outputMetricThresholds,proto3" json:"output_metric_thresholds,omitempty" yaml: "output_metric_thresholds,omitempty"` Subdues []*TimeWindowRepeated `protobuf:"bytes,34,rep,name=subdues,proto3" json:"subdues,omitempty"` - //added fallback pieplines detials in order of execution + //added fallback pieplines details in order of execution FallbackPipelines []*ResourceReference `protobuf:"bytes,35,rep,name=fallback_pipelines,json=fallbackPipelines,proto3" json:"fallback_pipelines" yaml: "fallback_pipelines,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` diff --git a/v2/check.proto b/v2/check.proto index 6d88fba..8df5683 100644 --- a/v2/check.proto +++ b/v2/check.proto @@ -172,7 +172,7 @@ message CheckConfig { repeated TimeWindowRepeated subdues = 34 [ (gogoproto.jsontag) = "subdues,omitempty" ]; - //added fallback pieplines detials in order of execution + //added fallback pieplines details in order of execution repeated ResourceReference fallback_pipelines = 35 [ (gogoproto.jsontag) = "fallback_pipelines" ,(gogoproto.moretags) = "yaml: \"fallback_pipelines,omitempty\"" ]; } diff --git a/v2/event.go b/v2/event.go index 1c5227b..51bdfbe 100644 --- a/v2/event.go +++ b/v2/event.go @@ -76,8 +76,8 @@ func (e *Event) Validate() error { } } - for _, fallpipeline := range e.FallbackPipeline { - if err := e.validateFallbackPipelineReference(fallpipeline); err != nil { + for _, fallpipelines := range e.FallbackPipelines { + if err := e.validateFallbackPipelineReference(fallpipelines); err != nil { return errors.New("Fallback-pipeline reference is invalid: " + err.Error()) } } diff --git a/v2/event.pb.go b/v2/event.pb.go index f8ff1e8..9769698 100644 --- a/v2/event.pb.go +++ b/v2/event.pb.go @@ -48,8 +48,8 @@ type Event struct { // APIVersion should default to "core/v2" and Type should default to // "Pipeline". Pipelines []*ResourceReference `protobuf:"bytes,8,rep,name=pipelines,proto3" json:"pipelines"` - //fallback pipeline - FallbackPipeline []*ResourceReference `protobuf:"bytes,9,rep,name=fallback_pipeline,json=fallbackPipeline,proto3" json:"fallback_pipeline"` + //fallback pipelines + FallbackPipelines []*ResourceReference `protobuf:"bytes,9,rep,name=fallback_pipelines,json=fallbackPipelines,proto3" json:"fallback_pipelines"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -97,37 +97,37 @@ func init() { } var fileDescriptor_f911c654eafd4c9b = []byte{ - // 473 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcb, 0x6e, 0xd3, 0x4c, - 0x18, 0x86, 0x33, 0xce, 0xa1, 0xc9, 0xb4, 0x95, 0xfe, 0x7f, 0xd4, 0x56, 0xa6, 0x42, 0x1e, 0x8b, - 0x93, 0xbc, 0xb2, 0xa9, 0x83, 0x58, 0xb0, 0x42, 0xa6, 0x5d, 0x54, 0x28, 0x02, 0x0d, 0x3b, 0x36, - 0x95, 0x3d, 0xf9, 0x92, 0x9a, 0x26, 0x76, 0xb0, 0xc7, 0x96, 0xb8, 0x03, 0xd6, 0xac, 0x58, 0x76, - 0xd9, 0x4b, 0xe0, 0x12, 0xb2, 0xec, 0x15, 0x58, 0x60, 0x76, 0xb9, 0x02, 0x96, 0xc8, 0xe3, 0x49, - 0x02, 0x41, 0x41, 0xec, 0x46, 0xef, 0xfb, 0x3c, 0xe3, 0x99, 0x6f, 0x8c, 0x1f, 0x8c, 0x43, 0x71, - 0x99, 0x05, 0x36, 0x8f, 0xa7, 0x4e, 0x0a, 0x51, 0x9a, 0x39, 0x3c, 0x4e, 0xc0, 0xc9, 0x5d, 0x07, - 0x72, 0x88, 0x84, 0x3d, 0x4b, 0x62, 0x11, 0x93, 0x7d, 0x59, 0xd9, 0x55, 0x65, 0xe7, 0xee, 0xf1, - 0x93, 0x5f, 0xa4, 0x71, 0x3c, 0x8e, 0x1d, 0x49, 0x05, 0xd9, 0xe8, 0x79, 0x7e, 0x62, 0xf7, 0x6d, - 0x57, 0x86, 0x32, 0x93, 0xab, 0x7a, 0x93, 0xe3, 0x87, 0xdb, 0x3f, 0x15, 0x89, 0x50, 0x7c, 0x50, - 0xd8, 0xf6, 0x13, 0xf1, 0x4b, 0xe0, 0x57, 0x8a, 0x7a, 0xb4, 0x95, 0x9a, 0x82, 0x48, 0x42, 0x9e, - 0x2a, 0xee, 0xfe, 0xdf, 0x38, 0x5f, 0x41, 0x27, 0x5b, 0xa1, 0x04, 0xd2, 0x38, 0x4b, 0x38, 0x5c, - 0x24, 0x30, 0x82, 0x04, 0x22, 0x0e, 0xb5, 0x72, 0xef, 0x53, 0x0b, 0xb7, 0xcf, 0xaa, 0x09, 0x91, - 0xbb, 0xb8, 0x27, 0xc2, 0x29, 0xa4, 0xc2, 0x9f, 0xce, 0x74, 0x64, 0x22, 0xab, 0xc9, 0xd6, 0x01, - 0xe9, 0xe3, 0x4e, 0x7d, 0x3b, 0x5d, 0x33, 0x91, 0xb5, 0xe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0xd7, - 0x2a, 0x79, 0xd6, 0xfd, 0x78, 0x4d, 0x1b, 0x37, 0xd7, 0x14, 0x79, 0xe6, 0x8f, 0x6f, 0x06, 0xba, - 0x29, 0x0d, 0xf4, 0xa5, 0x34, 0xd0, 0xbc, 0x34, 0xd0, 0x6d, 0x69, 0xa0, 0xaf, 0xa5, 0x81, 0x3e, - 0x7f, 0x37, 0x1a, 0x6f, 0xb5, 0xdc, 0x0d, 0x3a, 0xf2, 0xef, 0xe9, 0xff, 0x0c, 0x00, 0x00, 0xff, - 0xff, 0xc9, 0x10, 0x77, 0xb5, 0x77, 0x03, 0x00, 0x00, + // 471 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4d, 0x6e, 0xd3, 0x40, + 0x14, 0xc7, 0x33, 0xce, 0x47, 0x93, 0x69, 0xbb, 0x60, 0x54, 0x22, 0x53, 0x21, 0x8f, 0xc5, 0x97, + 0xbc, 0xb2, 0xa9, 0x83, 0x58, 0xb0, 0x42, 0xa6, 0x5d, 0x54, 0x28, 0x02, 0x0d, 0x3b, 0x36, 0x95, + 0x3d, 0x7d, 0x49, 0x4d, 0x13, 0x3b, 0xd8, 0x63, 0x4b, 0xdc, 0x80, 0x0b, 0x20, 0xb1, 0xec, 0xb2, + 0x47, 0xe0, 0x08, 0x59, 0xf6, 0x04, 0x16, 0x98, 0x5d, 0x4e, 0xc0, 0x12, 0x79, 0x3c, 0x49, 0x20, + 0x22, 0xa8, 0xbb, 0xd1, 0xfb, 0xff, 0x7e, 0xcf, 0xf3, 0xde, 0x18, 0x3f, 0x1a, 0x87, 0xe2, 0x22, + 0x0b, 0x6c, 0x1e, 0x4f, 0x9d, 0x14, 0xa2, 0x34, 0x73, 0x78, 0x9c, 0x80, 0x93, 0xbb, 0x0e, 0xe4, + 0x10, 0x09, 0x7b, 0x96, 0xc4, 0x22, 0x26, 0xfb, 0x32, 0xb2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 0x79, 0x41, 0x1b, 0x37, 0x05, 0x45, 0x8b, 0x82, 0xae, 0x34, 0xb6, 0x3a, 0x91, 0x3e, 0xd6, 0x4e, + 0x8f, 0xf5, 0x8e, 0x89, 0xac, 0x3d, 0xaf, 0xb3, 0x28, 0xa8, 0x16, 0x9e, 0x33, 0xed, 0xf4, 0x98, + 0x58, 0xb8, 0xfb, 0x0e, 0x3e, 0x66, 0xd5, 0xf6, 0xf4, 0x9d, 0x6a, 0x41, 0xde, 0x5e, 0xd5, 0x21, + 0x55, 0x35, 0xb6, 0x4a, 0xc9, 0x10, 0xf7, 0x66, 0xe1, 0x0c, 0x26, 0x61, 0x04, 0xa9, 0xde, 0x35, + 0x9b, 0xd6, 0xae, 0x6b, 0x6e, 0xdc, 0x87, 0xa9, 0x17, 0x61, 0xcb, 0x07, 0xf1, 0xf6, 0x17, 0x05, + 0x5d, 0x6b, 0x6c, 0x7d, 0x24, 0x63, 0x4c, 0x46, 0xfe, 0x64, 0x12, 0xf8, 0xfc, 0xf2, 0x6c, 0xdd, + 0xb7, 0x77, 0xcb, 0xbe, 0xfd, 0x45, 0x41, 0xff, 0xe1, 0xb3, 0x3b, 0xcb, 0xda, 0xdb, 0x65, 0xe9, + 0x45, 0xf7, 0xf3, 0x15, 0x6d, 0x5c, 0x5f, 0x51, 0xe4, 0x99, 0xbf, 0x7e, 0x18, 0xe8, 0xba, 0x34, + 0xd0, 0xb7, 0xd2, 0x40, 0xf3, 0xd2, 0x40, 0x37, 0xa5, 0x81, 0xbe, 0x97, 0x06, 0xfa, 0xfa, 0xd3, + 0x68, 0xbc, 0xd7, 0x72, 0x37, 0xe8, 0xc8, 0x1f, 0x68, 0xf0, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xad, + 0x77, 0xd2, 0xe2, 0x7a, 0x03, 0x00, 0x00, } func (this *Event) Equal(that interface{}) bool { @@ -178,11 +178,11 @@ func (this *Event) Equal(that interface{}) bool { return false } } - if len(this.FallbackPipeline) != len(that1.FallbackPipeline) { + if len(this.FallbackPipelines) != len(that1.FallbackPipelines) { return false } - for i := range this.FallbackPipeline { - if !this.FallbackPipeline[i].Equal(that1.FallbackPipeline[i]) { + for i := range this.FallbackPipelines { + if !this.FallbackPipelines[i].Equal(that1.FallbackPipelines[i]) { return false } } @@ -202,7 +202,7 @@ type EventFace interface { GetID() []byte GetSequence() int64 GetPipelines() []*ResourceReference - GetFallbackPipeline() []*ResourceReference + GetFallbackPipelines() []*ResourceReference } func (this *Event) Proto() github_com_golang_protobuf_proto.Message { @@ -245,8 +245,8 @@ func (this *Event) GetPipelines() []*ResourceReference { return this.Pipelines } -func (this *Event) GetFallbackPipeline() []*ResourceReference { - return this.FallbackPipeline +func (this *Event) GetFallbackPipelines() []*ResourceReference { + return this.FallbackPipelines } func NewEventFromFace(that EventFace) *Event { @@ -259,7 +259,7 @@ func NewEventFromFace(that EventFace) *Event { this.ID = that.GetID() this.Sequence = that.GetSequence() this.Pipelines = that.GetPipelines() - this.FallbackPipeline = that.GetFallbackPipeline() + this.FallbackPipelines = that.GetFallbackPipelines() return this } @@ -287,10 +287,10 @@ func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.FallbackPipeline) > 0 { - for iNdEx := len(m.FallbackPipeline) - 1; iNdEx >= 0; iNdEx-- { + if len(m.FallbackPipelines) > 0 { + for iNdEx := len(m.FallbackPipelines) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.FallbackPipeline[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.FallbackPipelines[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -427,9 +427,9 @@ func NewPopulatedEvent(r randyEvent, easy bool) *Event { } if r.Intn(5) != 0 { v4 := r.Intn(5) - this.FallbackPipeline = make([]*ResourceReference, v4) + this.FallbackPipelines = make([]*ResourceReference, v4) for i := 0; i < v4; i++ { - this.FallbackPipeline[i] = NewPopulatedResourceReference(r, easy) + this.FallbackPipelines[i] = NewPopulatedResourceReference(r, easy) } } if !easy && r.Intn(10) != 0 { @@ -546,8 +546,8 @@ func (m *Event) Size() (n int) { n += 1 + l + sovEvent(uint64(l)) } } - if len(m.FallbackPipeline) > 0 { - for _, e := range m.FallbackPipeline { + if len(m.FallbackPipelines) > 0 { + for _, e := range m.FallbackPipelines { l = e.Size() n += 1 + l + sovEvent(uint64(l)) } @@ -842,7 +842,7 @@ func (m *Event) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 9: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipeline", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FallbackPipelines", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -869,8 +869,8 @@ func (m *Event) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.FallbackPipeline = append(m.FallbackPipeline, &ResourceReference{}) - if err := m.FallbackPipeline[len(m.FallbackPipeline)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.FallbackPipelines = append(m.FallbackPipelines, &ResourceReference{}) + if err := m.FallbackPipelines[len(m.FallbackPipelines)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/v2/event.proto b/v2/event.proto index 2b64fef..8fffe45 100644 --- a/v2/event.proto +++ b/v2/event.proto @@ -50,6 +50,6 @@ message Event { // APIVersion should default to "core/v2" and Type should default to // "Pipeline". repeated ResourceReference pipelines = 8 [ (gogoproto.jsontag) = "pipelines" ]; - //fallback pipeline - repeated ResourceReference fallback_pipeline = 9 [ (gogoproto.jsontag) = "fallback_pipeline" ]; + //fallback pipelines + repeated ResourceReference fallback_pipelines = 9 [ (gogoproto.jsontag) = "fallback_pipelines" ]; } diff --git a/v2/fallback_pipeline.go b/v2/fallback_pipeline.go index 5daada7..1a0eb96 100644 --- a/v2/fallback_pipeline.go +++ b/v2/fallback_pipeline.go @@ -9,7 +9,7 @@ import ( ) const ( - // PipelinesResource is the name of this resource type + // FallbackPipelinesResource is the name of this resource type FallbackPipelineResource = "fallbackPipeline" ) diff --git a/v2/pipeline.pb.go b/v2/pipeline.pb.go index c26e458..0eca5e4 100644 --- a/v2/pipeline.pb.go +++ b/v2/pipeline.pb.go @@ -76,7 +76,7 @@ func (m *Pipeline) GetWorkflows() []*PipelineWorkflow { return nil } -// FallbackPipeline represents a named collection of fallbackpipeline spec details. +// FallbackPipeline represents a named collection of fallback pipeline spec details. type FallbackPipeline struct { // Metadata contains the name, namespace, labels and annotations of the ObjectMeta `protobuf:"bytes,1,opt,name=Metadata,proto3,embedded=Metadata" json:"metadata,omitempty"` diff --git a/v2/pipeline.proto b/v2/pipeline.proto index d02ba09..2313a42 100644 --- a/v2/pipeline.proto +++ b/v2/pipeline.proto @@ -25,7 +25,7 @@ message Pipeline { repeated PipelineWorkflow Workflows = 2 [ (gogoproto.jsontag) = "workflows", (gogoproto.moretags) = "yaml: \"workflows\"" ]; } -// FallbackPipeline represents a named collection of fallbackpipeline spec details. +// FallbackPipeline represents a named collection of fallback pipeline spec details. message FallbackPipeline { // Metadata contains the name, namespace, labels and annotations of the ObjectMeta Metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; From 55991f8f39bab3232ba0159b3f3b7bd8a75ed25c Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 18:03:34 +0530 Subject: [PATCH 12/17] review points addressed Signed-off-by: manisha kumari --- v2/pipeline.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/v2/pipeline.proto b/v2/pipeline.proto index 2313a42..5cedae5 100644 --- a/v2/pipeline.proto +++ b/v2/pipeline.proto @@ -35,4 +35,3 @@ message FallbackPipeline { - From 14fccb0a5cca3d30a2da732c690800777567f7ee Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 18:04:19 +0530 Subject: [PATCH 13/17] review points addressed Signed-off-by: manisha kumari --- v2/pipeline.proto | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/v2/pipeline.proto b/v2/pipeline.proto index 5cedae5..2625d42 100644 --- a/v2/pipeline.proto +++ b/v2/pipeline.proto @@ -31,7 +31,4 @@ message FallbackPipeline { ObjectMeta Metadata = 1 [ (gogoproto.jsontag) = "metadata,omitempty", (gogoproto.embed) = true, (gogoproto.nullable) = false ]; // FallbackpipelineList contains one or more pipeline list. repeated ResourceReference pipelineList =2 [ (gogoproto.jsontag) = "pipelinelist", (gogoproto.moretags) = "yaml: \"pipelinelist\"" ]; -} - - - +} \ No newline at end of file From b501a68ebb830f68528013c704322c0dd904b516 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 18:06:15 +0530 Subject: [PATCH 14/17] review points addressed Signed-off-by: manisha kumari --- v2/pipeline_workflow.proto | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v2/pipeline_workflow.proto b/v2/pipeline_workflow.proto index 44b7d32..116771e 100644 --- a/v2/pipeline_workflow.proto +++ b/v2/pipeline_workflow.proto @@ -29,5 +29,4 @@ message PipelineWorkflow { // Handler contains a reference to a resource to use as an event handler. ResourceReference Handler = 4 [ (gogoproto.jsontag) = "handler", (gogoproto.moretags) = "yaml: \"handler]\"" ]; -} - +} \ No newline at end of file From a7807cc25169e6b6222ff7e1b396b8ca300a07ad Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Thu, 25 Jul 2024 18:14:57 +0530 Subject: [PATCH 15/17] review points addressed Signed-off-by: manisha kumari --- v2/check.proto | 3 --- v2/typemap.go | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/v2/check.proto b/v2/check.proto index 8df5683..c725ff4 100644 --- a/v2/check.proto +++ b/v2/check.proto @@ -174,7 +174,6 @@ message CheckConfig { //added fallback pieplines details in order of execution repeated ResourceReference fallback_pipelines = 35 [ (gogoproto.jsontag) = "fallback_pipelines" ,(gogoproto.moretags) = "yaml: \"fallback_pipelines,omitempty\"" ]; - } // A Check is a check specification and optionally the results of the check's @@ -343,8 +342,6 @@ message Check { // ExtendedAttributes store serialized arbitrary JSON-encoded data bytes ExtendedAttributes = 99 [ (gogoproto.jsontag) = "-" ]; - - } // CheckHistory is a record of a check execution and its status diff --git a/v2/typemap.go b/v2/typemap.go index 0bd0e18..8e539de 100644 --- a/v2/typemap.go +++ b/v2/typemap.go @@ -30,7 +30,7 @@ var typeMap = map[string]interface{}{ "event": &Event{}, "event_filter": &EventFilter{}, "extension": &Extension{}, - "fallback_pipeline": &FallbackPipeline{}, + "fallback_pipelines": &FallbackPipeline{}, "handler": &Handler{}, "handler_socket": &HandlerSocket{}, "health_response": &HealthResponse{}, From 33d8d947f6dd1c6a5403efa604b57c21d24e3e61 Mon Sep 17 00:00:00 2001 From: manisha kumari Date: Tue, 20 Aug 2024 11:38:09 +0530 Subject: [PATCH 16/17] dockerfile golang update Signed-off-by: manisha kumari --- .circleci/config.yml | 2 +- Dockerfile | 4 ++-- v2/go.mod | 2 +- v3/go.mod | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6e2ca8a..0963d6a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: working_directory: ~/core/<< parameters.module>> executor: name: go/default - tag: '1.19' + tag: '1.22' steps: - checkout: path: ~/core diff --git a/Dockerfile b/Dockerfile index 5a23a49..1dc570b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM golang:1.18-bullseye +FROM golang:1.22-bullseye RUN apt-get update && apt-get upgrade -y && apt-get install -y unzip ARG protoc_version=3.19.4 -ARG protoc_arch=x86_64 +ARG protoc_arch=aarch_64 ARG protoc_release=/~https://github.com/protocolbuffers/protobuf/releases/download/v${protoc_version}/protoc-${protoc_version}-linux-${protoc_arch}.zip ADD $protoc_release /opt/protoc.zip diff --git a/v2/go.mod b/v2/go.mod index 7967cd0..82b890e 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/core/v2 -go 1.19 +go 1.22 require ( github.com/echlebek/crock v1.0.1 diff --git a/v3/go.mod b/v3/go.mod index 57d067d..a0e6e8b 100644 --- a/v3/go.mod +++ b/v3/go.mod @@ -1,6 +1,6 @@ module github.com/sensu/core/v3 -go 1.18 +go 1.22 require ( github.com/gogo/protobuf v1.3.2 From 0a6be805d020fda351cb5f0d1695ac3aa4889346 Mon Sep 17 00:00:00 2001 From: Bhavin1996 Date: Thu, 9 Jan 2025 10:41:50 +0530 Subject: [PATCH 17/17] test Signed-off-by: Bhavin1996 --- v2/fallback_pipeline.go | 51 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/v2/fallback_pipeline.go b/v2/fallback_pipeline.go index 1a0eb96..32b8429 100644 --- a/v2/fallback_pipeline.go +++ b/v2/fallback_pipeline.go @@ -2,8 +2,11 @@ package v2 import ( "errors" + "fmt" "net/url" "path" + "sync" + "time" stringsutil "github.com/sensu/core/v2/internal/stringutil" ) @@ -13,6 +16,46 @@ const ( FallbackPipelineResource = "fallbackPipeline" ) +//// FallbackPipeline defines a list of pipelines with independent execution. +//type FallbackPipeline struct { +// // Metadata contains the name, namespace, labels, and annotations. +// ObjectMeta `protobuf:"bytes,1,opt,name=Metadata,proto3,embedded=Metadata" json:"metadata,omitempty"` +// // FallbackpipelineList contains one or more pipeline list. +// PipelineList []*ResourceReference `protobuf:"bytes,2,rep,name=pipelineList,proto3" json:"pipelinelist" yaml:"pipelinelist"` +// XXX_NoUnkeyedLiteral struct{} `json:"-"` +// XXX_unrecognized []byte `json:"-"` +// XXX_sizecache int32 `json:"-"` +//} + +// ExecuteFallbackPipeline executes each pipeline independently, logging errors if any fail. +func (f *FallbackPipeline) ExecuteFallbackPipeline() { + var wg sync.WaitGroup + + for _, pipelineRef := range f.PipelineList { + wg.Add(1) + go func(pipeline *ResourceReference) { + defer wg.Done() + if err := executePipeline(pipeline); err != nil { + fmt.Printf("Pipeline %s failed: %v\n", pipeline.Name, err) + } else { + fmt.Printf("Pipeline %s succeeded.\n", pipeline.Name) + } + }(pipelineRef) + } + + wg.Wait() // Wait for all pipelines to finish +} + +// Simulates the execution of a single pipeline +func executePipeline(pipeline *ResourceReference) error { + fmt.Printf("Executing pipeline: %s\n", pipeline.Name) + time.Sleep(1 * time.Second) + if pipeline.Name == "fail" { + return errors.New("simulated pipeline failure") + } + return nil +} + // GetObjectMeta returns the object metadata for the resource. func (f *FallbackPipeline) GetObjectMeta() ObjectMeta { return f.ObjectMeta @@ -46,12 +89,11 @@ func (f *FallbackPipeline) URIPath() string { return path.Join(URLPrefix, "namespaces", url.PathEscape(f.Namespace), FallbackPipelineResource, url.PathEscape(f.Name)) } -// // Validate checks if a pipeline resource passes validation rules. +// Validate checks if a pipeline resource passes validation rules. func (f *FallbackPipeline) Validate() error { if err := ValidateName(f.ObjectMeta.Name); err != nil { return errors.New("name " + err.Error()) } - if f.ObjectMeta.Namespace == "" { return errors.New("namespace must be set") } @@ -74,7 +116,7 @@ func (f *FallbackPipeline) Fields() map[string]string { return FallbackPipelineFields(f) } -// // FixturePipeline returns a testing fixture for a Pipeline object. +// FixtureFallbackPipeline returns a testing fixture for a FallbackPipeline object. func FixtureFallbackPipeline(name, namespace string) *FallbackPipeline { return &FallbackPipeline{ ObjectMeta: NewObjectMeta(name, namespace), @@ -82,8 +124,7 @@ func FixtureFallbackPipeline(name, namespace string) *FallbackPipeline { } } -// // FixturePipelineReference returns a testing fixture for a ResourceReference -// // object referencing a corev2.Pipeline. +// FixtureFallbackPipelineReference returns a testing fixture for a ResourceReference. func FixtureFallbackPipelineReference(name string) *ResourceReference { return &ResourceReference{ APIVersion: "core/v2",