-
Notifications
You must be signed in to change notification settings - Fork 19
refact(audience-evaluation): Fixed null-bubbling issues. #177
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
mikeproeng37
left a comment
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.
lgtm for the most part. Could you please have a link to passing FSC tests that includes the advanced audience targeting?
| // This wrapper method converts the conditionEvalResult to a boolean | ||
| result, _ := c.evaluate(node, condTreeParams) | ||
| return result | ||
| return c.evaluate(node, condTreeParams) |
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.
We don't need this wrapper method anymore right? Can we simply rename c.evaluate to c.Evaluate?
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.
yep, done 👍
mikeproeng37
left a comment
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.
lgtm
| return fmt.Errorf("Invalid response for dispatched Events") | ||
| } | ||
|
|
||
| // Sort's attributes under visitors which is required for subset comparison of attributes array |
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.
nit: Sorts, no apostrophe
| AudienceMap: audienceMap, | ||
| } | ||
| result = conditionTreeEvaluator.Evaluate(audienceTree, treeParams) | ||
| result, _ = conditionTreeEvaluator.Evaluate(audienceTree, treeParams) |
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.
Do we need to add any test cases that involve the second return value from conditionTreeEvaluator.Evaluate?
@mikeng13 @msohailhussain
Summary
leaf node evaluationerrors were ignored andgatessuch asnotwere able to perform operations on the result ofinvalid leaf node evaluation.