← 输入框|github.com|刷新
Skip to content

feat: add odp manager - #405

Merged
Andy Leap (andrewleap-optimizely) merged 20 commits into
masterfrom
mpirnovar/odp_manager
Sep 21, 2022
Merged

Andy Leap (andrewleap-optimizely) merged 20 commits into
masterfrom
mpirnovar/odp_manager

Conversation

@Mat001

Copy link
Copy Markdown
Contributor

Summary

  • Integrate OdpSegmentManager, OdpEventmanager and OdpConfig into OdpManager
  • Add unit tests
  • acceptance criteria in the linked story below

Test plan

  • added unit tests, mypy type checking, linting

Issues

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good! Appreciate the thorough tests. Just a few suggestions/changes requested

Comment thread optimizely/odp/odp_event_manager.py Resolved
Comment thread optimizely/helpers/enums.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved
Comment thread optimizely/helpers/enums.py Resolved

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good! A few changes and clarifications suggested.

Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looking good! One more small fix.

Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All changes look good! A couple of more clarifications.

Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread optimizely/odp/odp_manager.py Outdated
segment_manager.odp_config = self.odp_config
self.segment_manager = segment_manager
else:
self.segment_manager = OdpSegmentManager(self.odp_config,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we consider removing odp_config from the constructor params? It should be overriden for custom segment-manager anyway? Let's talk about it when integrating at the top level.

Comment thread optimizely/odp/odp_manager.py Resolved
Comment thread tests/test_odp_manager.py Resolved

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I see an error in cache timeout.

Comment thread optimizely/helpers/enums.py Resolved
Comment thread optimizely/odp/odp_manager.py Resolved
return
if self.odp_config.odp_state() == OdpConfigState.NOT_INTEGRATED:
self.logger.debug('ODP Identify event is not dispatched (ODP not integrated).')
self.logger.debug('ODP identify event is not dispatched (ODP not integrated).')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Line 107-114, send_event raises multiple exceptions. They should be processed separately at the top level. We can discuss again when integrated.

@jaeopt Jae Kim (jaeopt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM with a nit

Comment thread tests/test_odp_manager.py Resolved

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@andrewleap-optimizely Andy Leap (andrewleap-optimizely) changed the title Mpirnovar/odp manager feat: add odp manager Sep 21, 2022
@andrewleap-optimizely
Andy Leap (andrewleap-optimizely) deleted the mpirnovar/odp_manager branch September 21, 2022 15: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.

3 participants