Commit Graph
25 Commits
Author SHA1 Message Date
Andrew Halberstadt 28db412cd3 Bug 1752677 - Add a task config to set the 'existing_tasks' parameter, r=releng-reviewers,bhearsum,jcristau
This adds the `-E/--use-existing-tasks` flag to the `fuzzy` or `chooser`
selectors. For example:

  ./mach try fuzzy -E

This queries the Treeherder API to find your latest try push, then any tasks
that exist on that push, but aren't explicitly selected this time, will be
replaced with those older tasks.

You can also run:

  ./mach try fuzzy -E task-id=<task id>

Where `<task id>` is the id of the Decision task from the push you would like
to use as the base.

Differential Revision: https://phabricator.services.mozilla.com/D200380
2024-02-03 02:29:38 +00:00
Cristian Tuns 30405970ad Backed out changeset 1ddc1733cf76 (bug 1752677) for causing python mach failures on mac CLOSED TREE 2024-02-02 12:09:59 -05:00
Andrew Halberstadt 65f169a61f Bug 1752677 - Add a task config to set the 'existing_tasks' parameter, r=releng-reviewers,bhearsum,jcristau
This adds the `-E/--use-existing-tasks` flag to the `fuzzy` or `chooser`
selectors. For example:

  ./mach try fuzzy -E

This queries the Treeherder API to find your latest try push, then any tasks
that exist on that push, but aren't explicitly selected this time, will be
replaced with those older tasks.

You can also run:

  ./mach try fuzzy -E task-id=<task id>

Where `<task id>` is the id of the Decision task from the push you would like
to use as the base.

Differential Revision: https://phabricator.services.mozilla.com/D200380
2024-02-02 16:45:55 +00:00
Mike Hommey 2f82879d0f Bug 1860630 - Upgrade zstandard to 0.22. r=firefox-build-system-reviewers,mach-reviewers,sergesanspaille,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D194184
2023-12-13 02:39:24 +00:00
ahochheiden a7c29534e9 Bug 1843209 - Regenerate the third_party/python lockfile with Python 3.8 as the minimum version r=firefox-build-system-reviewers,glandium,mach-reviewers,ahal
If this is not done, the next person to vendor will also make all of the changes in this commit, which is unnecessary noise.

Differential Revision: https://phabricator.services.mozilla.com/D183450
2023-12-12 03:52:01 +00:00
Tom Marble 7a88122b46 Bug 1682371 - mach skipfails part 2: enable ci r=jmaher,mach-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D195017
2023-11-30 19:38:30 +00:00
Cosmin Sabou 4d28b93ff6 Backed out 2 changesets (bug 1843209) for python3 related browser accessible failures. CLOSED TREE
Backed out changeset 052214d67a99 (bug 1843209)
Backed out changeset 36c5e6c2819f (bug 1843209)
2023-11-23 02:41:22 +02:00
ahochheiden 6d5d8d77dd Bug 1843209 - Regenerate the third_party/python lockfile with Python 3.8 as the minimum version r=firefox-build-system-reviewers,glandium,mach-reviewers,ahal
If this is not done, the next person to vendor will also make all of the changes in this commit, which is unnecessary noise.

