Skip to content

Commit 71ddf94

Browse files
Bug 2045100 - Do not apply pending experiments after toggling experiment/rollout participation
Changing experiment or rollout participation already triggers an evolution based on the current set of cached experiments. Calling `applyLocalExperimentsOnThisThread()` does a second evolution, with the set of pending experiments. Additionally, these properties were calling `nimbusClient.set{Experiment,Rollout}Participation` instead of the Kotlin-based helpers `set{Experiment,Rollout}ParticipationOnThisThread` which are responsible for submitting telemetry. This has been corrected.
1 parent f2033b5 commit 71ddf94

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- Fixed a bug where enrollment change events were not emitted for rollouts that re-enrolled after previously unenrolling. ([#7391](https://github.com/mozilla/application-services/pull/7391/))
1313
- Attempting to opt-out from an experiment that is not currently enrolled is now a no-op. ([#7399](https://github.com/mozilla/application-services/pull/7399))
1414
- There are new separate DisqualifiedReason and NotEnrolledReason for global (experiment and rollout) opt-outs. ([#7400](https://github.com/mozilla/application-services/pull/7400))
15+
- Changing experiment and/or rollout participation no longer triggers a double update. Enrollment change telemetry is now appropriately triggered when this occurs. ([#7401](https://github.com/mozilla/application-services/pull/7401))
1516

1617
[Full Changelog](In progress)
1718

components/nimbus/android/src/main/java/org/mozilla/experiments/nimbus/Nimbus.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ open class Nimbus(
166166
set(active) {
167167
dbScope.launch {
168168
setExperimentParticipationOnThisThread(active)
169-
applyPendingExperimentsOnThisThread()
170169
}
171170
}
172171

@@ -175,7 +174,6 @@ open class Nimbus(
175174
set(active) {
176175
dbScope.launch {
177176
setRolloutParticipationOnThisThread(active)
178-
applyPendingExperimentsOnThisThread()
179177
}
180178
}
181179

0 commit comments

Comments
 (0)