Update the profile migrator to FHR/Telemetry changes

RESOLVED FIXED in Firefox 46

Status

()

Toolkit
Telemetry
P1
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: gfritzsche, Assigned: gfritzsche)

Tracking

Trunk
mozilla46
Points:
2
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

(Whiteboard: [measurement:client])

Attachments

(2 attachments, 2 obsolete attachments)

(Assignee)

Description

2 years ago
The FHR profile migrator code is here:
https://dxr.mozilla.org/mozilla-central/rev/388bdc46ba51ee31da8b8abe977e0ca38d117434/browser/components/migration/FirefoxProfileMigrator.js#189

We need to:
* drop healthreport.sqlite & healthreport/ migration
* Add Telemetry to the profile migration:
  * migrate: datareporting/state.json, datareporting/session-state.json, datareporting/aborted-session-ping, saved-telemetry-pings
  * compat migration: healthreport/state.json
  * drop datareporting/archived
(Assignee)

Updated

2 years ago
Assignee: nobody → gfritzsche
(Assignee)

Updated

2 years ago
Depends on: 1239753
(Assignee)

Comment 1

2 years ago
Created attachment 8708457 [details] [diff] [review]
Update the profile migrator to the Unified Telemetry changes

This drops the old FHR migrations and specifically migrates 1) datareporting/state.json & session-state.json for the client id & session details as well as 2) healthreport/state.json as a fallback to migrate old client ids.
Attachment #8708457 - Flags: review?(MattN+bmo)
(Assignee)

Comment 2

2 years ago
Created attachment 8708458 [details] [diff] [review]
Update the profile migrator to the Unified Telemetry changes

This drops the old FHR migrations and specifically migrates 1) datareporting/state.json & session-state.json for the client id & session details as well as 2) healthreport/state.json as a fallback to migrate old client ids.
Attachment #8708458 - Flags: review?(MattN+bmo)
(Assignee)

Updated

2 years ago
Attachment #8708457 - Attachment is obsolete: true
Attachment #8708457 - Flags: review?(MattN+bmo)
Comment on attachment 8708458 [details] [diff] [review]
Update the profile migrator to the Unified Telemetry changes

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

I *think* it should be fairly straightforward to create a unit test for this like the other tests that use registerFakePath: https://mxr.mozilla.org/mozilla-central/search?find=%2Fbrowser%2Fcomponents%2Fmigration%2Ftests%2Funit%2F&string=registerFakePath

::: browser/components/migration/FirefoxProfileMigrator.js
@@ +220,5 @@
> +        if (subdir && subdir.isDirectory()) {
> +          let stateFile = this._getFileObject(subdir, "state.json");
> +          if (stateFile) {
> +            let dest = createSubDir("healthreport");
> +            stateFile.copyTo(dest, "");

I guess we will still look at healthreport/state.json in some cases?
Attachment #8708458 - Flags: review?(MattN+bmo) → review+
(Assignee)

Comment 4

2 years ago
(In reply to Matthew N. [:MattN] from comment #3)
> Comment on attachment 8708458 [details] [diff] [review]
> Update the profile migrator to the Unified Telemetry changes
> 
> Review of attachment 8708458 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I *think* it should be fairly straightforward to create a unit test for this
> like the other tests that use registerFakePath:
> https://mxr.mozilla.org/mozilla-central/
> search?find=%2Fbrowser%2Fcomponents%2Fmigration%2Ftests%2Funit%2F&string=regi
> sterFakePath

Ah, i actually found test_fx_fhr.js now, updating that.

> ::: browser/components/migration/FirefoxProfileMigrator.js
> @@ +220,5 @@
> > +        if (subdir && subdir.isDirectory()) {
> > +          let stateFile = this._getFileObject(subdir, "state.json");
> > +          if (stateFile) {
> > +            let dest = createSubDir("healthreport");
> > +            stateFile.copyTo(dest, "");
> 
> I guess we will still look at healthreport/state.json in some cases?

It should we an edge-case - we import from that old healthreport/state.json if we don't have datareporting/state.json yet.
If you migrate a profile before that import happened we'd lose the old client id, so i'd rather be careful here.
Presumably we can drop this in the future.
(Assignee)

Comment 5

2 years ago
Created attachment 8709052 [details] [diff] [review]
Update the profile migrator to the Unified Telemetry changes
(Assignee)

Updated

2 years ago
Attachment #8708458 - Attachment is obsolete: true
(Assignee)

Comment 6

2 years ago
Created attachment 8709053 [details] [diff] [review]
Update tests to cover Telemetry profile migrator
Attachment #8709053 - Flags: review?(MattN+bmo)
(Assignee)

Updated

2 years ago
Attachment #8709052 - Flags: review+
(Assignee)

Comment 7

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6fe0494d9ed2
Attachment #8709053 - Flags: review?(MattN+bmo) → review+

Comment 8

2 years ago
https://hg.mozilla.org/integration/fx-team/rev/c08fefe2594f
https://hg.mozilla.org/integration/fx-team/rev/7f066e9a778b

Comment 9

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c08fefe2594f
https://hg.mozilla.org/mozilla-central/rev/7f066e9a778b
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox46: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.