Skip to content
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

[FSSDK-11128] update decision service and impression event for CMAB #1021

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

raju-opti
Copy link
Contributor

@raju-opti raju-opti commented Mar 25, 2025

Summary

Test plan

  • added new tests and updated existing ones

Issues

  • FSSDK-11128
  • FSSDK-11129

@coveralls
Copy link

coveralls commented Mar 25, 2025

Coverage Status

coverage: 81.023% (-0.8%) from 81.835%
when pulling 7529686 on raju/cmab_decision
into aaf83d7 on master.

@raju-opti raju-opti force-pushed the raju/cmab_decision branch from 474b836 to d966df0 Compare March 25, 2025 20:33
@raju-opti raju-opti changed the title Raju/cmab decision [FSSDK-11128] update decision service methods and impression event for CMAB Mar 25, 2025
@raju-opti raju-opti changed the title [FSSDK-11128] update decision service methods and impression event for CMAB [FSSDK-11128] update decision service and impression event for CMAB Mar 25, 2025
@raju-opti raju-opti marked this pull request as ready for review March 25, 2025 21:11
@raju-opti raju-opti requested a review from jaeopt March 25, 2025 21:11
@raju-opti raju-opti assigned jaeopt and unassigned raju-opti Mar 25, 2025
Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

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

Looks good! A couple of suggestions.
One thing we should consider is to split cmab changes into a separate PR (excluding UPSasync and related changes not relevant to CMAB and other SDKs), which will make it much easier to follow the reference.

Comment on lines +301 to +317
variation = variationId ? configObj.variationIdMap[variationId] : null;
if (!variation) {
this.logger?.debug(
USER_HAS_NO_VARIATION,
userId,
experimentKey,
);
decideReasons.push([
USER_HAS_NO_VARIATION,
userId,
experimentKey,
]);
return Value.of(op, {
result: {},
reasons: decideReasons,
});
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If this variationId-exist checking is for CMAB only, what about moving this check to CMAM decision?

reasons: decideReasons,
};
const cmabPromise = this.cmabService.getDecision(configObj, user, experiment.id, decideOptions).then(
(cmabDecision) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

We can move the variation validate stuff above to here?

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