Skip to content

Add more blocklist experiments #5789

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 1 commit into from
Apr 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import com.duckduckgo.anvil.annotations.ContributesRemoteFeature
import com.duckduckgo.app.di.AppCoroutineScope
import com.duckduckgo.app.trackerdetection.api.TrackerDataDownloader
import com.duckduckgo.app.trackerdetection.blocklist.BlockList.Companion.EXPERIMENT_PREFIX
import com.duckduckgo.app.trackerdetection.blocklist.ExperimentTestAA.Cohorts.CONTROL
import com.duckduckgo.common.utils.DispatcherProvider
import com.duckduckgo.di.scopes.AppScope
import com.duckduckgo.feature.toggles.api.ConversionWindow
Expand All @@ -47,37 +46,31 @@ interface BlockList {
fun self(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentBaseline(): Toggle
fun tdsNextExperimentBaselineBackup6(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentBaselineBackup(): Toggle
fun tdsNextExperimentBaselineBackup7(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentBaselineBackup2(): Toggle
fun tdsNextExperimentBaselineBackup8(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentBaselineBackup3(): Toggle
fun tdsNextExperimentBaselineBackup9(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentBaselineBackup4(): Toggle
fun tdsNextExperimentBaselineBackup10(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentBaselineBackup5(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentNov24(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentDec24(): Toggle
fun tdsNextExperimentMar25(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentJan25(): Toggle
fun tdsNextExperimentApr25(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentFeb25(): Toggle
fun tdsNextExperimentMay25(): Toggle

@Toggle.DefaultValue(false)
fun tdsNextExperimentMar25(): Toggle
fun tdsNextExperimentJun25(): Toggle

enum class Cohorts(override val cohortName: String) : CohortName {
CONTROL("control"),
Expand Down Expand Up @@ -123,12 +116,10 @@ class BlockListPrivacyConfigCallbackPlugin @Inject constructor(
private val inventory: FeatureTogglesInventory,
private val trackerDataDownloader: TrackerDataDownloader,
@AppCoroutineScope private val coroutineScope: CoroutineScope,
private val experimentAA: ExperimentTestAA,
private val dispatcherProvider: DispatcherProvider,
) : PrivacyConfigCallbackPlugin {
override fun onPrivacyConfigDownloaded() {
coroutineScope.launch(dispatcherProvider.io()) {
experimentAA.experimentTestAA().isEnabled(CONTROL)
if (inventory.activeTdsFlag() != null) {
trackerDataDownloader.downloadTds()
.subscribeOn(Schedulers.io())
Expand Down Expand Up @@ -156,20 +147,3 @@ suspend fun FeatureTogglesInventory.activeTdsFlag(): Toggle? {
it.featureName().name.startsWith(EXPERIMENT_PREFIX) && it.isEnabled()
}
}

@ContributesRemoteFeature(
scope = AppScope::class,
featureName = "experimentTest",
)
interface ExperimentTestAA {
@Toggle.DefaultValue(false)
fun self(): Toggle

@Toggle.DefaultValue(false)
fun experimentTestAA(): Toggle

enum class Cohorts(override val cohortName: String) : CohortName {
CONTROL("control"),
TREATMENT("treatment"),
}
}
Loading