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

feat: add odp to project and user context #316

Merged
merged 22 commits into from
Oct 13, 2022

Conversation

andrewleap-optimizely
Copy link
Contributor

Summary

OptimizelyUserContext

  • fetch_qualified_segments()
  • qualified_segments { get/set }

Optimizely::Project

  • send_odp_event()
  • sdk_settings
    • disable_odp
    • segments_cache_size
    • segments_cache_timeout
  • updates odp_config when datafile is updated
  • close()
    • flushes ODP event queue

Test plan

Fixed existing tests and added tests to:

  • project_spec,rb
  • optimizely_user_context_spec.rb

Ticket

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 great! We need to discuss a few open issues. See my comments.

lib/optimizely/optimizely_user_context.rb Show resolved Hide resolved
lib/optimizely/optimizely_user_context.rb Outdated Show resolved Hide resolved
lib/optimizely/optimizely_user_context.rb Outdated Show resolved Hide resolved
lib/optimizely/optimizely_user_context.rb Outdated Show resolved Hide resolved
lib/optimizely.rb Outdated Show resolved Hide resolved
lib/optimizely/optimizely_user_context.rb Outdated Show resolved Hide resolved
lib/optimizely.rb Outdated Show resolved Hide resolved
spec/decision_service_spec.rb Outdated Show resolved Hide resolved
spec/project_spec.rb Outdated Show resolved Hide resolved
spec/project_spec.rb Show resolved Hide resolved
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.

lib/optimizely/optimizely_user_context.rb Outdated Show resolved Hide resolved
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 customization support we need to discuss.

lib/optimizely.rb Outdated Show resolved Hide resolved
lib/optimizely.rb Outdated Show resolved Hide resolved
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 great! A small change suggested and a couple of issues to discuss.

lib/optimizely/odp/odp_config.rb Outdated Show resolved Hide resolved
lib/optimizely/optimizely_user_context.rb Outdated Show resolved Hide resolved
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.

This solution looks good! One more clean up suggested.

lib/optimizely/optimizely_user_context.rb Show resolved Hide resolved
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.

LGTM

Copy link
Contributor

@zashraf1985 zashraf1985 left a comment

Choose a reason for hiding this comment

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

Looks Great! I have a few questions that i have added as review comments

lib/optimizely/helpers/sdk_settings.rb Outdated Show resolved Hide resolved
lib/optimizely.rb Show resolved Hide resolved
lib/optimizely.rb Show resolved Hide resolved
lib/optimizely.rb Outdated Show resolved Hide resolved
lib/optimizely/odp/odp_manager.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@zashraf1985 zashraf1985 left a comment

Choose a reason for hiding this comment

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

Looks Great!

Comment on lines +136 to +141

if @event_manager.running?
@event_manager.update_config
elsif @odp_config.odp_state == ODP_CONFIG_STATE[:INTEGRATED]
@event_manager.start!(@odp_config)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

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.

LGTM

@andrewleap-optimizely andrewleap-optimizely merged commit 554bb91 into master Oct 13, 2022
@andrewleap-optimizely andrewleap-optimizely deleted the aleap/add_odp_to_client_and_user_context branch October 13, 2022 18:01
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.

4 participants