Skip to content

feat (audiences): Typed audience evaluation #174

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

Merged
merged 2 commits into from
Oct 9, 2018

Conversation

mjc1283
Copy link
Contributor

@mjc1283 mjc1283 commented Oct 9, 2018

Introduce support for typed audience evaluation. Includes changes from #171 and #173.

…nce match types (#171)

Summary:

This adds support for new audience match type conditions to the condition evaluator:
- exact, exists, gt, lt, and substring conditions
- Abort and return null when appropriate in leaf evaluators
- Null handling in and/or/not evaluators
- Assume implicit "or" when operator is missing

Test Plan:

Added new unit tests. Ran compatibility suite tests.
…nfig for new audience match types (#173)

This updates project config and the audience evaluator to finish the implementation of typed audience evaluation:

- In audience_evaluator, allow evaluation to continue when no user attributes are passed (previously we were immediately returning `false` when no attributes were passed)
- Update project_config: in `createProjectConfig`, set up a by-id object for accessing audiences from both `audiences` and `typedAudiences`. Also, update `getAudiencesForExperiment` to first look in `projectConfig.typedAudiences`, and only look in `projectConfig.audiences` as a fallback.
- Added unit tests checking that all top-level methods that accept user attributes can bucket users into experiments or rollouts that use typed audiences.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 97.335% when pulling 0f19fbe on mcarroll/audience-match-types into 17ac1cf on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.2%) to 97.335% when pulling 0f19fbe on mcarroll/audience-match-types into 17ac1cf on master.

@mikeproeng37
Copy link
Contributor

build

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

@mjc1283 mjc1283 merged commit 5c18367 into master Oct 9, 2018
@mikeproeng37 mikeproeng37 deleted the mcarroll/audience-match-types branch October 12, 2018 21:57
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.

3 participants