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 event manager #403

Merged
merged 18 commits into from
Sep 2, 2022

Conversation

andrewleap-optimizely
Copy link
Contributor

Summary

OdpEventManager provides internal services for sending ODP events to the ODP server.

  • adds default values to identifiers and data fields for all events.
  • stores requested events if they cannot be sent to the server.
  • stored events are dispatched when resources are available.

Test plan

  • added test_odp_event_manager.py

Ticket

OASIS-8442

@andrewleap-optimizely andrewleap-optimizely marked this pull request as ready for review August 23, 2022 15:07
@andrewleap-optimizely andrewleap-optimizely requested a review from a team as a code owner August 23, 2022 15:07
optimizely/odp/odp_event_manager.py Show resolved Hide resolved
tests/test_odp_event_manager.py Outdated Show resolved Hide resolved
tests/test_odp_event_manager.py Outdated Show resolved Hide resolved
tests/test_odp_event_manager.py 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 few changes suggested.
Also let's discuss how we should handle events with odpConfig lifecycle.

optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
tests/test_odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
tests/test_odp_event_manager.py Outdated 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.

Looks good to me. Pretty complex PR.
Made a comment about the name CopyingMock class.

tests/base.py 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 few changes suggested.

optimizely/helpers/enums.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Show resolved Hide resolved
tests/test_odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
tests/test_odp_event_manager.py 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.

All changes look good.
I found one more case to discuss to clarify.

optimizely/helpers/enums.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py Outdated Show resolved Hide resolved
optimizely/odp/odp_event_manager.py 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

@andrewleap-optimizely andrewleap-optimizely merged commit de849d2 into master Sep 2, 2022
@andrewleap-optimizely andrewleap-optimizely deleted the aleap/add_odp_event_manager branch September 2, 2022 15:54
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