Граф коммитов

4831 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 81228f00cd Bug 1717947 - Remove packager support for brotli in Jars. r=firefox-build-system-reviewers,nalexander
This was added ing bug 1352595. It has only been used briefly, and we
since then have gone all the way to never compress omni.ja. Even if we
did go back to compressing, we'd probably go with zstd rather than
brotli.
The gecko-side support for this has only ever been nightly-only.

Differential Revision: https://phabricator.services.mozilla.com/D118655
2021-06-25 00:20:10 +00:00
Mitchell Hentges 43949e4a1c Bug 1717702: Resolve `print-checks` python unpacking typo r=andi
`_get_infer_config()` returns 3 items, but the existing code expects 2.
Add a third `_` to capture the other unwanted item.

Differential Revision: https://phabricator.services.mozilla.com/D118535
2021-06-24 13:21:57 +00:00
Marian-Vasile Laza 4728ef73b2 Bug 1700534 - black lint fix r=fix CLOSED TREE 2021-06-22 09:22:33 +03:00
Mike Hommey 744db845c6 Bug 1700534 - Coalesce RLBox wasmboxed libraries. r=firefox-build-system-reviewers,shravanrn,bholley,andi,mhentges
Differential Revision: https://phabricator.services.mozilla.com/D116440
2021-06-22 05:31:33 +00:00
Mitchell Hentges ee5a948268 Bug 1716600: Don't use node/npm that are too old or have no version r=firefox-build-system-reviewers,nalexander
In the existing behaviour, we would return a node/npm executable from
`find_executable()`, even if we couldn't extract a version from it or if
the extracted version was insufficient.

Now, we fail early if the detected node/npm is insufficient.

Differential Revision: https://phabricator.services.mozilla.com/D118377
2021-06-21 16:47:56 +00:00
Mitchell Hentges 00d96c3fed Bug 1716600: Remove looping from Node's find_executable() r=firefox-build-system-reviewers,nalexander
Since we're no longer checking for both "nodejs" and "node",
`find_executable()` can be simplified.

Differential Revision: https://phabricator.services.mozilla.com/D118376
2021-06-21 16:47:55 +00:00
Mitchell Hentges 73814a7f0f Bug 1716600: Always search for "node" instead of "nodejs" r=firefox-build-system-reviewers,nalexander
As :julienw beautifully described on Bugzilla,
we no longer need to search for "nodejs" since all
packages providing Node >= v12 will provide the `node`
binary.
See his comment here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1716600#c4

Base-toolchain tasks with Node v10 should still be
happy because, unlike Debian's Node v10, they provide
a `node` binary instead of `nodejs`.

Differential Revision: https://phabricator.services.mozilla.com/D118375
2021-06-21 16:47:55 +00:00
Mitchell Hentges 2438ea8889 Bug 1712133: Validate that pypi dependencies are installed r=ahal
Check that all expected pypi packages are installed
when checking if a virtualenv is up-to-date.

Differential Revision: https://phabricator.services.mozilla.com/D117712
2021-06-17 14:58:17 +00:00
Mitchell Hentges 2fa59acd4f Bug 1712133: Adds "pypi" action to virtualenv `handle_package()` r=ahal
The `pypi` action uses `pip` to fetch a package and its dependencies

Differential Revision: https://phabricator.services.mozilla.com/D115925
2021-06-17 14:58:17 +00:00
Mitchell Hentges 24f634d924 Bug 1712133: Remove "pth" name customization r=ahal
Having separate `<name>.pth` files in the virtual environments
isn't providing an advantage. We can simplify configuration
by putting all `pth` adjustments into a single file: `mach.pth`.

Differential Revision: https://phabricator.services.mozilla.com/D117710
2021-06-17 14:58:16 +00:00
Mitchell Hentges 31474e8925 Bug 1712133: Make virtualenv package parsing more specific r=ahal
This has two benefits:
1. `handle_package()` becomes more clear - rather than referring to
   `action` and `package` with array index numbers, we now give
   them real names. The benefit here is also shown in `up_to_date()`.
2. This makes the top-level parser for `packages()` less opinionated
   about sub-formats: if an action has a nested structure, it should
   have the flexibility to define what it looks like.

Differential Revision: https://phabricator.services.mozilla.com/D117708
2021-06-17 14:58:16 +00:00
Mitchell Hentges 722ac646db Bug 1713857: Don't set PYTHONEXECUTABLE environment variable r=glandium
After some testing in `try` and locally, the manual
`PYTHONEXECUTABLE` definitions shouldn't be needed
anymore.

There's been some work on Brew's
Python to improve its `sitecustomize` behaviour.
The most likely improvement is:
https://github.com/Homebrew/homebrew-core/pull/65297

However, I'm not fully confident in this change.
If it fails, it's more likely to affect developers
than CI. I think it's worth attempting a landing,
because if the variable is indeed obsolete, then
deleting it will avoid some spicy "action-at-a-
distance" behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D117452
2021-06-17 13:28:29 +00:00
Marian-Vasile Laza 19f23a7e8b Bug 1716911 - black lint fix r=fix CLOSED TREE 2021-06-17 09:39:54 +03:00
Mike Hommey 83c4b6a318 Bug 1716911 - Switch --enable-bootstrap on by default on macos builds on central. r=firefox-build-system-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D118107
2021-06-17 04:59:42 +00:00
Mitchell Hentges 6d154c1ed3 Bug 1713377: Change vendoring to use wheels where possible r=ahal,glandium
Vendoring wheels has three benefits:
* There's far less files, so Firefox checkouts will be smaller.
* It works around `zipp` not allowing `pip install`
  from extracted source `tar.gz` files. Now, we should
  be able to use the pip resolver against vendored
  packages, which will be needed for future
  mach virtualenv work.
* `./mach vendor python` takes far less time to execute.

Since we need the raw Python to be available to add to the `sys.path`,
we extract the wheels before putting them in tree.
Due to the structure of some wheels being less nested
than of a source `tar.gz`, `common_virtualenv_packages`
needed to be adjusted accordingly.

`install_pip_package()` had to be tweaked as well since you can't
`pip install` an extracted wheel. So, we "re-bundle" the wheel
before installing from a vendored package.

Replace python packages with wheels where possible

This contains the vendoring changes caused by the
last patch.

For reviewing, there's a couple things to note:
* A bunch of files are deleted, since there's generally
  less files in a wheel than in a source archive.
* There's a new `.dist-info` directory for each
  extracted wheel, so expect roughly 5 or
  6 new files for each wheel'd package.
* There should be no source code changes other than
  moves from package names changing from having
  `-` to having `_`.

Differential Revision: https://phabricator.services.mozilla.com/D116512
2021-06-16 15:53:16 +00:00
surajeet310 c3511254e0 Bug 1714688 - Removed 'if PY2'/'if PY3' logic from python/mozbuild r=mhentges
Python2 is no longer used in Mozbuild.

Differential Revision: https://phabricator.services.mozilla.com/D117561
2021-06-15 19:31:21 +00:00
Mitchell Hentges 9f7c330b60 Bug 1712133: Remove "windows" action support from virtualenvs r=ahal
Last year, we stopped vendoring Python packages that have native
code. Since we have only had pure-python packages since, the
Windows-specific qualifier (or excluder in the case of `!windows`)
hasn't been needed.

I don't foresee us needing it again, but if anything we can peel it
back from `hg` history if this assumption is incorrect.

Differential Revision: https://phabricator.services.mozilla.com/D117468
2021-06-15 14:46:55 +00:00
Mitchell Hentges 1b74e5a575 Bug 1713201: Resolve test_telemetry failing locally r=ahal
On Windows, Python's temporary directories are placed in `%APPDATA%`.
Unfortunately, the failing tests want to assume that some "other"
path (as a subpath of a tempdir) won't be within any
`filter_args()` known top-level paths, which includes the user's home
dir.

The only reason that this assumption has passed in CI so far is due
to Windows case insensitivity: running locally had `~` evaluated
to `c:\Users\...`, while running in CI had it be `c:\users\...`.
Since the tempdir path started with `C:\Users`, `filter_args()`
would `<path omitted>` in CI but would `$HOME/...` locally.

By not basing the `other_path` on `tempdir`, we now consistently get the
same results across platforms.

