Bug 1356331 Remove hotfix from telemetry draft
authorAndrew Swan <aswan@mozilla.com>
Thu, 04 Jan 2018 14:16:56 -0800
changeset 749134 3a8694c8c2e5f19d0d4a24062454c147b8b9789a
parent 749120 217fc14405e78d47fb60888b9f3d0527d0c2709a
child 749135 5ec75351902ab56c19e6903e5a0456dda953c6bb
push id97321
push useraswan@mozilla.com
push dateTue, 30 Jan 2018 23:14:46 +0000
bugs1356331
milestone60.0a1
Bug 1356331 Remove hotfix from telemetry MozReview-Commit-ID: GmNhsQnZ8Mh
toolkit/components/telemetry/TelemetryEnvironment.jsm
toolkit/components/telemetry/docs/data/environment.rst
toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
--- a/toolkit/components/telemetry/TelemetryEnvironment.jsm
+++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm
@@ -263,17 +263,16 @@ const DEFAULT_ENVIRONMENT_PREFS = new Ma
 
 const LOGGER_NAME = "Toolkit.Telemetry";
 
 const PREF_BLOCKLIST_ENABLED = "extensions.blocklist.enabled";
 const PREF_DISTRIBUTION_ID = "distribution.id";
 const PREF_DISTRIBUTION_VERSION = "distribution.version";
 const PREF_DISTRIBUTOR = "app.distributor";
 const PREF_DISTRIBUTOR_CHANNEL = "app.distributor.channel";
-const PREF_HOTFIX_LASTVERSION = "extensions.hotfix.lastVersion";
 const PREF_APP_PARTNER_BRANCH = "app.partner.";
 const PREF_PARTNER_ID = "mozilla.partner.id";
 const PREF_UPDATE_ENABLED = "app.update.enabled";
 const PREF_UPDATE_AUTODOWNLOAD = "app.update.auto";
 const PREF_SEARCH_COHORT = "browser.search.cohort";
 
 const COMPOSITOR_CREATED_TOPIC = "compositor:created";
 const COMPOSITOR_PROCESS_ABORTED_TOPIC = "compositor:process-aborted";
@@ -1296,17 +1295,16 @@ EnvironmentCache.prototype = {
       applicationId: Services.appinfo.ID || null,
       applicationName: Services.appinfo.name || null,
       architecture: Services.sysinfo.get("arch"),
       buildId: Services.appinfo.appBuildID || null,
       version: Services.appinfo.version || null,
       vendor: Services.appinfo.vendor || null,
       platformVersion: Services.appinfo.platformVersion || null,
       xpcomAbi: Services.appinfo.XPCOMABI,
-      hotfixVersion: Services.prefs.getStringPref(PREF_HOTFIX_LASTVERSION, null),
       updaterAvailable: AppConstants.MOZ_UPDATER,
     };
 
     // Add |architecturesInBinary| only for Mac Universal builds.
     if ("@mozilla.org/xpcom/mac-utils;1" in Cc) {
       let macUtils = Cc["@mozilla.org/xpcom/mac-utils;1"].getService(Ci.nsIMacUtils);
       if (macUtils && macUtils.isUniversalBinary) {
         buildData.architecturesInBinary = macUtils.architecturesInBinary;
--- a/toolkit/components/telemetry/docs/data/environment.rst
+++ b/toolkit/components/telemetry/docs/data/environment.rst
@@ -26,17 +26,16 @@ Structure:
         applicationName: <string>, // "Firefox"
         architecture: <string>, // e.g. "x86", build architecture for the active build
         architecturesInBinary: <string>, // e.g. "i386-x86_64", from nsIMacUtils.architecturesInBinary, only present for mac universal builds
         buildId: <string>, // e.g. "20141126041045"
         version: <string>, // e.g. "35.0"
         vendor: <string>, // e.g. "Mozilla"
         platformVersion: <string>, // e.g. "35.0"
         xpcomAbi: <string>, // e.g. "x86-msvc"
-        hotfixVersion: <string>, // e.g. "20141211.01"
         updaterAvailable: <bool>, // Whether the app was built with app update available (MOZ_UPDATER)
       },
       settings: {
         addonCompatibilityCheckEnabled: <bool>, // Whether application compatibility is respected for add-ons
         blocklistEnabled: <bool>, // true on failure
         isDefaultBrowser: <bool>, // null on failure and until session restore completes, not available on Android
         defaultSearchEngine: <string>, // e.g. "yahoo"
         defaultSearchEngineData: {, // data about the current default engine
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEnvironment.js
@@ -33,17 +33,16 @@ var gHttpServer = null;
 var gHttpRoot = null;
 // The URL of the data directory, on the webserver.
 var gDataRoot = null;
 
 const PLATFORM_VERSION = "1.9.2";
 const APP_VERSION = "1";
 const APP_ID = "xpcshell@tests.mozilla.org";
 const APP_NAME = "XPCShell";
-const APP_HOTFIX_VERSION = "2.3.4a";
 
 const DISTRIBUTION_ID = "distributor-id";
 const DISTRIBUTION_VERSION = "4.5.6b";
 const DISTRIBUTOR_NAME = "Some Distributor";
 const DISTRIBUTOR_CHANNEL = "A Channel";
 const PARTNER_NAME = "test";
 const PARTNER_ID = "NicePartner-ID-3785";
 const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC = "distribution-customization-complete";
@@ -386,20 +385,18 @@ function checkBuildSection(data) {
 
   Assert.ok("build" in data, "There must be a build section in Environment.");
 
   for (let f in expectedInfo) {
     Assert.ok(checkString(data.build[f]), f + " must be a valid string.");
     Assert.equal(data.build[f], expectedInfo[f], f + " must have the correct value.");
   }
 
-  // Make sure architecture and hotfixVersion are in the environment.
+  // Make sure architecture is in the environment.
   Assert.ok(checkString(data.build.architecture));
-  Assert.ok(checkString(data.build.hotfixVersion));
-  Assert.equal(data.build.hotfixVersion, APP_HOTFIX_VERSION);
 
   if (gIsMac) {
     let macUtils = Cc["@mozilla.org/xpcom/mac-utils;1"].getService(Ci.nsIMacUtils);
     if (macUtils && macUtils.isUniversalBinary) {
       Assert.ok(checkString(data.build.architecturesInBinary));
     }
   }
 
@@ -905,19 +902,16 @@ add_task(async function setup() {
   gHttpServer = new HttpServer();
   gHttpServer.start(-1);
   let port = gHttpServer.identity.primaryPort;
   gHttpRoot = "http://localhost:" + port + "/";
   gDataRoot = gHttpRoot + "data/";
   gHttpServer.registerDirectory("/data/", do_get_cwd());
   registerCleanupFunction(() => gHttpServer.stop(() => {}));
 
-  // Spoof the the hotfixVersion
-  Preferences.set("extensions.hotfix.lastVersion", APP_HOTFIX_VERSION);
-
   // Allow non-multiprocessCompatible extensions
   Preferences.set("extensions.allow-non-mpc-extensions", true);
 
   // Create the attribution data file, so that settings.attribution will exist.
   // The attribution functionality only exists in Firefox.
   if (AppConstants.MOZ_BUILD_APP == "browser") {
     spoofAttributionData();
     registerCleanupFunction(cleanupAttributionData);