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-10765] enhancement: Implement UPS request batching for decideForKeys #353

Merged
merged 19 commits into from
Jan 9, 2025

Conversation

FarhanAnjum-opti
Copy link
Contributor

@FarhanAnjum-opti FarhanAnjum-opti commented Dec 9, 2024

Summary

  • Currently, decideForKeys loops over the list of flags and calls decide for each, which in turn calls ups. So for decideForKeys, there is two calls per flag to UPS. This PR batches UPS calls when using decideForKeys.

Test plan

  • Existing tests are updated to work with the new change. New tests will be added for batching.

Issues

lib/optimizely.rb -> Updated decide_for_keys method
lib/optimizely.rb -> Enhanced decision-making logic
lib/optimizely.rb -> Integrated UserProfileTracker usage
lib/optimizely.rb -> Refined decision reasons handling
lib/optimizely/user_profile_tracker.rb -> New user profile tracker class
lib/optimizely/decision_service.rb -> Added user profile tracker usage
lib/optimizely/decision_service.rb -> Clarified handling of user profiles
lib/optimizely/user_profile_tracker.rb -> Fixed user ID reference in error
spec/decision_service_spec.rb -> Adjusted tests for user profile tracker
lib/optimizely/user_profile_tracker.rb -> Improved user profile lookup handling
spec/project_spec.rb -> Updated mocks for decision service calls
…stantiation.

lib/optimizely/user_profile_tracker.rb -> Improved error logging message.
spec/decision_service_spec.rb -> Refactored user profile tracking in tests.
spec/project_spec.rb -> Updated decision service method stubs.
spec/user_profile_tracker.rb -> Updated lookup, update and save tests for user_profile_tracker
Copy link
Contributor

@Mat001 Mat001 left a comment

Choose a reason for hiding this comment

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

lgtm

@FarhanAnjum-opti FarhanAnjum-opti merged commit 69b2453 into master Jan 9, 2025
9 checks passed
@FarhanAnjum-opti FarhanAnjum-opti deleted the farhan/FSSDK-10765-batch-UPS branch January 9, 2025 19:53
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