Differential Revision: https://phabricator.services.mozilla.com/D117698
2021-06-15 14:45:53 +00:00
Alexandru Michis 542a65a629 Bug 1715282 - Fix black py lint in test_toolchain_configure.py a=lint-fix
CLOSED TREE
2021-06-15 18:04:43 +03:00
Mike Hommey 7f9a51a8f5 Bug 1715282 - Bump minimum Rust version to 1.51. r=firefox-build-system-reviewers,andi
Also update the estimated rust versions for future releases, based on
the updated Firefox release dates.

Differential Revision: https://phabricator.services.mozilla.com/D117737
2021-06-15 09:23:20 +00:00
Csoregi Natalia 6b0106d5b1 Backed out changeset 15c6a16f5828 (bug 1714688) for docker images bustage. CLOSED TREE 2021-06-14 20:51:29 +03:00
surajeet310 0ac7b98b51 Bug 1714688 - Removed 'if PY2'/'if PY3' logic from python/mozbuild r=mhentges
Python2 is no longer used in Mozbuild.

Differential Revision: https://phabricator.services.mozilla.com/D117561
2021-06-14 16:10:11 +00:00
Mitchell Hentges e389cc4cc4 Bug 1714684: Remove usages of vendored "mock" library r=perftest-reviewers,ahal,sparky
Python 3 has access to `unittest.mock` in the standard library.

Differential Revision: https://phabricator.services.mozilla.com/D117073
2021-06-14 15:34:46 +00:00
Mitchell Hentges dc2fa7819c Bug 1713610: Require PyPI-vendored packages be added to requirements.in r=ahal
`./mach vendor python <package>` was already adding its new package
to `requirements.txt`, so we were getting full resolver support, which
is good. However, it caused our `requirements.in` file to start
getting out-of-date, and therefore made it harder to identify the
top-level dependencies.

Arguably, we could have `./mach vendor python <package>` automatically
update `requirements.in`, too, but then we need to solve the edge cases,
such as "What if the package is already in `requirements.in`? What if
that existing item has a different version?"

The hardest part of updating `requirements.in` was finding it, so I've
also modified the `./mach vendor python` help text to make it more
identifiable.

Differential Revision: https://phabricator.services.mozilla.com/D116386
2021-06-10 19:19:06 +00:00
Nick Alexander bef7042147 Bug 1524662 - Add --enable-path-remapping producing compiled objects with generic paths. r=glandium
For "c" (i.e., gcc, clang, and clang-cl), this configures the
`-f{debug,macro}-path-prefix` flags.  We'd prefer to use
`-ffile-path-prefix`, but it seems that `clang-cl` does not recognize
that flag.

For "rust" (i.e., rustc/cargo), this configures `--remap-path-prefix`.

This is one step toward getting `sccache` hits across source and
object directories.

Differential Revision: https://phabricator.services.mozilla.com/D113065
2021-06-10 17:08:06 +00:00
Mitchell Hentges b9531f2856 Bug 1714641: Remove usages of vendored "pathlib2" library r=ahal
Based on the docs and the code within `pathlib2`, it seems to focus
only on backporting the main features of `pathlib` to be available for
Python 2. It does _not_ provide features in newer Python versions
of `pathlib` (such as `is_mount`, new in Python 3.7). Therefore, it
doesn't provide anything that the standard library of Python 3.6+
doesn't have.

Differential Revision: https://phabricator.services.mozilla.com/D117071
2021-06-09 15:48:55 +00:00
Mitchell Hentges 70806e17b5 Bug 1714641: Remove usages of vendored "wptserve_py2" library r=jgraham,ahal
We should only be using the Python3 "wptserve" library at this point.

Differential Revision: https://phabricator.services.mozilla.com/D117062
2021-06-09 15:48:51 +00:00
Mitchell Hentges eca9f5e421 Bug 1714641: Remove `pythonX` actions from virtualenv config r=ahal
The actions are no longer used, so we can delete the associated
logic.

