Skip to content

Conversation

@yasirfolio3
Copy link
Contributor

@yasirfolio3 yasirfolio3 commented Nov 12, 2019

Summary

  • Fixed null-bubbling cases where leaf node evaluation errors were ignored and gates such as not were able to perform operations on the result of invalid leaf node evaluation.
  • Implemented sorting of event-attributes for subset comparison.

@yasirfolio3 yasirfolio3 requested a review from a team as a code owner November 12, 2019 12:47
@yasirfolio3 yasirfolio3 removed the wip label Nov 13, 2019
@yasirfolio3 yasirfolio3 changed the title refact(audience-evaluation): Fixed null-bubbling issues. (WIP) refact(audience-evaluation): Fixed null-bubbling issues. Nov 13, 2019
Copy link
Contributor

@mikeproeng37 mikeproeng37 left a 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)
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, done 👍

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Sorts, no apostrophe

@msohailhussain
Copy link
Contributor

@mikeproeng37 mikeproeng37 merged commit ccf2503 into master Nov 15, 2019
@mikeproeng37 mikeproeng37 deleted the yasir/fix-null-bubbling branch November 15, 2019 23:10
AudienceMap: audienceMap,
}
result = conditionTreeEvaluator.Evaluate(audienceTree, treeParams)
result, _ = conditionTreeEvaluator.Evaluate(audienceTree, treeParams)
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants