Bug 1351425 - Only temp. qualify for e10s when enabled at <100%. r=Felipe draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Tue, 28 Mar 2017 16:22:23 -0500
changeset 552705 2a663eda5216d85e76b2e2331876eae8e24ba7e0
parent 552691 272ce6c2572164f5f6a9fba2a980ba9ccf50770c
child 552706 d48fa9f75677ce8d0e9d65d13a36d845a4663041
push id51428
push userbmo:jryans@gmail.com
push dateTue, 28 Mar 2017 21:26:19 +0000
reviewersFelipe
bugs1351425
milestone55.0a1
Bug 1351425 - Only temp. qualify for e10s when enabled at <100%. r=Felipe This tweaks the temporary qualification step (currently used only for DevTools) so that it does not apply on channels that are 100% enabled anyway. This does not change how many users receive e10s on, it only tweaks who falls into which cohort, since there's no reason to push all DevTools users to a special cohort if everyone would have received e10s on anyway. MozReview-Commit-ID: 5Yn6M50Ny1w
browser/extensions/e10srollout/bootstrap.js
--- a/browser/extensions/e10srollout/bootstrap.js
+++ b/browser/extensions/e10srollout/bootstrap.js
@@ -79,17 +79,18 @@ function defineCohort() {
                     );
   } else {
     Preferences.reset(PREF_E10S_ADDON_POLICY);
   }
 
   let userOptedOut = optedOut();
   let userOptedIn = optedIn();
   let disqualified = (Services.appinfo.multiprocessBlockPolicy != 0);
-  let testGroup = (getUserSample() < TEST_THRESHOLD[updateChannel]);
+  let testThreshold = TEST_THRESHOLD[updateChannel];
+  let testGroup = (getUserSample() < testThreshold);
   let hasNonExemptAddon = Preferences.get(PREF_E10S_HAS_NONEXEMPT_ADDON, false);
   let temporaryDisqualification = getTemporaryDisqualification();
   let temporaryQualification = getTemporaryQualification();
 
   let cohortPrefix = "";
   if (disqualified) {
     cohortPrefix = "disqualified-";
   } else if (hasNonExemptAddon) {
@@ -106,17 +107,21 @@ function defineCohort() {
     // still be denied by the backend, which is useful so that the E10S_STATUS
     // telemetry probe can be correctly set.
 
     // For these volatile disqualification reasons, however, we must not try
     // to activate e10s because the backend doesn't know about it. E10S_STATUS
     // here will be accumulated as "2 - Disabled", which is fine too.
     setCohort(`temp-disqualified-${temporaryDisqualification}`);
     Preferences.reset(PREF_TOGGLE_E10S);
-  } else if (!disqualified && temporaryQualification != "") {
+  } else if (!disqualified && testThreshold < 1.0 &&
+             temporaryQualification != "") {
+    // Users who are qualified for e10s and on channels where some population
+    // would not receive e10s can be pushed into e10s anyway via a temporary
+    // qualification which overrides the user sample value when non-empty.
     setCohort(`temp-qualified-${temporaryQualification}`);
     Preferences.set(PREF_TOGGLE_E10S, true);
   } else if (testGroup) {
     setCohort(`${cohortPrefix}test`);
     Preferences.set(PREF_TOGGLE_E10S, true);
   } else {
     setCohort(`${cohortPrefix}control`);
     Preferences.reset(PREF_TOGGLE_E10S);