Closed Bug 1236551 Opened 9 years ago Closed 9 years ago

Update the profile migrator to FHR/Telemetry changes

Categories

(Toolkit :: Telemetry, defect, P1)

defect
Points:
2

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: gfritzsche, Assigned: gfritzsche)

References

Details

(Whiteboard: [measurement:client])

Attachments

(2 files, 2 obsolete files)

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: nobody → gfritzsche
Depends on: 1239753
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)
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)
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+
(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.
Attachment #8708458 - Attachment is obsolete: true
Attachment #8709053 - Flags: review?(MattN+bmo)
Attachment #8709052 - Flags: review+
Attachment #8709053 - Flags: review?(MattN+bmo) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: