Closed Bug 1747837 Opened 2 years ago Closed 2 years ago

Something like mach create-mach-environment is dearly needed

Categories

(Firefox Build System :: Bootstrap Configuration, defect)

defect

Tracking

(firefox-esr91 unaffected, firefox95 unaffected, firefox96 wontfix, firefox97 wontfix, firefox98 fixed)

RESOLVED FIXED
98 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox95 --- unaffected
firefox96 --- wontfix
firefox97 --- wontfix
firefox98 --- fixed

People

(Reporter: glandium, Assigned: mhentges)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I was setting up a build on an exotic platform that we don't have wheels for for psutil, zstandard, and glean, so the mach virtualenv attempted to build them, but I didn't have the python3-dev package installed. It still went through, and then bootstrapping the wasi sysroot failed because zstandard was not available. Up to that, nothing is really surprising.

The problem is that after I installed the python3-dev package, there wasn't an obvious way to fix the mach virtualenv:

  • it doesn't have the pip command
  • the mach create-mach-environment command was removed

It turns out even though it doesn't have the pip command, it has the pip module, so you can run python -m pip with the virtualenv python, but the location of the virtualenv itself is non-trivial for users.

./mach python --virtualenv mach -m pip ... would have been helpful and would avoid having to know the location of the virtualenv, but instead of using the mach virtualenv, it creates a new virtualenv named mach in the objdir (which I would argue is a bug).

Even if you do know how to run pip for the mach virtualenv, it's also non-obvious what you might want to retry installing that failed the first time.

All in all, the easiest is to remove the virtualenv and recreate it, but it all comes back to knowing where the virtualenv is in the first place.

So all in all, I think we need a command to force-refresh the mach virtualenv.

Flags: needinfo?(mhentges)

The Bugbug bot thinks this bug is a defect, but please change it back in case of error.

Type: enhancement → defect

Set release status flags based on info from the regressing bug 1717051

This will be improved by this patch, which will have ./mach bootstrap attempt to install Python packages.

Flags: needinfo?(mhentges)

Currently, developers don't have a way to have the Mach virtualenv
re-attempt to install optional dependencies (such as glean).

As part of ./mach bootstrap (the general catch-all "re-create my dev
environment" command), we should retry installing optional dependencies.

This also matches the "glean isn't installed" error message
recommendation.

Note: This doesn't address the case in which command virtualenvs
need their optional dependencies attempted to be reinstalled.
However, since we don't have any such cases yet, I'm satisfied with
deferring that work.

Assignee: nobody → mhentges
Status: NEW → ASSIGNED

The severity field is not set for this bug.
:mhentges, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mhentges)
Severity: -- → S4
Flags: needinfo?(mhentges)
Has Regression Range: --- → yes

Comment on attachment 9257064 [details]
Bug 1747837: Attempt to reinstall optional dependencies during bootstrap

Revision D123242 was moved to bug 1717051. Setting attachment 9257064 [details] to obsolete.

Attachment #9257064 - Attachment is obsolete: true
Attachment #9257064 - Attachment is obsolete: false
Component: Mach Core → Bootstrap Configuration
Pushed by mhentges@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/573fe67e2e21
Attempt to reinstall optional dependencies during bootstrap r=ahal
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: