Closed Bug 1712804 Opened 3 years ago Closed 3 years ago

"error processing command" when virtualenvs are created

Categories

(Firefox Build System :: Mach Core, defect)

defect

Tracking

(firefox90 fixed)

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mhentges, Assigned: mhentges)

Details

Attachments

(2 files, 1 obsolete file)

When optional:packages.txt:comm/build/virtualenv_packages fails on non-Thunderbird checkouts, the following error is raised

Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)

I don't think that optional is the right mechanism here: it's not a "optional system constraint", it's a contextual constraint: to exaggerate, this is like warning that we haven't found a compiler when we're doing an artifact build. The warning confuses users who aren't sure if it's something they can ignore or just the system working like normal.

The solution here is not to print the error in Firefox checkouts.

Incomplete. mach_sys_path still needs updating to work with VIRTUALENV_PACKAGES.

The os.path.isdir("comm/build") condition could be handled nicer since right now
the working directory needs to be topsrcdir.

Avoid the "Error processing command" warning when building virtualenvs
in a Firefox checkout

Depends on D115921

Assignee: nobody → mhentges
Status: NEW → ASSIGNED
Attachment #9223425 - Attachment is obsolete: true
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3c8d543d71cf Change comm action to be specific to Thunderbird r=rjl,ahal
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch

I build FF and TB from a mozilla-unified repository for REL set to esr.., or release, or beta, or central, with a comm directory in the mozilla top level.

comm is empty for FF builds, and comm-$REL is mounted to it for TB builds.

This is now causing a build error for a FF90 build:

AssertionError: '/mozbuild/mozilla/comm/build/virtualenv_packages.txt' does not exist
....
Exception: Error populating virtualenv.
Error running mach:

    ['build']

This patch avoids that failure for FF whether comm doesn't exist, exists and is empty, or has comm-$REL content:

--- python/mozbuild/mozbuild/virtualenv.py
+++ python/mozbuild/mozbuild/virtualenv.py
@@ -336 +336 @@
-        is_thunderbird = os.path.exists(os.path.join(self.topsrcdir, "comm"))
+        is_thunderbird = os.path.exists(os.path.join(self.topsrcdir, "comm/mail"))

There's always an edge case to an edge case, eh?
I'll set up a patch today, thanks for the report.

Some developers hold onto a comm directory as a mount point
that they conditionally populate depending on whether they're working on
Firefox or Thunderbird.
The "comm directory exists == is a thunderbird checkout"
assumption isn't compatible with this workflow.

The fix embraced by this patch is to check if the comm directory has
any contents.

Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9e0ab612cd84 Check if `comm` directory is empty in TB identification r=ahal
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: