Skip to content

[FSSDK-8475] ODP Integration for Optimizely Client and User Context (Browser) #799

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

Merged
merged 7 commits into from
Mar 9, 2023

Conversation

opti-jnguyen
Copy link
Contributor

Summary

  • This PR integrates ODP with the Optimizely Client and User Context classes, allowing users to interface with ODP through the browser variant of the JavaScript Optimizely SDK.
  • This PR includes additional tweaks and revisions to past naming and styling choices and builds on top of some previous features, such as including a localStorage fallback mechanism for non-browser environments.

Test plan

  • Manual testing, ensuring all previous tests also pass as well as new unit tests.
  • Fix all tests that break as a result of these new changes.
  • Tests in-flight will be resolved and additional tests will be added through the review process and beyond.

Issues

@opti-jnguyen
Copy link
Contributor Author

Note: Putting this out for fast-track review and iteration despite some gaps in flight (such as TODO tests).

@jaeopt / @mikechu-optimizely, if you could give this a look and an initial round of review, it'd be much appreciated - thank you in advance!

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.

A good start!
Reviewed at the top level only and added a few major suggestions.

@coveralls
Copy link

coveralls commented Mar 3, 2023

Coverage Status

Coverage: 90.117%. Remained the same when pulling 1c734b6 on jnguyen/odp-integration into 0116d75 on master.

@opti-jnguyen opti-jnguyen requested a review from jaeopt March 3, 2023 16:35
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.

A few more suggestions. Let's discuss about top-level interface.

Copy link
Contributor

@mikechu-optimizely mikechu-optimizely left a comment

Choose a reason for hiding this comment

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

LGTM, but I'll continue to help refine if more commits are added.

@opti-jnguyen opti-jnguyen requested a review from jaeopt March 8, 2023 21:56
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!
One remaining concern is to support all options for ODPManager.createInstance. See my comments and let's discuss.

}),
segmentManager: odpOptions.segmentManager,
eventManager: odpOptions.eventManager,
logger,
Copy link
Contributor

Choose a reason for hiding this comment

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

How can we pass down other options like segmentApiTimeout, eventApiTimeout, or eventFlushInterval?
We can passdown instance of requestHandler with apiTimeout values, but wondering how we can support other configs like eventFlushInterval or future options.

Copy link
Contributor

Choose a reason for hiding this comment

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

I can add these extra options in a separate PR. I do not see a clean solution to support eventFlushInterval and future options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jaeopt - thanks! Yeah, it's looking like it might get a bit clunky for those additions and beyond. Let's chat tomorrow.

Copy link
Contributor

Choose a reason for hiding this comment

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

@opti-jnguyen as discussed, let's move this refactoring to a separate PR. I'll approve this as is.

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.

We'll move remaining work for refactoring discussed into a separate PR.
Approved as is.

@opti-jnguyen
Copy link
Contributor Author

Merging without FSC passing - will work on failing FSC tests at a later date.

@opti-jnguyen opti-jnguyen merged commit 7808c73 into master Mar 9, 2023
@opti-jnguyen opti-jnguyen deleted the jnguyen/odp-integration branch March 9, 2023 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants