Skip to content

Conversation

@jimmyca15
Copy link
Member

This PR addresses an issue regarding audience matching precedence when assigning variants via targeting.

If the current user is targeted by name directly, the associated variant should always win. This has the highest precedence.

Next is a group match.

Finally, if none of the above matches occur, default rollout percentage should be used to select a matching variant. Otherwise, the default variant should be selected.

  1. User
  2. Group
  3. Default Rollout
  4. Default Variant

This is already detailed in the README, but the existing code did not behave this way.

@jimmyca15
Copy link
Member Author

@zhenlan @avanigupta @mrm9084

Please help with reviewing this PR if you can.

@avanigupta
Copy link
Member

                    }

Nit:
return IsTargeted(...);


Refers to: src/Microsoft.FeatureManagement/Targeting/TargetingEvaluator.cs:139 in 67b59b3. [](commit_id = 67b59b3, deletion_comment = False)

@jimmyca15
Copy link
Member Author

                    }

That changes the logic.

Currently, if any of the groups return a positive targeting result, then we return true.


In reply to: 1136523253


Refers to: src/Microsoft.FeatureManagement/Targeting/TargetingEvaluator.cs:139 in 67b59b3. [](commit_id = 67b59b3, deletion_comment = False)

@jimmyca15 jimmyca15 merged commit 8b2722f into microsoft:feature/v3 May 25, 2022
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.

2 participants