Only restore a .moz-backup file if it was created during the current run
Categories
(Toolkit :: Application Update, defect)
Tracking
()
People
(Reporter: yannis, Assigned: yannis)
References
(Blocks 1 open bug)
Details
Attachments
(3 external files, 2 obsolete files)
During a non-staged update, we should only restore a .moz-backup file if it was created during the current run. See bug 2076326 for full details on this.
| Assignee | ||
Comment 1•1 month ago
|
||
On failure, every action restores the backup of its file whenever one exists,
including the actions that never reached Execute. A backup left behind by an
earlier updater run then puts back an old file next to newer ones. Paths are
tracked rather than actions, because a precomplete remove and the add that
follows it share one backup.
Updated•1 month ago
|
| Assignee | ||
Comment 2•1 month ago
|
||
A non-staged complete update that fails in Draft has not created any backup yet,
while its rollback visits the precomplete removes of every file. Draft writes
only fail on their own in conditions that tests can't easily reproduce, such as
a full disk, so this adds a fault injection to the test updater.
Comment 4•1 month ago
|
||
| bugherder | ||
| Assignee | ||
Comment 5•1 month ago
|
||
On failure, every action restores the backup of its file whenever one exists,
including the actions that never reached Execute. A backup left behind by an
earlier updater run then puts back an old file next to newer ones. Each action
now only restores the backup it created. The backup that a precomplete remove
shares with the add that follows it is restored by the remove, which rolls back
last.
Original Revision: https://phabricator.services.mozilla.com/D329687
Updated•1 month ago
|
Comment 6•1 month ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined/Reason for urgency: The updater can restore files created by previous runs, resulting in corrupt install directories and ultimately startup crashes or startup errors like "Error Platform Version". Possibly worsened by bug 2060275 and bug 2058860.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: medium
- Explanation of risk level: Simple patch backed by a test, but touches updater code.
- String changes made/needed?: No
- Is Android affected?: no
| Assignee | ||
Comment 7•1 month ago
|
||
On failure, every action restores the backup of its file whenever one exists,
including the actions that never reached Execute. A backup left behind by an
earlier updater run then puts back an old file next to newer ones. Each action
now only restores the backup it created. The backup that a precomplete remove
shares with the add that follows it is restored by the remove, which rolls back
last.
Original Revision: https://phabricator.services.mozilla.com/D329687
Updated•1 month ago
|
Comment 8•1 month ago
|
||
firefox-release Uplift Approval Request
- User impact if declined/Reason for urgency: The updater can restore files created by previous runs, resulting in corrupt install directories and ultimately startup crashes or startup errors like "Error Platform Version". Possibly worsened by bug 2060275 and bug 2058860.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: no
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: medium
- Explanation of risk level: Simple patch backed by a test, but touches updater code.
- String changes made/needed?: No
- Is Android affected?: no
Updated•1 month ago
|
Updated•1 month ago
|
Comment 10•1 month ago
|
||
Comment on attachment 9650681 [details]
Bug 2076332 - Only restore the backups that the current updater run created.
We didn't have updater problems with 157.0 and we are one week away from 158.0, let's have it ride the train and benefit from a week of beta data.
Updated•1 month ago
|
| Assignee | ||
Comment 11•1 month ago
|
||
D329688 adds a test but it didn't get a review in time so didn't land nor get uplifted, so I'll move it to a separate bug to keep things clear.
Comment 12•1 month ago
|
||
Comment on attachment 9649841 [details]
Bug 2076332 - Test that a failure in the Draft phase doesn't restore a leftover backup. r=#application-update-reviewers!
Revision D329688 was moved to bug 2078647. Setting attachment 9649841 [details] to obsolete.
| Assignee | ||
Comment 14•1 month ago
|
||
On failure, every action restores the backup of its file whenever one exists,
including the actions that never reached Execute. A backup left behind by an
earlier updater run then puts back an old file next to newer ones. Each action
now only restores the backup it created. The backup that a precomplete remove
shares with the add that follows it is restored by the remove, which rolls back
last.
Original Revision: https://phabricator.services.mozilla.com/D329687
Updated•1 month ago
|
Comment 15•1 month ago
|
||
firefox-esr153 Uplift Approval Request
- User impact if declined/Reason for urgency: Fixes a source of mismatched-version files in the install directory after a non-staged update. Mismatched-version files are a cause of startup failures and startup crashes where the user has no choice but to reinstall.
- Code covered by automated testing?: yes
- Fix verified in Nightly?: yes
- Needs manual QE testing?: no
- Steps to reproduce for manual QE testing:
- Risk associated with taking this patch: low
- Explanation of risk level: Simple patch backed by a test. Has baked in beta.
- String changes made/needed?: No
- Is Android affected?: no
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 16•1 month ago
|
||
(In reply to Ryan VanderMeulen [:RyanVM] from comment #13)
Does this need an ESR153 uplift?
(Yes, thanks!)
Updated•1 month ago
|
Comment 17•1 month ago
|
||
| uplift | ||
Comment 18•1 month ago
|
||
| uplift | ||
Updated•1 month ago
|
Description
•