Closed Bug 826580 Opened 7 years ago Closed 7 years ago

Capture application version history

Categories

(Firefox Health Report Graveyard :: Client: Desktop, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 20

People

(Reporter: gps, Assigned: gps)

References

Details

Attachments

(1 file, 1 obsolete file)

We need a probe that records history of application version changes. Essentially we need a new entry in a daily field containing the version.
Attached patch Capture application versions, v1 (obsolete) — Splinter Review
It definitely needs more test coverage.
Assignee: nobody → gps
Status: NEW → ASSIGNED
Attachment #697765 - Flags: feedback?(rnewman)
Comment on attachment 697765 [details] [diff] [review]
Capture application versions, v1

Review of attachment 697765 [details] [diff] [review]:
-----------------------------------------------------------------

::: services/healthreport/providers.jsm
@@ +146,5 @@
> +    let currentVersion = ai.version;
> +    let lastVersion = yield this.getState("lastVersion");
> +
> +    if (currentVersion == lastVersion) {
> +      return;

OK, so we don't record a daily measurement if the version is the same. We also don't record one if we fail to fetch Services.appinfo. Can we please distinguish these two states?

It seems like setting a sentinel value in the failure case would be the simplest approach….

::: services/healthreport/tests/xpcshell/test_provider_appinfo.js
@@ +61,5 @@
> +  do_check_true(day.has("version"));
> +  let value = day.get("version");
> +  do_check_true(Array.isArray(value));
> +  do_check_eq(value.length, 1);
> +

Check that the version is the same one you retrieve from Services.appinfo.
Attachment #697765 - Flags: feedback?(rnewman) → feedback+
Attachment #697765 - Attachment is obsolete: true
Attachment #698351 - Flags: review?(rnewman)
Comment on attachment 698351 [details] [diff] [review]
Capture application versions, v2

Review of attachment 698351 [details] [diff] [review]:
-----------------------------------------------------------------

::: services/healthreport/providers.jsm
@@ +124,5 @@
> +    return Task.spawn(this._onInit.bind(this));
> +  },
> +
> +  _onInit: function () {
> +    // Serviecs.appInfo should always be defined for any reasonably behaving

s/Serviecs/Services
Attachment #698351 - Flags: review?(rnewman) → review+
https://hg.mozilla.org/mozilla-central/rev/d4ce01fb6255
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [fixed in services]
Target Milestone: --- → mozilla20
Component: Metrics and Firefox Health Report → Client: Desktop
Product: Mozilla Services → Firefox Health Report
Target Milestone: mozilla20 → Firefox 20
Product: Firefox Health Report → Firefox Health Report Graveyard
You need to log in before you can comment on or make changes to this bug.