Differential Revision: https://phabricator.services.mozilla.com/D117060
2021-06-09 15:48:51 +00:00
Paul Adenot 36dc6db808 Bug 1714577 - Part 1 - Include the Gecko Profiler include directory in WebRTC.org files. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D116838
2021-06-09 15:43:37 +00:00
Emilio Cobos Álvarez 2c99123249 Bug 1715493 - Update callers of should_replace_task to pass a missing deadline argument. r=ahal a=bustage-fix
Differential Revision: https://phabricator.services.mozilla.com/D117280
2021-06-09 10:58:31 +00:00
Andrey Bienkowski 888618300d Bug 1714376 - Replace a number of "exception.message" usages. r=mhentges,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D116723
2021-06-08 15:50:10 +00:00
Connor Sheehan 632d552e70 Bug 1702017: add a mach doctor check for `invalid locale: UTF-8` r=mhentges
Adds a `mach doctor` check to assert Python's locale is not set to
`UTF-8`, an invalid value due to a Python bug in most pre-3.8 versions.

Differential Revision: https://phabricator.services.mozilla.com/D117081
2021-06-08 15:24:00 +00:00
Connor Sheehan ff302e46aa Bug 1713988: add a check for ssh access to `hg.mozilla.org` to mach doctor r=mhentges
Adds a check that SSH access to hg.mozilla.org is properly configured.
Attempt to run `ssh hg.mozilla.org` which will authorize to hgmo over
SSH via `pash`, without running any commands on the service. In the case
the user has properly configured SSH we will see a success message and
information on the SCM levels granted to the user. If we don't see
a successful connection, parse the output to ensure the user is using
an email address as their username (which is required on hg.mozilla.org).
If the user couldn't connect yet does have an email address as their
username, notify them that they do not have permission to push to hgmo.

Differential Revision: https://phabricator.services.mozilla.com/D117080
2021-06-08 15:23:59 +00:00
Connor Sheehan dc08a2c897 Bug 1713988: add a check that `mozilla.org` is reachable over https r=mhentges
Adds a simple check that a Mozilla domain is reachable over HTTPS.

Differential Revision: https://phabricator.services.mozilla.com/D117079
2021-06-08 15:04:06 +00:00
Connor Sheehan 9f03fdf3e4 Bug 1713988: add a `mach doctor` check for a DNS query r=mhentges
Adds a simple DNS query to `mozilla.org` as a doctor check.
We use `socket.getaddrinfo` to resolve the hostname to IP.

Differential Revision: https://phabricator.services.mozilla.com/D117078
2021-06-08 15:04:06 +00:00
Steve Fink 084cf95676 Bug 1714680 - Implement `mach gtest --list-tests` r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D116904
2021-06-07 20:55:05 +00:00
Mitchell Hentges c2d548efc9 Bug 1712819: Remove redundant pip warning suppression r=ahal
Now that we configure pip within mach virtualenvs to turn off
its "outdated" warning, we no longer need to apply the suppression
as a CLI argument.

Differential Revision: https://phabricator.services.mozilla.com/D116891
2021-06-07 14:46:09 +00:00
Agi Sferro 65b64cb3e0 Bug 1709640 - Rename android-api-16 to android-arm. r=marionette-reviewers,firefox-build-system-reviewers,nalexander,whimboo,aklotz,releng-reviewers,mhentges,glandium,mtabara
We don't offer API splits any more, and with the separation of GeckoView with
the rest of the front-end it's increasingly unlikely that we will in the
future.

This change makes it so that the build name doesn't contain the API version so
that we can update it without breaking all the automation that relies on the
build name.

Differential Revision: https://phabricator.services.mozilla.com/D114369
2021-06-04 22:31:14 +00:00
Sandor Molnar 2a126fe036 Backed out changeset 453cb34e4a4a (bug 1709640) for causing linting failures in perfdocs/config. CLOSED TREE 2021-06-05 01:00:19 +03:00
Agi Sferro ecf4f5f0ad Bug 1709640 - Rename android-api-16 to android-arm. r=marionette-reviewers,firefox-build-system-reviewers,nalexander,whimboo,aklotz,releng-reviewers,mhentges,glandium,mtabara
We don't offer API splits any more, and with the separation of GeckoView with
the rest of the front-end it's increasingly unlikely that we will in the
future.

This change makes it so that the build name doesn't contain the API version so
that we can update it without breaking all the automation that relies on the
build name.

Differential Revision: https://phabricator.services.mozilla.com/D114369
2021-06-04 21:20:56 +00:00
Mitchell Hentges 6ac951e5aa Bug 1713613: Assert unmodified PyPI-vendored packages r=ahal
Adds test to ensure that we don't modify files that are vendored
with PyPI.

