Closed Bug 1848414 Opened 10 months ago Closed 3 months ago

Make update specific changes necessary for channel-prefs.js to be removed on macOS

Categories

(Toolkit :: Application Update, task, P1)

task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: bytesized, Assigned: bytesized)

References

Details

(Whiteboard: [fidedi-ope])

Attachments

(8 files, 1 obsolete file)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

There are a number of update-specific things that need to be changed in order to get rid of channel-prefs.js on macOS, as we are doing in Bug 1799332. I plan to write the necessary code here and mark the patches as being dependent on the patches for that bug to make it easy to land all the code at the same time.

This is likely not comprehensive, but here are the changes that I currently know of that need to be made:

  1. I believe that this test ought to be removed.
  2. I think that we want this to not be present on macOS. I'm not entirely sure what the best way to do that is. Maybe remove it and add it back in if we aren't on macOS?
  3. Currently, when we build MAR files, we have special handling for channel-prefs.js such that that file will be added to the installation only if it doesn't already exist. This mechanism should be removed on macOS and, I suspect, changed to handle the new mechanism added in D184711.
Priority: -- → P2
Whiteboard: [fidedi-ope]
Priority: P2 → P1
See Also: → 1869656

Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/1b5ef137cebb
Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → NEW

Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/7cd7ae05dbc9
Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl

Status: NEW → RESOLVED
Closed: 6 months ago6 months ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → NEW

Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/7673f4d7ec84
Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl

Status: NEW → RESOLVED
Closed: 6 months ago6 months ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → NEW
Keywords: leave-open
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/48b37c9e3431
Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/d116ef9bc280
Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/1229df3b7698
Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/2fdc92f12d2a
Remove verifyChannelPrefsFile test r=nalexander
https://hg.mozilla.org/projects/pine/rev/41046d80466d
Add updater argument --channels-allowed r=nalexander!
https://hg.mozilla.org/projects/pine/rev/c4e09755c86f
On update, don't overwrite existing ChannelPrefs or UpdateSettings Frameworks r=bhearsum!,nalexander!
https://hg.mozilla.org/projects/pine/rev/a8767b27a588
Change updater-xpcshell to have the update channel xpcshell-test r=nalexander!,spohl!
https://hg.mozilla.org/projects/pine/rev/fd02bf143d9e
Change gTestFiles to accommodate the UpdateSettings and ChannelPrefs Frameworks r=nalexander!
https://hg.mozilla.org/projects/pine/rev/4cb58ab02a7a
Replace lookups of gTestFile entries with getTestFileByName r=nalexander!
https://hg.mozilla.org/projects/pine/rev/6a8ab703d775
Update macOS test MARs to contain the new Frameworks r=nalexander!
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/b1e89bbc7f72
Add an UpdateSettings Framework that intentionally has the wrong channel for testing r=spohl!
https://hg.mozilla.org/projects/pine/rev/26c10fe17fb5
Don't use update-settings.ini in tests on macOS r=nalexander!
https://hg.mozilla.org/projects/pine/rev/67197de01200
Remove verifyChannelPrefsFile test r=nalexander!
https://hg.mozilla.org/projects/pine/rev/cf071297b3d3
Add updater argument --channels-allowed r=nalexander!
https://hg.mozilla.org/projects/pine/rev/175fbfbadb80
On update, don't overwrite existing ChannelPrefs or UpdateSettings Frameworks r=bhearsum!,nalexander!
https://hg.mozilla.org/projects/pine/rev/aeefb60da53c
Change gTestFiles to accommodate the UpdateSettings and ChannelPrefs Frameworks r=nalexander!
https://hg.mozilla.org/projects/pine/rev/32448627bf1f
Replace lookups of gTestFile entries with getTestFileByName r=nalexander!
https://hg.mozilla.org/projects/pine/rev/025154c80e06
Update macOS test MARs to contain the new Frameworks r=nalexander!
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/projects/pine/rev/a46241f2ee5d
Add an UpdateSettings Framework that intentionally has the wrong channel for testing r=spohl!
https://hg.mozilla.org/projects/pine/rev/69a35ea8487d
Don't use update-settings.ini in tests on macOS r=nalexander!
https://hg.mozilla.org/projects/pine/rev/ef6d6828a74e
Remove verifyChannelPrefsFile test r=nalexander!
https://hg.mozilla.org/projects/pine/rev/4998f9f385fd
Add updater argument --channels-allowed r=nalexander!
https://hg.mozilla.org/projects/pine/rev/cd5ea111515c
On update, don't overwrite existing ChannelPrefs or UpdateSettings Frameworks r=bhearsum!,nalexander!
https://hg.mozilla.org/projects/pine/rev/2047e12a5a00
Change gTestFiles to accommodate the UpdateSettings and ChannelPrefs Frameworks r=nalexander!
https://hg.mozilla.org/projects/pine/rev/07d121df5b06
Replace lookups of gTestFile entries with getTestFileByName r=nalexander!
https://hg.mozilla.org/projects/pine/rev/d6cfd11ae520
Update macOS test MARs to contain the new Frameworks r=nalexander!

