-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix: block odp methods on datafile #419
fix: block odp methods on datafile #419
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - a clarification
optimizely/optimizely.py
Outdated
if not self.odp_manager.enabled: | ||
self.logger.debug('ODP identify event is not dispatched (ODP disabled).') | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is checked in odp_manager. Do we need to check here again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows create_user_context
to remain non-blocking if odp is disabled. Seems like a worthwhile optimization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrewleap-optimizely I see. Probably not in server sdks. They'll be blocked anyway in following decide call even if avoid it here :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Tested fetch without calling opti config.
Summary
Optimizely._identify
,Optimizely._fetch_qualified_segments
andOptimizely.send_odp_event
to ensure datafile has been downloaded before attempting to make odp requests.Test plan
all existing tests pass