Differential Revision: https://phabricator.services.mozilla.com/D183450
2023-11-22 20:07:42 +00:00
Alexandra Borovova a436c61afa Bug 1863685 - Update pathes of h2, hpack, hyperframe packages and use vendored version of h2 for raptor and talos r=perftest-reviewers,mach-reviewers,jgraham,sparky
In the scope of the wptserve update (https://bugzilla.mozilla.org/show_bug.cgi?id=1862598), also h2, hpack, hyperframe packages got updated and changed their folder structure, which requires paths to be updated.

Differential Revision: https://phabricator.services.mozilla.com/D193908
2023-11-19 15:30:34 +00:00
Julien Cristau 19787dd229 Bug 1858455 - update vendored json-e to 4.5.3 r=mach-reviewers,releng-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D190700
2023-10-12 08:13:23 +00:00
Connor Sheehan 6c53680dc2 Bug 1835962: add support for mach try to submit to Lando r=zeid,mach-reviewers,ahochheiden
Add support for submitting stacks of commits to Lando for queueing
on Try, instead of pushing to hg.mozilla.org directly. This patch
implements the Device Code Authorization flow for Auth0, simple changeset
discovery and patch gathering, and submissing to Lando via HTTP POST.

Add a `try.txt` virtualenv site that contains packages from the common
virtualenv as well as the `auth0-python` package for verifying Auth0
JWTs. Use this new virtualenv for `mach try` and related subcommands.
Add a `--push-to-lando` flag that controls whether the push will be made
via the Lando API or using the VCS to hg.mozilla.org directly.

Create a `lando.py` module in the `tryselect` package that handles the
details around submitting to Lando. Authentication is handled by the
Device Code Authorization flow, and the returned access token is saved
to the mozbuild state directory. Auth0 details are added to the `.lando.ini`
file in the repo root, and a `LANDO_TRY_USE_DEV` environment variable can
be set to control submitting to the prod or dev Lando environments.
This module also includes patch stack gathering and discovery via `mozversioncontrol`.

mozversioncontrol's `Repository` subclass is extended with helper functions
to gather patch files from Mercurial and Git. We also add a `try_config_commit`
context manager that creates a temporary commit to hold try syntax commit
messages and/or a `try_task_config.json` file, which is removed from version
control on submission.

The `mach try` cram tests now use a separate virtualenv that must be built
before running, causing unexpected output in the tests. Run `mach try --help`
in the test setup to force the virtualenv to be built before running any
test.

`mach try chooser` would previously install packages for a small web application
from a `requirements.txt` file when run. Install these via the new `try.txt`
site environment instead. The required dependencies are also added to the
`python-test.txt` site since they will cause some tests to fail due to the
missing dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D187641
2023-10-02 14:31:43 +00:00
ahochheiden 137cdeabce Bug 1855716 - Move jsonschema, pyrsistent, and pkgutil_resolve_name dependencies back into mach.txt instead of specifying them in individual sites r=mach-reviewers,ahal
D180501 made the original change that this patch undoes. An earlier
change in that stack inadvertently silently disabled Telemetry, which
hid this issue.

The problem is that `glean` (which we optionally install in the `mach`
site also needs `jsonschema` (and `jsonschema` depends on `pyrsistent`
and `pkgutil_resolve_name`). Since our vendored version was no longer
specified in the `mach.txt` site, it pulled a different version
(`4.19.1`) from the vendored version (`4.17.3`) which causes issues in
the `wpt` site.

Since glean explicitly needs `jsonschema` it never should have been
taken out of the `mach` site, so this patch corrects that mistake.

Differential Revision: https://phabricator.services.mozilla.com/D189553
2023-09-28 20:42:50 +00:00
Connor Sheehan fe70aea21e Bug 1854496: update vendored aiohttp/requests and add new dependencies r=firefox-build-system-reviewers,mach-reviewers,ahochheiden
Update `aiohttp` to version 3.8.5 and `requests` to version 2.31.0,
and vendor their respective dependencies. Add all the new dependencies
to the various required site virtualenv requirements files.

Differential Revision: https://phabricator.services.mozilla.com/D188904
2023-09-25 14:22:11 +00:00
Logan Rosen 673c4dae7f Bug 1786490 - remove references to vendored pyparsing r=sylvestre,mach-reviewers,ahal,ahochheiden
Not necessary because pyparsing is no longer a dependency of packaging, so it is no longer vendored.

Differential Revision: https://phabricator.services.mozilla.com/D186411
2023-09-06 16:14:30 +00:00
Tom Marble 42cca5a7ec Bug 1779473 - Add TOML support to manifestparser r=jmaher,ahal
ManifestParser will read TOML files, if present, when use_toml=True
Added tomlkit as a third_party python package
Added poetry-core and tomlkit to pypi (separately as Bug 1845383, Bug 1844787)
Adds TOML test coverage
Adds tomlkit as a dependency of mozharness (in test_archive.py)
Added tomlkit to virtualenv_modules in testing/mozharness/configs/unittests
Removes dependency on six

testing/tools/mach_test_package_initialize.py
- Corrected SEARCH_PATHS

testing/mozharness/mozharness/mozilla/testing/per_test_base.py
- moved `from manifestparser import TestManifest` into function call
  to avoid harness inability to locate the internal artifact
- Removed linter warnings

testing/mozbase/manifestparser/manifestparser/manifestparser.py
- Removed linter warnings
- Updated logger usage pattern
- Simplifed _read logic, refactored get_fp_filename()
- Improve context for `include:` logging message
- Defer `import mozlog` until the point of use

testing/mozbase/manifestparser/manifestparser/toml.py
- Removed linter warnings
- Removed unused logger
- Improved readability of read_toml()

testing/mozbase/manifestparser/manifestparser/ini.py
- Removed linter warnings
- Removed unused logger

testing/mozbase/manifestparser/manifestparser/filters.py
- Removed linter warnings

testing/mozbase/manifestparser/tests/test_chunking.py
- Removed linter warnings

Bumped manifestparser version to 2.2.31

Differential Revision: https://phabricator.services.mozilla.com/D184020
2023-07-27 20:16:19 +00:00
ahochheiden ab506f6507 Bug 1808732 - Move various dependencies out of the mach site to either the specific site they're needed in (like build, or lint), and/or to common` r=firefox-build-system-reviewers,glandium
Now that we selectively load command modules, and activate the command
virtualenv much earlier in the mach process, a lot of the module
dependencies specified in `mach.txt` are no longer necessary there. With
their removal from `mach.txt` they will no longer be automatically
inherited by every site, which reduces potential dependency conflicts
for specific sites.

The `common` site still effectively has the same set of dependencies.
This is the default site that all commands use unless otherwise
specified. Most commands use this site, and going through every command
and seeing if a dependency is or isn't needed, then deciding if or if
not to create a new site for that command made sense was too time
consuming to do here.

Essentially the idea here going forward is that if you're trying to
add/update a new dependency to a command that is currently defaulting to
the `common` site and there is a conflict with one of the dependencies
in `common` you can move your command to a new site specifically for
your command, and you will have the minimal possible set of dependencies
a mach command can have, improving the odds that you can add the
module(s) you need for your command.

Depends on D180500

Differential Revision: https://phabricator.services.mozilla.com/D180501
2023-07-25 00:24:53 +00:00
Natalia Csoregi cacfbf2c5f Backed out changeset 49a85b3b07e0 (bug 1808732) as per request. a=backout 2023-07-19 17:29:41 +03:00
ahochheiden ee86a5187f Bug 1808732 - Move various dependencies out of the mach site to either the specific site they're needed in (like build, or lint), and/or to common` r=firefox-build-system-reviewers,glandium
Now that we selectively load command modules, and activate the command
virtualenv much earlier in the mach process, a lot of the module
dependencies specified in `mach.txt` are no longer necessary there. With
their removal from `mach.txt` they will no longer be automatically
inherited by every site, which reduces potential dependency conflicts
for specific sites.

The `common` site still effectively has the same set of dependencies.
This is the default site that all commands use unless otherwise
specified. Most commands use this site, and going through every command
and seeing if a dependency is or isn't needed, then deciding if or if
not to create a new site for that command made sense was too time
consuming to do here.

Essentially the idea here going forward is that if you're trying to
add/update a new dependency to a command that is currently defaulting to
the `common` site and there is a conflict with one of the dependencies
in `common` you can move your command to a new site specifically for
your command, and you will have the minimal possible set of dependencies
a mach command can have, improving the odds that you can add the
module(s) you need for your command.

Depends on D180500

Differential Revision: https://phabricator.services.mozilla.com/D180501
2023-07-19 05:09:01 +00:00
Sandor Molnar 28a570d783 Backed out 6 changesets (bug 1842700, bug 1695312, bug 1808732) for causing lint failures. CLOSED TREE
Backed out changeset 0413a48d4f03 (bug 1808732)
Backed out changeset 2839c2d35459 (bug 1695312)
Backed out changeset eab5cdaf4bc9 (bug 1695312)
Backed out changeset a35da3fce458 (bug 1695312)
Backed out changeset 6d2a2dd4790b (bug 1695312)
Backed out changeset b8cf086066cf (bug 1842700)
2023-07-13 15:01:55 +03:00
ahochheiden 7ee972528f Bug 1808732 - Move various dependencies out of the mach site to either the specific site they're needed in (like build, or lint), and/or to common` r=firefox-build-system-reviewers,glandium
Now that we selectively load command modules, and activate the command
virtualenv much earlier in the mach process, a lot of the module
dependencies specified in `mach.txt` are no longer necessary there. With
their removal from `mach.txt` they will no longer be automatically
inherited by every site, which reduces potential dependency conflicts
for specific sites.

The `common` site still effectively has the same set of dependencies.
This is the default site that all commands use unless otherwise
specified. Most commands use this site, and going through every command
and seeing if a dependency is or isn't needed, then deciding if or if
not to create a new site for that command made sense was too time
consuming to do here.

Essentially the idea here going forward is that if you're trying to
add/update a new dependency to a command that is currently defaulting to
the `common` site and there is a conflict with one of the dependencies
in `common` you can move your command to a new site specifically for
your command, and you will have the minimal possible set of dependencies
a mach command can have, improving the odds that you can add the
module(s) you need for your command.

Depends on D180500

Differential Revision: https://phabricator.services.mozilla.com/D180501
2023-07-13 05:41:21 +00:00
ahochheiden 5040e0ee22 Bug 1831691 - Use the vendored 'glean_parser' for all of mach r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D177340
2023-05-06 21:07:09 +00:00
Mitchell Hentges 1ad3706fbc Bug 1763695: Move python-test poetry to ini "requirements" r=ahal
The `test_vendor.py` test needs access to `poetry` to make its
assertions. This requirement was previously satisfied by adding `poetry`
to the `python-test` site.

Unfortunately, this caused conflicts when running the `mozlint` tests,
as they use the ini "requirements" feature to install their
dependencies. Importantly, the `mozlint` dependencies aren't compatible
with the version of `poetry` we need.

Fortunately, this was a good reminder: since `poetry` is a test-specific
dependency, leverage the existing ini "requirements" feature as it
represents exactly that: the extra package dependencies of a specific
test.

Note that I had to doctor the `dataclass` line in
`vendor_requirements.txt` to include an environment marker, otherwise it
would fail to install with Python >= 3.7.

Differential Revision: https://phabricator.services.mozilla.com/D143376
2022-04-19 19:10:38 +00:00
Mitchell Hentges d62f3b8a4e Bug 1659593: Make ./mach vendor python cross-platform r=ahal
Use `poetry` instead of `pip-compile`, then leverage `pip` to assert
that there's no conflicts between environments.

This enables simplifying `requirements.in`, since `colorama` is now
automatically picked up, as vendoring is no longer linux-py3.6-specific.

`poetry==1.2.0a2` was chosen because it was the first version that would
include `pip`/`setuptools`/`wheel` in the `requirements.txt`, yet it was
also the last version that supports Python 3.6 (as still used in CI in
some spots).

Sorry about the `requirements.txt` noise, that's because poetry doesn't
sort hashes yet [1]. Fortunately, you can be confident in
`requirements.txt` changes by checking that this patch doesn't include
changes to vendored packages themselves (I'm including the results of a
`./mach vendor python`).

[1] https://github.com/python-poetry/poetry/issues/5408

Differential Revision: https://phabricator.services.mozilla.com/D142884
2022-04-07 18:00:28 +00:00
Mitchell Hentges bcba18107d Bug 1732795: Update pytest to 7.0.1 r=ahal
`4.6.6` was 3 years old. There's been many helpful features and
ergonomics improvements in the years since.

Differential Revision: https://phabricator.services.mozilla.com/D140679
2022-04-04 17:03:33 +00:00
Mitchell Hentges eb3080a220 Bug 1724274: Move virtualenv dependency manifests to python/virtualenvs r=ahal
This is needed for a few reasons:
* All mach commands can use virtualenvs, not just `build`-related
  commands, so the files don't make sense to be in `build/`.
* When locking is added, more files associated with virtualenvs will be
  added, and this will change will ease the related directory structure
  setup.
* This removes the need for a redundant "_virtualenv_packages" keyword
  as part of the manifest filenames.

Differential Revision: https://phabricator.services.mozilla.com/D140382
2022-03-24 14:04:34 +00:00