I'm having trouble making progress on the failed: 39 error that I'm getting, as mentioned on Slack. You asked me to needinfo to remind you about it.

Flags: needinfo?(nalexander)
Depends on: 1874254

Since this file is no longer used on macOS, the tests do not need to copy it into place.

Depends on D198895

Attachment #9369001 - Attachment description: Bug 1848414 - Make update-specific changes for removing channel-prefs on macOS r=nalexander,spohl → Bug 1848414 - Remove verifyChannelPrefsFile test r=nalexander!

Given that (a) it is no longer possible to easily inspect the Update Settings file and (b) it is intentionally possible to swap out Update Settings frameworks, I anticipate that in the future we may want a way to determine what channels the updater will accept. Thus, I think it is a good idea to add an easy way to make the updater output this information.

Depends on D196626

Those files are now in a different location and one of them (UpdateSettings) will already exist rather than needing to be created.

A few other changes are also made here:

  • Currently, when we need to make changes to a gTestFiles entry, we access it by index, which is both unreadable (how is anyone supposed to know what gTestFiles[13] refers to?) and a maintenance nightmare (adding an item to the list in the wrong position potentially screws up all the indicies and now a bunch of the tests are making changes to the wrong gTestFiles entry). To improve this, I added getTestFileByName so that, for example, gTestFiles[gTestFiles.length - 1] can be replaced with getTestFileByName(FILE_CHANNEL_PREFS).
  • Two extra (optional) properties added to gTestFiles entries: existingFile and removeOriginalFile. existingFile == true indicates that the file exists already and doesn't need to be created. removeOriginalFile is only relevant if existingFile == true, and it causes the file to be removed rather than retained. If existingFile && !removeOriginalFile, compareContents will be automatically set to the current file contents if it (and compareFile) is unset, as will comparePerms to ensure that the update process doesn't change the file.
  • setUpdateSettingsUseWrongChannel was added to make it easier to set the wrong update channel either via the INI file (on non-Mac) or via the Framework (on Mac).

Depends on D198898

Flags: needinfo?(nalexander)
Attachment #9369000 - Attachment is obsolete: true
Keywords: leave-open
Pushed by rsteuber@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/62ab286ed401
Add an UpdateSettings Framework that intentionally has the wrong channel for testing r=spohl
https://hg.mozilla.org/integration/autoland/rev/d711a830a93e
Don't use update-settings.ini in tests on macOS r=nalexander,application-update-reviewers
https://hg.mozilla.org/integration/autoland/rev/f81e80cf062f
Remove verifyChannelPrefsFile test r=nalexander,spohl,application-update-reviewers
https://hg.mozilla.org/integration/autoland/rev/ff5f23856542
Add updater argument --channels-allowed r=nalexander,application-update-reviewers
https://hg.mozilla.org/integration/autoland/rev/2f4044201b9a
On update, don't overwrite existing ChannelPrefs or UpdateSettings Frameworks r=bhearsum,nalexander
https://hg.mozilla.org/integration/autoland/rev/672c3f18cb8b
Change gTestFiles to accommodate the UpdateSettings and ChannelPrefs Frameworks r=nalexander,application-update-reviewers
https://hg.mozilla.org/integration/autoland/rev/5c6748ef5865
Replace lookups of gTestFile entries with getTestFileByName r=nalexander,application-update-reviewers
https://hg.mozilla.org/integration/autoland/rev/c676fc5d89bc
Update macOS test MARs to contain the new Frameworks r=nalexander,application-update-reviewers
Regressions: 1881360
Regressions: 1881635
Regressions: 1881662
See Also: → 1882322
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: