Closed Bug 1844306 Opened 2 years ago Closed 2 years ago

Port bug 1695312: Make mach command modules be loaded selectively

Categories

(Thunderbird :: Upstream Synchronization, enhancement)

Thunderbird 117
enhancement

Tracking

(thunderbird_esr115 wontfix)

RESOLVED FIXED
117 Branch
Tracking Status
thunderbird_esr115 --- wontfix

People

(Reporter: darktrojan, Assigned: rjl)

References

Details

Attachments

(5 files)

TypeError: initialize() takes 1 positional argument but 2 were given

We need to update to match this change.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/208d0fe12095
Port bug 1695312: Make mach command modules be loaded selectively. r=freaktechnik

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

To fix commlint (and as such the linters failing in the CI), "all" that'd be needed is to fix the new code in m-c mach_initialize.py that tries to find the module of the commands by checking the MACH_COMMANDS dict. Obviously our commands (like commlint) don't exist in that dict.

Adding something simple like

            if not MACH_COMMANDS.get(command):
                return

in DetermineCommandVenvAction's __call__ makes commlint work again locally I think.

test and friends are fixed if I disable the command specific module loading (mach_initialize.py:707). Which seems like it would probably be an upstream bug?

I only just realized I should probably look for virtualenv_name, since that's what the upstream changes are messing with, which is what the code in mutlh does from what I can tell. However this goes way deeper than my python understanding.

One issue is with the early virtualenv activation. It's now done in mach's initialize function, and it's using a dictionary that's defined in the initialize function itself so it can't be easily changed.
I'm working on a patch for m-c to give us a way to hook into that.
Then yes, mutlh will likely need changes. Have to get past this first.

Depends on: 1844417

Bugs 1695312 and 1844417 need to be on mozilla-central.

Pushed by sean@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/c7ec0439a46a
Port bug 1388894: Replace mach modules list with a dict of mach commands. r=dandarnell
https://hg.mozilla.org/comm-central/rev/bb0f67546a46
Port bug 1695312: Initialize mach virtualenvs early. r=dandarnell
https://hg.mozilla.org/comm-central/rev/c2c8234342cb
Port bug 1844417: Update mach commands to support upstream mach improvements. r=dandarnell
https://hg.mozilla.org/comm-central/rev/e3ba2a727534
Remove obsolete Mutlh code. r=dandarnell

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Assignee: geoff → rob
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/18342f8a7ede
Port bug 1388894: Replace mach modules list with a dict of mach commands. r=dandarnell
https://hg.mozilla.org/comm-central/rev/e93d5e452c67
Port bug 1695312: Initialize mach virtualenvs early. r=dandarnell
https://hg.mozilla.org/comm-central/rev/ac91ab26e4d6
Port bug 1844417: Update mach commands to support upstream mach improvements. r=dandarnell
https://hg.mozilla.org/comm-central/rev/80b58987c7fb
Remove obsolete Mutlh code. r=dandarnell

Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Regressions: 1845535
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: