Backed out changeset 0636b7fabe33 (bug 1501659) for build bustages. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Fri, 09 Nov 2018 18:36:25 +0200
changeset 501878 948718214f0b2ec4c9d8b6fca73fbca50c211239
parent 501877 393308a8a29c848b93ecc1c5c1cd5970b26bded6
child 501879 bb493144227655b461d0e482f7e75b0e56ff20fc
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1501659
milestone65.0a1
backs out0636b7fabe334acc4f3203d670bddc19a20774ad
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 0636b7fabe33 (bug 1501659) for build bustages. CLOSED TREE
toolkit/components/telemetry/app/TelemetryController.jsm
toolkit/components/telemetry/build_scripts/gen_event_data.py
toolkit/components/telemetry/build_scripts/gen_scalar_data.py
toolkit/components/telemetry/tests/unit/test_TelemetryChildEvents_buildFaster.js
toolkit/components/telemetry/tests/unit/test_TelemetryEvents_buildFaster.js
toolkit/components/telemetry/tests/unit/test_TelemetryScalars_buildFaster.js
--- a/toolkit/components/telemetry/app/TelemetryController.jsm
+++ b/toolkit/components/telemetry/app/TelemetryController.jsm
@@ -1105,26 +1105,16 @@ var Impl = {
       });
     } catch (ex) {
       this._log.error(`registerScalarProbes - there was an error loading ${scalarProbeFilename}`,
                       ex);
     }
 
     // Register the builtin probes.
     for (let category in scalarJSProbes) {
-      // Expire the expired scalars
-      for (let name in scalarJSProbes[category]) {
-        let def = scalarJSProbes[category][name];
-        if (!def || !def.expires || def.expires == "never" || def.expires == "default") {
-          continue;
-        }
-        if (Services.vc.compare(AppConstants.MOZ_APP_VERSION, def.expires) >= 0) {
-          def.expired = true;
-        }
-      }
       Telemetry.registerBuiltinScalars(category, scalarJSProbes[category]);
     }
   },
 
   async registerEventProbes() {
     this._log.trace("registerEventProbes - registering builtin JS Event probes");
 
     // Load the event probes JSON file.
@@ -1135,21 +1125,12 @@ var Impl = {
       eventJSProbes = JSON.parse(fileContent);
     } catch (ex) {
       this._log.error(`registerEventProbes - there was an error loading ${eventProbeFilename}`,
                       ex);
     }
 
     // Register the builtin probes.
     for (let category in eventJSProbes) {
-      for (let name in eventJSProbes[category]) {
-        let def = eventJSProbes[category][name];
-        if (!def || !def.expires || def.expires == "never" || def.expires == "default") {
-          continue;
-        }
-        if (Services.vc.compare(AppConstants.MOZ_APP_VERSION, def.expires) >= 0) {
-          def.expired = true;
-        }
-      }
       Telemetry.registerBuiltinEvents(category, eventJSProbes[category]);
     }
   },
 };
--- a/toolkit/components/telemetry/build_scripts/gen_event_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_event_data.py
@@ -155,17 +155,16 @@ def generate_JSON_definitions(output, *f
 
         event_definitions[category][event.name] = OrderedDict({
             'methods': event.methods,
             'objects': event.objects,
             'extra_keys': event.extra_keys,
             'record_on_release': True if event.dataset_short == 'opt-out' else False,
             # We don't expire dynamic-builtin scalars: they're only meant for
             # use in local developer builds anyway. They will expire when rebuilding.
-            'expires': event.expiry_version,
             'expired': False,
         })
 
     json.dump(event_definitions, output)
 
 
 def main(output, *filenames):
     # Load the event data.
--- a/toolkit/components/telemetry/build_scripts/gen_scalar_data.py
+++ b/toolkit/components/telemetry/build_scripts/gen_scalar_data.py
@@ -142,17 +142,16 @@ def generate_JSON_definitions(output, *f
 
         scalar_definitions[category][scalar.name] = OrderedDict({
             'kind': scalar.nsITelemetry_kind,
             'keyed': scalar.keyed,
             'record_on_release': True if scalar.dataset_short == 'opt-out' else False,
             # We don't expire dynamic-builtin scalars: they're only meant for
             # use in local developer builds anyway. They will expire when rebuilding.
             'expired': False,
-            'expires': scalar.expires,
         })
 
     json.dump(scalar_definitions, output)
 
 
 def main(output, *filenames):
     # Load the scalars first.
     scalars = parse_scalar_definitions(filenames)
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryChildEvents_buildFaster.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryChildEvents_buildFaster.js
@@ -51,29 +51,23 @@ add_task(async function test_setup() {
   // Enable recording for the test event category.
 
   // Register some dynamic builtin test events.
   Telemetry.registerBuiltinEvents(TEST_EVENT_NAME, {
     "dynamic": {
       methods: ["dynamic", "child"],
       objects: ["builtin", "anotherone"],
     },
-    "dynamic_expired": {
-      methods: ["check"],
-      objects: ["expiry"],
-      expired: true,
-    },
   });
   Telemetry.setEventRecordingEnabled(TEST_STATIC_EVENT_NAME, true);
   Telemetry.setEventRecordingEnabled(TEST_EVENT_NAME, true);
 
   Telemetry.recordEvent(TEST_EVENT_NAME, "dynamic", "builtin");
   Telemetry.recordEvent(TEST_STATIC_EVENT_NAME, "main_and_content", "object1");
   Telemetry.recordEvent(TEST_EVENT_NAME, "dynamic", "anotherone");
-  Telemetry.recordEvent(TEST_EVENT_NAME, "check", "expiry");
 
   // Run test in child, don't wait for it to finish: just wait for the
   // MESSAGE_CHILD_TEST_DONE.
   run_test_in_child("test_TelemetryChildEvents_buildFaster.js");
   await do_await_remote_message(MESSAGE_CHILD_TEST_DONE);
 
   // Once events are set by the content process, they don't immediately get
   // sent to the parent process. Wait for the Telemetry IPC Timer to trigger
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryEvents_buildFaster.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryEvents_buildFaster.js
@@ -46,91 +46,59 @@ add_task({
   }, async function test_dynamicBuiltin() {
   const DYNAMIC_EVENT_SPEC =  {
     "telemetry.test.builtin": {
       "test": {
         "objects": [
           "object1",
           "object2",
         ],
-        "expires": "never",
+        "expired": false,
         "methods": [
           "test1",
           "test2",
         ],
         "extra_keys": [
           "key2",
           "key1",
         ],
         "record_on_release": false,
       },
     },
-    // Test a new, expired event
-    "telemetry.test.expired": {
-      "expired": {
-        "objects": ["object1"],
-        "methods": ["method1"],
-        "expires": AppConstants.MOZ_APP_VERSION,
-        "record_on_release": false,
-      },
-    },
-    // Test overwriting static expiries
-    "telemetry.test": {
-      "expired_version": {
-        "objects": ["object1"],
-        "methods": ["expired_version"],
-        "expires": "never",
-        "record_on_release": false,
-      },
-      "not_expired_optout": {
-        "objects": ["object1"],
-        "methods": ["not_expired_optout"],
-        "expires": AppConstants.MOZ_APP_VERSION,
-        "record_on_release": true,
-      },
-    },
   };
 
   Telemetry.clearEvents();
 
   // Let's write to the definition file to also cover the file
   // loading part.
   const FILE_PATH = getDefinitionsPath();
   await CommonUtils.writeJSON(DYNAMIC_EVENT_SPEC, FILE_PATH);
 
   // Start TelemetryController to trigger loading the specs.
   await TelemetryController.testReset();
   await TelemetryController.testPromiseJsProbeRegistration();
 
   // Record the events
   const TEST_EVENT_NAME = "telemetry.test.builtin";
-  const DYNAMIC_EVENT_CATEGORY = "telemetry.test.expired";
-  const STATIC_EVENT_CATEGORY = "telemetry.test";
   Telemetry.setEventRecordingEnabled(TEST_EVENT_NAME, true);
-  Telemetry.setEventRecordingEnabled(DYNAMIC_EVENT_CATEGORY, true);
-  Telemetry.setEventRecordingEnabled(STATIC_EVENT_CATEGORY, true);
   Telemetry.recordEvent(TEST_EVENT_NAME, "test1", "object1");
   Telemetry.recordEvent(TEST_EVENT_NAME, "test2", "object1", null,
                         {"key1": "foo", "key2": "bar"});
   Telemetry.recordEvent(TEST_EVENT_NAME, "test2", "object2", null,
                         {"key2": "bar"});
-  Telemetry.recordEvent(DYNAMIC_EVENT_CATEGORY, "method1", "object1");
-  Telemetry.recordEvent(STATIC_EVENT_CATEGORY, "expired_version", "object1");
-  Telemetry.recordEvent(STATIC_EVENT_CATEGORY, "not_expired_optout", "object1");
 
   // Check the values we tried to store.
   const snapshot =
     Telemetry.snapshotEvents(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, false);
   Assert.ok(("parent" in snapshot), "Should have parent events in the snapshot.");
 
   let expected = [
     [TEST_EVENT_NAME, "test1", "object1"],
     [TEST_EVENT_NAME, "test2", "object1", null, {key1: "foo", key2: "bar"}],
     [TEST_EVENT_NAME, "test2", "object2", null, {key2: "bar"}],
-    [STATIC_EVENT_CATEGORY, "expired_version", "object1"],
   ];
   let events = snapshot.parent;
   Assert.equal(events.length, expected.length, "Should have recorded the right amount of events.");
   for (let i = 0; i < expected.length; ++i) {
     Assert.deepEqual(events[i].slice(1), expected[i],
                      "Should have recorded the expected event data.");
   }
 
--- a/toolkit/components/telemetry/tests/unit/test_TelemetryScalars_buildFaster.js
+++ b/toolkit/components/telemetry/tests/unit/test_TelemetryScalars_buildFaster.js
@@ -48,29 +48,23 @@ add_task({
     // The test needs to write a file, and that fails in tests on Android.
     // We don't really need the Android coverage, so skip on Android.
     skip_if: () => AppConstants.platform == "android",
   }, async function test_dynamicBuiltin() {
   const DYNAMIC_SCALAR_SPEC =  {
     "telemetry.test": {
       "builtin_dynamic": {
         "kind": "nsITelemetry::SCALAR_TYPE_COUNT",
-        "expires": "never",
+        "expired": false,
         "record_on_release": false,
         "keyed": false,
       },
       "builtin_dynamic_other": {
         "kind": "nsITelemetry::SCALAR_TYPE_BOOLEAN",
-        "expires": "never",
-        "record_on_release": false,
-        "keyed": false,
-      },
-      "builtin_dynamic_expired": {
-        "kind": "nsITelemetry::SCALAR_TYPE_BOOLEAN",
-        "expires": AppConstants.MOZ_APP_VERSION,
+        "expired": false,
         "record_on_release": false,
         "keyed": false,
       },
     },
   };
 
   Telemetry.clearScalars();
 
@@ -81,20 +75,18 @@ add_task({
 
   // Start TelemetryController to trigger loading the specs.
   await TelemetryController.testReset();
   await TelemetryController.testPromiseJsProbeRegistration();
 
   // Store to that scalar.
   const TEST_SCALAR1 = "telemetry.test.builtin_dynamic";
   const TEST_SCALAR2 = "telemetry.test.builtin_dynamic_other";
-  const TEST_SCALAR3 = "telemetry.test.builtin_dynamic_expired";
   Telemetry.scalarSet(TEST_SCALAR1, 3785);
   Telemetry.scalarSet(TEST_SCALAR2, true);
-  Telemetry.scalarSet(TEST_SCALAR3, true);
 
   // Check the values we tried to store.
   const scalars = Telemetry.getSnapshotForScalars("main", false).parent;
 
   // Check that they are serialized to the correct format.
   Assert.equal(typeof(scalars[TEST_SCALAR1]), "number",
                TEST_SCALAR1 + " must be serialized to the correct format.");
   Assert.ok(Number.isInteger(scalars[TEST_SCALAR1]),