diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ada30b5b9..80161807a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#4974](https://github.com/thanos-io/thanos/pull/4974) Store: Support tls_config configuration for connecting with Azure storage. - [#4999](https://github.com/thanos-io/thanos/pull/4999) COS: Support `endpoint` configuration for vpc internal endpoint. - [#5059](https://github.com/thanos-io/thanos/pull/5059) Compactor: Adding minimum retention flag validation for downsampling retention. +- [#5111](https://github.com/thanos-io/thanos/pull/5111) Add matcher support to Query Rules endpoint. ### Fixed diff --git a/pkg/api/query/v1.go b/pkg/api/query/v1.go index f5365a8f39..5da44c7a2d 100644 --- a/pkg/api/query/v1.go +++ b/pkg/api/query/v1.go @@ -787,10 +787,15 @@ func NewRulesHandler(client rules.UnaryClient, enablePartialResponse bool) func( typ = int32(rulespb.RulesRequest_ALL) } + if err := r.ParseForm(); err != nil { + return nil, nil, &api.ApiError{Typ: api.ErrorInternal, Err: errors.Errorf("error parsing request form='%v'", MatcherParam)} + } + // TODO(bwplotka): Allow exactly the same functionality as query API: passing replica, dedup and partial response as HTTP params as well. req := &rulespb.RulesRequest{ Type: rulespb.RulesRequest_Type(typ), PartialResponseStrategy: ps, + MatcherString: r.Form[MatcherParam], } tracing.DoInSpan(ctx, "retrieve_rules", func(ctx context.Context) { groups, warnings, err = client.Rules(ctx, req) diff --git a/pkg/rules/rules.go b/pkg/rules/rules.go index 219fba6aef..dbe99cfd48 100644 --- a/pkg/rules/rules.go +++ b/pkg/rules/rules.go @@ -7,9 +7,12 @@ import ( "context" "sort" "sync" + "text/template" + "text/template/parse" "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" "github.com/thanos-io/thanos/pkg/rules/rulespb" @@ -58,6 +61,16 @@ func (rr *GRPCClient) Rules(ctx context.Context, req *rulespb.RulesRequest) (*ru return nil, nil, errors.Wrap(err, "proxy Rules") } + var err error + matcherSets := make([][]*labels.Matcher, len(req.MatcherString)) + for i, s := range req.MatcherString { + matcherSets[i], err = parser.ParseMetricSelector(s) + if err != nil { + return nil, nil, errors.Wrap(err, "parser ParseMetricSelector") + } + } + + resp.groups = filterRules(resp.groups, matcherSets) // TODO(bwplotka): Move to SortInterface with equal method and heap. resp.groups = dedupGroups(resp.groups) for _, g := range resp.groups { @@ -67,6 +80,52 @@ func (rr *GRPCClient) Rules(ctx context.Context, req *rulespb.RulesRequest) (*ru return &rulespb.RuleGroups{Groups: resp.groups}, resp.warnings, nil } +// filterRules filters rules in a group according to given matcherSets. +func filterRules(ruleGroups []*rulespb.RuleGroup, matcherSets [][]*labels.Matcher) []*rulespb.RuleGroup { + if len(matcherSets) == 0 { + return ruleGroups + } + + for _, g := range ruleGroups { + filteredRules := g.Rules[:0] + for _, r := range g.Rules { + rl := r.GetLabels() + if matches(matcherSets, rl) { + filteredRules = append(filteredRules, r) + } + } + g.Rules = filteredRules + } + + return ruleGroups +} + +// matches returns whether the non-templated labels satisfy all the matchers in matcherSets. +func matches(matcherSets [][]*labels.Matcher, l labels.Labels) bool { + if len(matcherSets) == 0 { + return true + } + + var nonTemplatedLabels labels.Labels + labelTemplate := template.New("label") + for _, label := range l { + t, err := labelTemplate.Parse(label.Value) + // Label value is non-templated if it is one node of type NodeText. + if err == nil && len(t.Root.Nodes) == 1 && t.Root.Nodes[0].Type() == parse.NodeText { + nonTemplatedLabels = append(nonTemplatedLabels, label) + } + } + + for _, matchers := range matcherSets { + for _, m := range matchers { + if v := nonTemplatedLabels.Get(m.Name); !m.Matches(v) { + return false + } + } + } + return true +} + // dedupRules re-sorts the set so that the same series with different replica // labels are coming right after each other. func dedupRules(rules []*rulespb.Rule, replicaLabels map[string]struct{}) []*rulespb.Rule { diff --git a/pkg/rules/rules_test.go b/pkg/rules/rules_test.go index 730ef42959..5e2f90fe59 100644 --- a/pkg/rules/rules_test.go +++ b/pkg/rules/rules_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/gogo/protobuf/proto" + "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/thanos-io/thanos/pkg/rules/rulespb" @@ -954,3 +955,470 @@ func TestDedupGroups(t *testing.T) { }) } } + +func TestFilterRules(t *testing.T) { + for _, tc := range []struct { + name string + matcherSets [][]*labels.Matcher + groups, want []*rulespb.RuleGroup + }{ + { + name: "no groups", + groups: nil, + want: nil, + }, + { + name: "empty group with no matcher", + groups: []*rulespb.RuleGroup{ + {Name: "a"}, + }, + want: []*rulespb.RuleGroup{ + {Name: "a"}, + }, + }, + { + name: "multiple empty groups with no matcher", + groups: []*rulespb.RuleGroup{ + {Name: "a"}, + {Name: "b"}, + }, + want: []*rulespb.RuleGroup{ + {Name: "a"}, + {Name: "b"}, + }, + }, + { + name: "single group with labeled rules and no matcher", + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "replica", Value: "1"}, + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r2", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "replica", Value: "1"}, + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r2", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + }, + }, + { + name: "single group with labeled rules and matcher", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "label", Value: "foo", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "replica", Value: "1"}, + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r2", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "replica", Value: "1"}, + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + }, + { + name: "single group with no match for matcher", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "foo", Value: "bar", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "replica", Value: "1"}, + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r2", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{{ + Name: "a", + Rules: []*rulespb.Rule{}, + }}, + }, + { + name: "single group with templated labels", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "templatedlabel", Value: "{{ $externalURL }}", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + {Name: "templatedlabel", Value: "{{ $externalURL }}"}, + }}, + }), + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a2", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{{ + Name: "a", + Rules: []*rulespb.Rule{}, + }}, + }, + { + name: "multiple group with labeled rules and matcher", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "label", Value: "foo", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1a", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1b", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "some", Value: "label"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1a", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + }, + { + name: "multiple group with labeled rules and no match", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "foo", Value: "bar", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1a", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1b", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "some", Value: "label"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{}, + }, + { + Name: "b", + Rules: []*rulespb.Rule{}, + }, + }, + }, + { + name: "multiple group with templated labels", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "templatedlabel", Value: "{{ $externalURL }}", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "templatedlabel", Value: "{{ $externalURL }}"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1b", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "templated", Value: "{{ $externalURL }}"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{}, + }, + { + Name: "b", + Rules: []*rulespb.Rule{}, + }, + }, + }, + { + name: "multiple group with templated labels and non templated matcher", + matcherSets: [][]*labels.Matcher{{&labels.Matcher{Name: "templatedlabel", Value: "foo", Type: labels.MatchEqual}}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "templatedlabel", Value: "{{ $externalURL }}"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1b", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "templated", Value: "{{ $externalURL }}"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{}, + }, + { + Name: "b", + Rules: []*rulespb.Rule{}, + }, + }, + }, + { + name: "multiple group with regex matcher", + matcherSets: [][]*labels.Matcher{{labels.MustNewMatcher(labels.MatchRegexp, "label", "f.*")}}, + groups: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1a", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "otherlabel", Value: "bar"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1b", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "some", Value: "label"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + want: []*rulespb.RuleGroup{ + { + Name: "a", + Rules: []*rulespb.Rule{ + rulespb.NewAlertingRule(&rulespb.Alert{ + Name: "a1a", + Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1a", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + { + Name: "b", + Rules: []*rulespb.Rule{ + rulespb.NewRecordingRule(&rulespb.RecordingRule{ + Name: "r1b", Labels: labelpb.ZLabelSet{Labels: []labelpb.ZLabel{ + {Name: "label", Value: "foo"}, + }}, + }), + }, + }, + }, + }, + } { + t.Run(tc.name, func(t *testing.T) { + testutil.Equals(t, tc.want, filterRules(tc.groups, tc.matcherSets)) + }) + } +} diff --git a/pkg/rules/rulespb/rpc.pb.go b/pkg/rules/rulespb/rpc.pb.go index 4d85a902b8..2cbaff2c52 100644 --- a/pkg/rules/rulespb/rpc.pb.go +++ b/pkg/rules/rulespb/rpc.pb.go @@ -108,6 +108,7 @@ func (RulesRequest_Type) EnumDescriptor() ([]byte, []int) { type RulesRequest struct { Type RulesRequest_Type `protobuf:"varint,1,opt,name=type,proto3,enum=thanos.RulesRequest_Type" json:"type,omitempty"` PartialResponseStrategy storepb.PartialResponseStrategy `protobuf:"varint,2,opt,name=partial_response_strategy,json=partialResponseStrategy,proto3,enum=thanos.PartialResponseStrategy" json:"partial_response_strategy,omitempty"` + MatcherString []string `protobuf:"bytes,3,rep,name=matcher_string,json=matcherString,proto3" json:"matcher_string,omitempty"` } func (m *RulesRequest) Reset() { *m = RulesRequest{} } @@ -552,70 +553,71 @@ func init() { func init() { proto.RegisterFile("rules/rulespb/rpc.proto", fileDescriptor_91b1d28f30eb5efb) } var fileDescriptor_91b1d28f30eb5efb = []byte{ - // 999 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x26, 0x2d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9, 0x35, 0x6b, 0x59, 0x1a, 0x10, 0xc8, 0x63, 0x0d, 0x67, - 0x48, 0xf4, 0x18, 0x0c, 0x2f, 0x20, 0x94, 0x4b, 0x12, 0xac, 0xef, 0x6f, 0xa6, 0x29, 0x0d, 0xe1, - 0x14, 0x0c, 0x96, 0xd1, 0x39, 0x96, 0xfe, 0x9c, 0x83, 0x4d, 0x19, 0x6c, 0x85, 0x8c, 0x7b, 0x61, - 0x9f, 0xa0, 0xe7, 0x60, 0x4a, 0xb1, 0x60, 0x8b, 0x2f, 0xe1, 0xd5, 0x89, 0x70, 0xb7, 0x09, 0x77, - 0xef, 0x25, 0x95, 0x4e, 0x80, 0x38, 0xb1, 0xe8, 0x18, 0xd6, 0xbd, 0x30, 0x8c, 0xb8, 0xac, 0x31, - 0x4b, 0xce, 0xb0, 0x24, 0xff, 0x41, 0x92, 0x3f, 0x8f, 0xc6, 0xf3, 0x13, 0x74, 0x00, 0x06, 0xe3, - 0x1e, 0x27, 0x76, 0x4e, 0x16, 0x1b, 0xdd, 0xb8, 0x47, 0x5b, 0x44, 0x54, 0xcf, 0x24, 0x08, 0x2b, - 0x83, 0xda, 0x60, 0x79, 0x7d, 0xee, 0x5f, 0x90, 0xae, 0xc7, 0x25, 0x69, 0xef, 0xe0, 0xcb, 0x74, - 0xe2, 0x20, 0x95, 0xd0, 0xe0, 0x9f, 0x47, 0x43, 0x9f, 0x93, 0x61, 0xcc, 0xc7, 0x92, 0x2f, 0xc5, - 0xd4, 0x2f, 0x98, 0x22, 0x68, 0x43, 0x24, 0x91, 0x2d, 0xb5, 0xab, 0x74, 0x60, 0x65, 0xfe, 0x89, - 0x29, 0xe6, 0xff, 0xc9, 0x94, 0x1f, 0x0d, 0x30, 0x64, 0x39, 0xb2, 0x62, 0xe9, 0x1f, 0x50, 0xac, - 0x54, 0x4b, 0xd6, 0x96, 0x6a, 0x89, 0x03, 0xc6, 0x9b, 0x11, 0xa1, 0x63, 0x59, 0xff, 0xe4, 0xd6,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4b, 0x07, 0x0f, 0x97, 0x7d, 0xd3, 0x95, 0xb7, 0x16, 0xbc, 0x4a, - 0xa0, 0xbe, 0xd0, 0xdd, 0xc7, 0x97, 0x7f, 0x54, 0xb4, 0xcb, 0xab, 0x8a, 0xfe, 0xee, 0xaa, 0xa2, - 0xff, 0x7e, 0x55, 0xd1, 0xdf, 0x5e, 0x57, 0xb4, 0x77, 0xd7, 0x15, 0xed, 0xd7, 0xeb, 0x8a, 0xf6, - 0xaa, 0x90, 0x7c, 0xc7, 0xf6, 0x4c, 0x79, 0xb9, 0x83, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8f, - 0x24, 0x78, 0x7a, 0xdf, 0x0a, 0x00, 0x00, + // 1022 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x4f, 0xe3, 0x46, + 0x14, 0xb6, 0x71, 0xec, 0xc4, 0x2f, 0xc0, 0xd2, 0xd9, 0x45, 0x18, 0xb6, 0x8a, 0x51, 0x24, 0x2a, + 0x5a, 0x75, 0x93, 0x0a, 0xb4, 0x5b, 0xed, 0xa9, 0xc2, 0x40, 0x17, 0x24, 0x44, 0x57, 0x13, 0xd4, + 0xc3, 0xf6, 0x90, 0x0e, 0x61, 0x36, 0x58, 0x72, 0x6c, 0xef, 0xcc, 0x84, 0x8a, 0x1f, 0xd0, 0xfb, + 0x9e, 0xfb, 0x47, 0xfa, 0x17, 0x38, 0xee, 0xb1, 0xa7, 0xb4, 0x85, 0x53, 0x73, 0xe8, 0x6f, 0xa8, + 0x66, 0xc6, 0x8e, 0x43, 0x1a, 0xca, 0x6e, 0x9b, 0x5e, 0xfc, 0x66, 0xde, 0xfb, 0xde, 0x78, 0xe6, + 0xbd, 0x6f, 0x3e, 0x1b, 0x56, 0x58, 0x3f, 0xa2, 0xbc, 0xa9, 0x9e, 0xe9, 0x69, 0x93, 0xa5, 0x9d, + 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, } // Reference imports to suppress errors if they are not otherwise used. @@ -749,6 +751,15 @@ func (m *RulesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.MatcherString) > 0 { + for iNdEx := len(m.MatcherString) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.MatcherString[iNdEx]) + copy(dAtA[i:], m.MatcherString[iNdEx]) + i = encodeVarintRpc(dAtA, i, uint64(len(m.MatcherString[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if m.PartialResponseStrategy != 0 { i = encodeVarintRpc(dAtA, i, uint64(m.PartialResponseStrategy)) i-- @@ -1299,6 +1310,12 @@ func (m *RulesRequest) Size() (n int) { if m.PartialResponseStrategy != 0 { n += 1 + sovRpc(uint64(m.PartialResponseStrategy)) } + if len(m.MatcherString) > 0 { + for _, s := range m.MatcherString { + l = len(s) + n += 1 + l + sovRpc(uint64(l)) + } + } return n } @@ -1602,6 +1619,38 @@ func (m *RulesRequest) Unmarshal(dAtA []byte) error { break } } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MatcherString", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRpc + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRpc + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRpc + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MatcherString = append(m.MatcherString, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRpc(dAtA[iNdEx:]) diff --git a/pkg/rules/rulespb/rpc.proto b/pkg/rules/rulespb/rpc.proto index 2049334610..c708a1e82e 100644 --- a/pkg/rules/rulespb/rpc.proto +++ b/pkg/rules/rulespb/rpc.proto @@ -40,6 +40,7 @@ message RulesRequest { } Type type = 1; PartialResponseStrategy partial_response_strategy = 2; + repeated string matcher_string = 3; } message RulesResponse {