Skip to content

Commit 2fc5ec5

Browse files
fix: missing decision reasons added in cmab flow
1 parent 6d0ccc1 commit 2fc5ec5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core-api/src/main/java/com/optimizely/ab/bucketing/DecisionService.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ public DecisionResponse<Variation> getVariation(@Nonnull Experiment experiment,
171171
String bucketingId = getBucketingId(user.getUserId(), user.getAttributes());
172172
String cmabUuid = null;
173173
decisionVariation = bucketer.bucket(experiment, bucketingId, projectConfig, decisionPath);
174+
reasons.merge(decisionVariation.getReasons());
174175
if (decisionPath == DecisionPath.WITH_CMAB && isCmabExperiment(experiment) && decisionVariation.getResult() != null) {
175176
// group-allocation and traffic-allocation checking passed for cmab
176177
// we need server decision overruling local bucketing for cmab
177-
reasons.merge(decisionVariation.getReasons());
178178
DecisionResponse<CmabDecision> cmabDecision = getDecisionForCmabExperiment(projectConfig, experiment, user, bucketingId, options);
179179
reasons.merge(cmabDecision.getReasons());
180180

@@ -190,7 +190,6 @@ public DecisionResponse<Variation> getVariation(@Nonnull Experiment experiment,
190190
}
191191
} else {
192192
// Standard bucketing for non-CMAB experiments
193-
reasons.merge(decisionVariation.getReasons());
194193
variation = decisionVariation.getResult();
195194
}
196195

0 commit comments

Comments
 (0)