Bug 1730619: Associate build commands with "build" venv r=ahal
authorMitchell Hentges <mhentges@mozilla.com>
Thu, 16 Sep 2021 14:15:04 +0000
changeset 592164 3ad99bae35e262bc1338d4ba5274225acce1374f
parent 592163 893cf1e4d1c046159582d38c70a6d495701d1bf7
child 592165 51326f646b454e18ea3f4219d90b8fb3b46c7245
push id38794
push userccozmuta@mozilla.com
push dateThu, 16 Sep 2021 21:45:06 +0000
treeherdermozilla-central@4f9a1f599b43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1730619
milestone94.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1730619: Associate build commands with "build" venv r=ahal The `build-backend` command uses `command_context.virtualenv_manager`, which by default is associated with the "common" virtualenv. This patch aligns `virtualenv_manager` with the "build" virtualenv as set up within `init.configure`. Differential Revision: https://phabricator.services.mozilla.com/D125592
python/mozbuild/mozbuild/build_commands.py
--- a/python/mozbuild/mozbuild/build_commands.py
+++ b/python/mozbuild/mozbuild/build_commands.py
@@ -73,16 +73,17 @@ def _set_priority(priority, verbose):
 class Build(MachCommandBase):
     """Interface to build the tree."""
 
     @Command(
         "build",
         category="build",
         description="Build the tree.",
         metrics_path=MOZBUILD_METRICS_PATH,
+        virtualenv_name="build",
     )
     @CommandArgument(
         "--jobs",
         "-j",
         default="0",
         metavar="jobs",
         type=int,
         help="Number of concurrent jobs to run. Default is based on the number of "
@@ -233,16 +234,17 @@ class Build(MachCommandBase):
             append_env=append_env,
         )
 
     @Command(
         "configure",
         category="build",
         description="Configure the tree (run configure and config.status).",
         metrics_path=MOZBUILD_METRICS_PATH,
+        virtualenv_name="build",
     )
     @CommandArgument(
         "options", default=None, nargs=argparse.REMAINDER, help="Configure options"
     )
     def configure(
         self,
         command_context,
         options=None,
@@ -260,16 +262,17 @@ class Build(MachCommandBase):
             buildstatus_messages=buildstatus_messages,
             line_handler=line_handler,
         )
 
     @Command(
         "resource-usage",
         category="post-build",
         description="Show information about system resource usage for a build.",
+        virtualenv_name="build",
     )
     @CommandArgument(
         "--address",
         default="localhost",
         help="Address the HTTP server should listen on.",
     )
     @CommandArgument(
         "--port",
@@ -315,16 +318,17 @@ class Build(MachCommandBase):
 
         print("Hit CTRL+c to stop server.")
         server.run()
 
     @Command(
         "build-backend",
         category="build",
         description="Generate a backend used to build the tree.",
+        virtualenv_name="build",
     )
     @CommandArgument(
         "-d", "--diff", action="store_true", help="Show a diff of changes."
     )
     # It would be nice to filter the choices below based on
     # conditions, but that is for another day.
     @CommandArgument(
         "-b",