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

Allow users to opt-out from Nimbus rollouts #4807

Merged
merged 2 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions CHANGES_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ Use the template below to make assigning a version number during the release cut
- Description of the change with a link to the pull request ([#0000](https://github.com/mozilla/application-services/pull/0000))

-->
## Nimbus
### What's fixed
- Fixes a bug where disabling studies did not disable rollouts. ([#4807](https://github.com/mozilla/application-services/pull/4807))
9 changes: 6 additions & 3 deletions components/nimbus/src/enrollment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,9 +625,12 @@ impl<'a> EnrollmentsEvolver<'a> {
);
let next_rollouts = filter_experiments(next_experiments, Experiment::is_rollout);

// NB: Experiments require a lack of opt-out, but rollouts do not, so we set `is_user_participating` to `true`.
let (next_ro_enrollments, ro_events) =
self.evolve_enrollment_recipes(true, &prev_rollouts, &next_rollouts, &ro_enrollments)?;
let (next_ro_enrollments, ro_events) = self.evolve_enrollment_recipes(
is_user_participating,
&prev_rollouts,
&next_rollouts,
&ro_enrollments,
)?;

enrollments.extend(next_ro_enrollments.into_iter());
events.extend(ro_events.into_iter());
Expand Down