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

implement experiment manager #1066

Merged
merged 19 commits into from
Nov 12, 2024
Merged

Conversation

SabrinaTardio
Copy link
Contributor

@SabrinaTardio SabrinaTardio commented Nov 8, 2024

Please review the release process for BrowserServicesKit here.

Required:

Task/Issue URL: https://app.asana.com/0/1204186595873227/1208687542689224/f
iOS PR: duckduckgo/macos-browser#3531
macOS PR: duckduckgo/macos-browser#3531
What kind of version bump will this require?: Minor

Optional:

Tech Design URL: https://app.asana.com/0/481882893211075/1208680035673275/f
CC:

Description: Implements the ExperimentCohortManager according to the TechDesign

Steps to test this PR:

  1. Check tests are green
  2. No PrivacyConfig Errors in the clients

OS Testing:

  • iOS 14
  • iOS 15
  • iOS 16
  • macOS 10.15
  • macOS 11
  • macOS 12

Internal references:

Software Engineering Expectations
Technical Design Template

@SabrinaTardio SabrinaTardio marked this pull request as ready for review November 8, 2024 12:33
@jaceklyp
Copy link
Contributor

jaceklyp commented Nov 8, 2024

Hey @SabrinaTardio, Before I start actually reviewing it, one thing that stands out to me is unnecessarily coupling with UserDefaults - hence we need to mock them in unit tests. Can we instead just protocolize Storing, and so the implementation of storing uses UserDefaults for real life cases and in tests we use in-memory storage. Please see the implementation of UserBehaviorMonitor + UserBehaviorMonitorTests in BSK or BrokenSitePromptLimiter + BrokenSitePromptLimiterTests.

@SabrinaTardio
Copy link
Contributor Author

Hey @SabrinaTardio, Before I start actually reviewing it, one thing that stands out to me is unnecessarily coupling with UserDefaults - hence we need to mock them in unit tests. Can we instead just protocolize Storing, and so the implementation of storing uses UserDefaults for real life cases and in tests we use in-memory storage. Please see the implementation of UserBehaviorMonitor + UserBehaviorMonitorTests in BSK or BrokenSitePromptLimiter + BrokenSitePromptLimiterTests.

I thought about it but seemed a bit of an overkill since we can still test but happy to add a Storing class… I was in two minds anyway

Copy link
Contributor

@jaceklyp jaceklyp left a comment

Choose a reason for hiding this comment

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

LGTM

@SabrinaTardio SabrinaTardio merged commit e40bba1 into main Nov 12, 2024
7 checks passed
@SabrinaTardio SabrinaTardio deleted the sabrina/add-experiment-manager branch November 12, 2024 15:58
samsymons added a commit that referenced this pull request Nov 13, 2024
* main:
  implement experiment manager (#1066)
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.

2 participants