-
Notifications
You must be signed in to change notification settings - Fork 1
Add new config for acceptable matchers for ff and rb #229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -74,7 +80,7 @@ func (e *Evaluator) evaluateTreatment(key string, bucketingKey string, featureFl | |||
ctx.AddDependency("evaluator", e) | |||
ctx.AddDependency("ruleBasedSegmentStorage", e.ruleBasedSegmentStorage) | |||
|
|||
split := grammar.NewSplit(splitDto, ctx, e.logger) | |||
split := grammar.NewSplit(splitDto, ctx, e.logger, grammar.NewRuleBuilder(ctx, e.segmentStorage, e.ruleBasedSegmentStorage, e.featureFlagRules, e.ruleBasedSegmentRules, e.logger)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about evaluator receiving the entire ruleBuilder instead of passing the config parameters and creating the ruleBuilder here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, we need to remove the context.
@@ -14,8 +14,9 @@ func TestAllKeysMatcher(t *testing.T) { | |||
dto := &dtos.MatcherDTO{ | |||
MatcherType: "ALL_KEYS", | |||
} | |||
ruleBuilder := NewRuleBuilder(nil, nil, nil, SyncProxyFeatureFlagsRules, SyncProxyRuleBasedSegmentRules, logger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about matcher receive the rule builder so then you only call the BuildMatcher>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a test. For rule-based segments, it's receiving a ruleBuilder and calling the method.
SonarQube Quality Gate |
GO SPLIT COMMONS
What did you accomplish?
How do we test the changes introduced in this PR?
Extra Notes