Skip to content

Conversation

@wangjoshuah
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented Mar 19, 2018

Pull Request Test Coverage Report for Build 486

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 88.925%

Totals Coverage Status
Change from base Build 479: 0.2%
Covered Lines: 2192
Relevant Lines: 2465

💛 - Coveralls

// get last rule which is the fall back rule
Experiment finalRule = rollout.getExperiments().get(rolloutRulesLength - 1);
if (ExperimentUtils.isUserInExperiment(projectConfig, finalRule, filteredAttributes)) {
variation = bucketer.bucket(finalRule, bucketingId); // ignore audience
Copy link
Contributor

Choose a reason for hiding this comment

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

We no longer ignore audience so this comment is incorrect

Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is still incorrect

Variation variation;
for (int i = 0; i < rolloutRulesLength - 1; i++) {
Experiment rolloutRule = rollout.getExperiments().get(i);
Audience audience = projectConfig.getAudienceIdMapping().get(rolloutRule.getAudienceIds().get(0));
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these log messages are still useful

"\".");
variation = bucketer.bucket(rolloutRule, bucketingId);
if (variation == null) {
logger.debug("User \"{}\" was excluded due to traffic allocation.", userId);
Copy link
Contributor

Choose a reason for hiding this comment

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

This one we can definitely get rid of

return new FeatureDecision(rolloutRule, variation,
FeatureDecision.DecisionSource.ROLLOUT);
} else {
logger.debug("User \"{}\" did not meet the conditions to be in rollout rule for audience \"{}\".",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still helpful for debugging

// get last rule which is the fall back rule
Experiment finalRule = rollout.getExperiments().get(rolloutRulesLength - 1);
if (ExperimentUtils.isUserInExperiment(projectConfig, finalRule, filteredAttributes)) {
variation = bucketer.bucket(finalRule, bucketingId); // ignore audience
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is still incorrect

Copy link
Contributor

@thomaszurkan-optimizely thomaszurkan-optimizely left a comment

Choose a reason for hiding this comment

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

Passes e2e tests for feature management. I will approve as soon as you change the comment mentioned. :)

@thomaszurkan-optimizely thomaszurkan-optimizely merged commit db448a0 into master Mar 20, 2018
@wangjoshuah wangjoshuah deleted the josh.wan/do_not_special_case_last_rule branch March 21, 2018 04:41
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.

5 participants