If a modification needs to happen to a vendored library, we should
instead:
* Modify the library upstream and vendor the new version, or
* Remove the library from requirements.in and requirements.txt so that
  it's now a "manually-vendored" library. Note that there many be
  issues if this occurs to a library depended on by 3rd-party
  libraries.

Differential Revision: https://phabricator.services.mozilla.com/D116428
2021-06-04 21:19:35 +00:00
Mitchell Hentges b8c530e2f1 Bug 1713613: Require Python 3.6 to update vendored packages r=ahal
Generating Python lockfiles is system-dependent, and this currently
mostly affects us just on the Python 3.6 <=> 3.7 boundary - 3.6 requires
a few additional packages like `importlib_metadata` and `iso8601`.

If a different Python version is used, the test in CI is guaranteed to
fail. By validating in advance, we help future vendoring developers
by helping them avoid the wait before CI failure and the time it
takes to troubleshoot.

Differential Revision: https://phabricator.services.mozilla.com/D116773
2021-06-04 21:19:35 +00:00
Dorel Luca f021feb29f Backed out changeset 68f73772f51e (bug 1714376) for Xpcom failures in builds/worker/checkouts/gecko/xpcom/idl-parser/xpidl/runtests.py. CLOSED TREE 2021-06-04 02:19:33 +03:00
Connor Sheehan 34cac10551 Bug 1713988: rewrite `mach doctor` to be function based, simplify some things r=mhentges
Rewrite `doctor.py` from an object-oriented paradigm to a simpler
function-based architecture. Each check is a function that returns
or yields `DoctorCheck`s. `DoctorCheck`s contain a status that describes
the status of the check (success, warning, fatal error etc), a string
of text with useful information for display to the terminal, and may
optionally attach a callable which can be executed to fix issues found
by the checks.

`mach doctor` is updated to use the new `run_doctor` function instead
of creating a `Doctor` object. The default value of `verbose` in `run_doctor`
is `False`, meaning only issues with the users system are printed to the
screen.

Most of the existing check logic is left intact from the previous
implementation. Checks for `platform` are changed to use the
`sys.platform.startswith` pattern. The latest MozillaBuild version is
pulled by querying the `tip` commit on hg.mozilla.org instead of using
a hard-coded variable.

Differential Revision: https://phabricator.services.mozilla.com/D116539
2021-06-03 22:11:10 +00:00
Mike Hommey d6e973ee86 Bug 1714244 - Use HEAD instead of master by default for `mach vendor yaml` r=releng-reviewers,bhearsum
HEAD is a symbolic ref that points to the default branch of the
repository, it will point to master, main, or anything else that the
repository is using as its default branch.

Differential Revision: https://phabricator.services.mozilla.com/D116678
2021-06-03 20:45:05 +00:00
Andrey Bienkowski a7a4542e20 Bug 1714376 - Replace a number of "exception.message" usages. r=mhentges,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D116723
2021-06-03 20:08:51 +00:00
Alexandru Michis fd44fe5ee5 Bug 1714156 - Fix lint failures in test_manifest.py
CLOSED TREE
2021-06-02 21:25:07 +03:00
june wilde bece79b87e Bug 1714156 - Disallow 0 weeks in frequency in moz.yaml schema; r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D116626
2021-06-02 18:05:49 +00:00
Mike Hommey 2733dbe0dc Bug 1713733 - Remove WASM_LDFLAGS. r=firefox-build-system-reviewers,mhentges
It's not practically make a difference (the flags we end up setting it
to don't do anything when linking all the wasm files into one).

Differential Revision: https://phabricator.services.mozilla.com/D116437
2021-06-02 04:34:20 +00:00
Mitchell Hentges 06a214573a Bug 1712819: Avoid pip's "outdated" warning in virtualenvs r=ahal
Now, when running mach commands that invoke `pip`, it will no longer
inform the user that it needs an update.

We reach into `distutils` to determine the "site-packages" directory
pattern, then apply it to our virtualenv.

Differential Revision: https://phabricator.services.mozilla.com/D115940
2021-05-27 23:04:06 +00:00