Closed Bug 1709969 Opened 3 years ago Closed 3 years ago

Migrate from an existing profile when running from an app package for the first time

Categories

(Firefox :: Installer, task)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox92 --- fixed

People

(Reporter: molly, Assigned: molly)

References

(Blocks 2 open bugs)

Details

Attachments

(3 files)

The path to the virtual file system for an app package includes the package's version number, which means our installation path is not stable between app updates. Therefore, if install-specific profiles are used, a new profile will be created and the previous one lost on each update. There are few ways around this, but the simplest is to just not use install-specific profiles.

This is handled here for Snap packages.

However, one potential complication in doing this comes from how file system virtualization works. In recent Windows 10 builds, writes to files that already exist in the "real" AppData are actually made to those files, not to virtual copies. But new files are still created in the virtual file system. This could cause trouble if we accidentally open a preexisting profile, because then we would be writing different pieces of the same profile in both the virtual and "real" file systems, meaning the profile would be in an inconsistent state except from the perspective of the package.

So, the most reliable option might be to not use a regular default profile, and instead create a special, package-only one with a name that we know will not already exist, so that the entire profile is always contained inside the VFS. We may also want to block opening any profiles that aren't the designated package one(s), to prevent breaking them.

Assignee: nobody → mhowell
Status: NEW → ASSIGNED
No longer blocks: 1710908
Group: partner-confidential
Group: mozilla-employee-confidential
Attachment #9226025 - Attachment description: WIP: Bug 1709969 - Use a separate profile for Windows package installations, and migrate from an existing profile when creating it. → Bug 1709969 Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=agashlin!,mossop!
Pushed by mhowell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6a80559a4055
Part 1 - Add a utility function to retrieve the current package's family name. r=agashlin
https://hg.mozilla.org/integration/autoland/rev/a6b917838765
Part 2 - Use the package family name to compute path hashes when in a package. r=agashlin
https://hg.mozilla.org/integration/autoland/rev/17ed7ca86998
Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=mossop,agashlin
Summary: Do not use per-installation profiles when running from an app package → Migrate from an existing profile when running from an app package for the first time

Backed out for causing xpc failures in test_select_profile_package

Backout link: https://hg.mozilla.org/integration/autoland/rev/3ce5a6590f0fb547157b73222e1f6084ffab1be1

Push with failures

Failure log

Flags: needinfo?(mhowell)

Okay, how about we just skip the new tests on not-Windows, since this whole feature doesn't run anywhere else.

Flags: needinfo?(mhowell)
Pushed by mhowell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9712279be87a
Part 1 - Add a utility function to retrieve the current package's family name. r=agashlin
https://hg.mozilla.org/integration/autoland/rev/5c95bc1d7a10
Part 2 - Use the package family name to compute path hashes when in a package. r=agashlin
https://hg.mozilla.org/integration/autoland/rev/5136d2f68401
Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=mossop,agashlin
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch
Regressions: 1723298
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: