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-10265] fix: UPS Lookup & Save during batched Decide #374

Closed

Conversation

mikechu-optimizely
Copy link
Contributor

Summary

  • User Profile Service should only Lookup and Save once when using DecideAll and DecideForKeys.

Test plan

  • Existing and new unit tests should pass
  • FSC should pass

Issues

  • FSSDK-10265

@mikechu-optimizely mikechu-optimizely marked this pull request as ready for review October 8, 2024 20:04
@mikechu-optimizely mikechu-optimizely requested a review from a team as a code owner October 8, 2024 20:04
@mikechu-optimizely mikechu-optimizely changed the title [FSSDK-10265] ups during batch decide [FSSDK-10265] fix: UPS Lookup & Save during batched Decide Oct 8, 2024
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.

It looks good!
I have a couple of suggestions for legacy API support and testing.

OptimizelySDK/Bucketing/DecisionService.cs Outdated Show resolved Hide resolved
OptimizelySDK/Bucketing/DecisionService.cs Outdated Show resolved Hide resolved
OptimizelySDK/Optimizely.cs Outdated Show resolved Hide resolved
OptimizelySDK.Tests/OptimizelyUserContextTest.cs Outdated Show resolved Hide resolved
userProfileServiceMock.Verify(l => l.Save(It.IsAny<Dictionary<string, object>>()),
Times.Once);
}

Copy link
Contributor

Choose a reason for hiding this comment

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

These tests look good. Wondering if we have tests covering the contents of the final UPS save call, combining all decisions in the session.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also have the similar coverage (lookup once - save once, the ups save contents) with legacy APIs (activate, getVariation) for regression?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added coverage of the final UPS Save as requested.

I'm researching the Activate and GetVariation tests where UPS is used.

Co-authored-by: Jae Kim <45045038+jaeopt@users.noreply.github.com>
@mikechu-optimizely mikechu-optimizely marked this pull request as draft October 17, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants