Closed Bug 1470208 Opened 6 years ago Closed 6 years ago

Add an explicit automated test for the telemetry histogram related to the storage.local data migration failures

Categories

(WebExtensions :: Storage, enhancement, P3)

enhancement

Tracking

(firefox63 fixed)

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: rpl, Assigned: rpl)

References

Details

Attachments

(1 file)

In Bug 1465129 we are adding a telemetry histogram to keep an eye on the outcome of the storage.local data migrations, the patch contains automated tests for checking that the "success" category is incremented in the new histogram when a migration is completed and the IDB backend is being enabled, but there is currently no automated test for the "failure" category.

I've a test locally for testing the "failure" scenario, but it is not yet part of that patch mostly because I'm not really happy about the way that "failure" scenario is triggered in that test and I'd like to find a better way to trigger it.

In the meantime I'm going to attach to this bugzilla issue the version of the test that I'm running locally.
Depends on: 1465129
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Priority: -- → P3
Depends on: 1470213
Comment on attachment 8986827 [details]
Bug 1470208 - Add an automated test for the telemetry collected on storage.local data migration failures.

https://reviewboard.mozilla.org/r/252072/#review258708

::: toolkit/components/extensions/test/xpcshell/test_ext_storage_idb_data_migration.js:253
(Diff revision 2)
> +  assertTelemetryAddonDetails(EXTENSION_ID, {
> +    backend: "JSONFile",
> +    dataMigrateError: "DataCloneError: The object could not be cloned.",
> +  });
> +
> +  await extension.unload();
> +
> +  assertMigrationHistogramCount("success", 0);
> +  assertMigrationHistogramCount("failure", 1);
> +});

This additional test case verify that the collected per-addon details (backend and the last data migration error message) are the expected one and that the failure category of the data migration histogram is incremented when a data migration fails.
Attachment #8986827 - Flags: review?(mixedpuppy)
Comment on attachment 8986827 [details]
Bug 1470208 - Add an automated test for the telemetry collected on storage.local data migration failures.

https://reviewboard.mozilla.org/r/252074/#review260454


Code analysis found 1 defect in this patch:
 - 1 defect found by mozlint

You can run this analysis locally with:
 - `./mach lint path/to/file` (JS/Python)


If you see a problem in this automated review, please report it here: http://bit.ly/2y9N9Vx


::: toolkit/components/extensions/test/xpcshell/test_ext_storage_idb_data_migration.js:15
(Diff revision 5)
>  ChromeUtils.import("resource://gre/modules/TelemetryController.jsm");
>  
>  const {
>    ExtensionStorageIDB,
>    DataMigrationTelemetry,
>  } = ChromeUtils.import("resource://gre/modules/ExtensionStorageIDB.jsm");

Error: Cu.import imports into variables and into global scope. [eslint: mozilla/no-import-into-var-and-global]
Comment on attachment 8986827 [details]
Bug 1470208 - Add an automated test for the telemetry collected on storage.local data migration failures.

https://reviewboard.mozilla.org/r/252074/#review263184
Attachment #8986827 - Flags: review?(mixedpuppy) → review+
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/aeb7d06d9638
Add an automated test for the telemetry collected on storage.local data migration failures. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/aeb7d06d9638
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Flags: qe-verify-
Depends on: 1481485
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: