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

592 Коммитов

Автор SHA1 Сообщение Дата
Henrik Skupin 86812cc161 Bug 1929112 - [wpt] Remove the wpt fissionregressions command and CI tests. r=jgraham,cpeterson,jmaher
Differential Revision: https://phabricator.services.mozilla.com/D228146
2024-11-07 09:06:55 +00:00
Andrew Halberstadt 09d19b515b Bug 1928709 - Remove 'cram' test harness from the tree, r=jmaher,mach-reviewers,ahochheiden
This is no longer being used and the upstream project is unmaintained.

Differential Revision: https://phabricator.services.mozilla.com/D227869
2024-11-06 19:03:16 +00:00
Andrew Halberstadt 1be9df47d2 Bug 1928697 - [mach] Fix bug restoring parser defaults in Registrar.dispatch, r=mach-reviewers,ahochheiden
Wow, this one was fun to debug. I was attempting to write some Python
tests that wrap around mach.run and then validate the output (in order
to get rid of our cramtest framework). But I had an issue where any
tests that ran after an earlier test, would have the wrong arguments
set. It turns out that the earlier test hits a code path that calls into
Registrar.dispatch(). And this method is supposed to temporarily mutate
the defaults of the argument parser:
https://searchfox.org/mozilla-central/rev/0d0eef18ea91e38ddfb82a1ac5d6560a146da5c0/python/mach/mach/registrar.py#185

The problem is that it doesn't properly restore state. This is because
ArgumentParser.set_defaults mutates both, parser._defaults as well as
parser._actions (which themselves can have a default). So we need to
restore both of those. We also need to use deepcopy rather than copy or
it doesn't work. And for good measure I threw both of them into a
finally block in case parsing the arguments raises an exception that
would get caught and handled downstream (e.g a test that is testing
invalid arguments).

Differential Revision: https://phabricator.services.mozilla.com/D227679
2024-11-06 19:03:14 +00:00
Sylvestre Ledru d35ba16a18 Bug 1918098 - ruff: fix the errors identified by 0.6.4 r=linter-reviewers,taskgraph-reviewers,releng-reviewers,webdriver-reviewers,perftest-reviewers,migration-reviewers,jmaher,whimboo,sparky,xpcom-reviewers,beth,ahal,mconley
Differential Revision: https://phabricator.services.mozilla.com/D221874
2024-11-06 12:51:32 +00:00
Sylvestre Ledru cd289bcb06 Bug 1921433 - reformat with black 24.8.0 r=linter-reviewers,webdriver-reviewers,perftest-reviewers,taskgraph-reviewers,releng-reviewers,dom-storage-reviewers,janv,jmaher,whimboo,afinder,ahal
Differential Revision: https://phabricator.services.mozilla.com/D223963
2024-11-03 20:28:59 +00:00
Aaditya Dhingra 2c62134ede Bug 1897186 - Add fenix and focus tests to mach test. r=nalexander,ohall,jmaher
Commands added:

`mach test fenix` runs all tests for fenix
`mach test focus` runs all tests for focus
`mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/TranslationsDialogBindingTest.kt` will run all tests in the file.
`mach test mobile/android/fenix/app/src/test/java/org/mozilla/fenix/translations/` will run all tests in the directory.

Differential Revision: https://phabricator.services.mozilla.com/D224885
2024-10-22 16:49:36 +00:00
Paul Adenot 5084131713 Bug 1923830 - Print commands in a way that is easy to copy paste in case of non-zero return code. r=jcristau
Differential Revision: https://phabricator.services.mozilla.com/D225186
2024-10-10 12:23:02 +00:00
ahochheiden c9e529ace1 Bug 1920039 - Do not set `SIGKILL` signal on Windows since it's not available r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D223643
2024-10-07 16:35:58 +00:00
ahochheiden e33652c3e7 Bug 1920152 - Replace 'poetry' with 'uv' for './mach vendor python' r=ahal,mach-reviewers
The vendoring steps are the same. Instead of using 'poetry' to handle
dependency resolution and creating a lock file, we now use 'uv'. That
lock file is then used to create a cross-platform 'requirements.txt'
file by 'uv'.

How the 'requirements.txt' file is consumed by 'pip' to download the
dependencies is unchanged.

Differential Revision: https://phabricator.services.mozilla.com/D222989
2024-10-03 14:47:54 +00:00
ahochheiden 6521de45ff Bug 1919736 - Remove a site's virtualenv_root directory when failing to create the site r=firefox-build-system-reviewers,sergesanspaille
This prevents us from being in an incomplete state that's less
predictable.

Differential Revision: https://phabricator.services.mozilla.com/D223645
2024-10-02 19:59:02 +00:00
ahochheiden c1079fd32b Bug 1919736 - Handle the case where the site metadata file is missing when determining if the site is up-to-date or not r=firefox-build-system-reviewers,glandium
With this change, if it's missing, the site will be rebuilt, which then
should also generate a valid metadata file.

Differential Revision: https://phabricator.services.mozilla.com/D223394
2024-10-01 18:40:31 +00:00
Francesco Lodolo (:flod) d0059173bd Bug 1917163 - Update rstcheck to 6.2.4, fix resulting errors in documents, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D221287
2024-09-06 15:04:10 +00:00
Cristina Horotan c6ba4c0134 Backed out changeset 4e2df2c48e4b (bug 1917163) for causing mozlint failure. CLOSED TREE 2024-09-06 16:57:11 +03:00
Francesco Lodolo (:flod) fd657600c1 Bug 1917163 - Update rstcheck to 6.2.4, fix resulting errors in documents, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D221287
2024-09-06 12:17:06 +00:00
Mike Hommey 4c28032ab8 Bug 1906191 - Change how ProcessHandler handles output_timeout. r=releng-reviewers,gbrown
First and foremost, this undoes the patch for bug 1845125, which causes
other problems (e.g. output being dropped past a certain point).

The rest of the patch addresses bug 1845125 at the root: Ultimately, this
is a similar problem to bug 1863675.

wait is blocked on joining the stream reader thread, but the stream
reader thread is blocked on readline because the process is finished but
hasn't been waited on yet.

So joining the stream reader thread after the process is known to have
been finished is expected to work more reliably... except when a child
has been spun up that keeps it alive. In this case, we just keep the
reader thread working in the background, which is a similar strategy to
what was done in bug 1863675.

Differential Revision: https://phabricator.services.mozilla.com/D218389
2024-08-26 23:49:06 +00:00
ahochheiden e7e2018aab Bug 1887885 - Collect the target architecture of a build r=firefox-build-system-reviewers,glandium
Added one field:
 - The `--target` of a build.

Re-added `python/mach/metrics.yaml` to `./mach doc mach-telemetry` generation (Not sure why it was missing).

Re-generated the associated docs. (It looks like this was not done for previously when other fields were added.

Differential Revision: https://phabricator.services.mozilla.com/D208811
2024-07-09 19:57:45 +00:00
ahochheiden 106baffe33 Bug 1894154 - Enable telemetry in CI r=firefox-build-system-reviewers,glandium
Also collect boolean flag `moz_automation` to allow filtering between
CI/Automation telemetry and the rest.

Differential Revision: https://phabricator.services.mozilla.com/D209272
2024-07-09 19:57:45 +00:00
Emilio Cobos Álvarez 8fa7c1f7cf Bug 1898258 - Add and document mach gen-uuid. r=smaug
The website in our docs no longer works for $reasons, this is a direct
port to python.

Differential Revision: https://phabricator.services.mozilla.com/D211219
2024-05-22 14:52:20 +00:00
Chris H-C 96db3322cd Bug 1896732 - Introducing `mach gifft` to generate Glean metric definitions for named Legacy probes r=TravisLong
Currently only supports events.

Differential Revision: https://phabricator.services.mozilla.com/D210690
2024-05-17 13:24:50 +00:00
Tamas Szentpeteri a0fd2ca353 Backed out changeset 0a1f42ba0143 (bug 1896732) for causing fatal errors while processing mozzbuild file. CLOSED TREE 2024-05-16 23:32:08 +03:00
Chris H-C 4204463ce6 Bug 1896732 - Introducing `mach gifft` to generate Glean metric definitions for named Legacy probes r=TravisLong
Currently only supports events.

Differential Revision: https://phabricator.services.mozilla.com/D210690
2024-05-16 20:08:15 +00:00
ahochheiden dd1abfa37f Bug 1894157 - Remove Python2 compatibility code in Mach r=firefox-build-system-reviewers,glandium
Mach can currently only run on Python version 3.8 or higher, so it
doesn't make sense to continue having dead code that provides support
for Python2.

Differential Revision: https://phabricator.services.mozilla.com/D209030
2024-05-01 02:32:23 +00:00
ahochheiden fe0d52d049 Bug 1894156 - Remove usage of six in mach/telemetry.py r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D209029
2024-05-01 02:32:23 +00:00
ahochheiden 7682a10da3 Bug 1894155 - Replace `mhentges@mozilla.com` with `ahochheiden@mozilla.com` from `notification_emails` section of `pings.yaml` and `metrics.yaml` r=sylvestre
Mitch has been inactive for ~2 years now. I don't necessarily needs to
add myself in his stead, but I think it makes sense to have me on there
as the current triage owner.

Differential Revision: https://phabricator.services.mozilla.com/D209031
2024-05-01 00:12:25 +00:00
Tooru Fujisawa 062a816962 Bug 1893252 - Skip MozillaBuild version check outside of MozillaBuild. r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D208561
2024-04-25 01:19:51 +00:00
serge-sans-paille e003bc34c6 Bug 1891778 - Move mozilla_build_version out of mozbuild/util.py r=ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D207594
2024-04-19 09:08:57 +00:00
Tooru Fujisawa 127341e842 Bug 1892103 - Remove ./mach esmify command. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D207927
2024-04-19 08:21:17 +00:00
Tim Giles 5814664326 Bug 1888952 - Add 'buildtokens' mach command. r=reusable-components-reviewers,mach-reviewers,hjones
This new command will make it easier to work with the JSON source of
truth for our design tokens. Unfortunately the noisy output when
building the tokens is expected. We can fix this issue by upgrading
to Style Dictionary v4 when it is available and changing the logging
level.[1]

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1889645

Differential Revision: https://phabricator.services.mozilla.com/D206561
2024-04-05 17:43:11 +00:00
Tim Giles 71d46638de Bug 1889469 - Add 'addstory' command to MACH_COMMANDS. r=reusable-components-reviewers,mstriemer,mach-reviewers
Looks like this command didn't get added to the MACH_COMMANDS list which
means 'addstory' will throw an error when you try and use it.

Differential Revision: https://phabricator.services.mozilla.com/D206548
2024-04-05 17:43:11 +00:00
Perry McManis 5c3cf2d4f7 Bug 1888703 - add a mach command to create a legacy event definition from a glean one r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D206281
2024-04-04 13:01:07 +00:00
Tomislav Jovanovic c346a789f6 Bug 1880764 - Initial TypeScript tooling r=mossop,Standard8
* Initial tools/ts setup.
* Mach commands for buidling xpcom related typelibs.
* Mach command for updating the typelib references.
* Mach command for type-checking js projects.

Also included the dom typelib for reference.

Differential Revision: https://phabricator.services.mozilla.com/D197620
2024-03-15 19:20:45 +00:00
Haik Aftandilian bac222e41f Bug 1876902 - Provide a way to sign macOS builds locally r=mach-reviewers,hneiva r!#mach-reviewers
Introduce a `./mach macos-sign` command that can be used to sign local packaged builds for manual testing.

Differential Revision: https://phabricator.services.mozilla.com/D199804
2024-02-29 22:58:17 +00:00
Cristian Tuns 08a71b5d1d Backed out changeset e8d20bbb8f68 (bug 1876902) for causing rst lint failures in signing_macos_build.rst CLOSED TREE 2024-02-29 15:11:00 -05:00
Haik Aftandilian dc95368b38 Bug 1876902 - Provide a way to sign macOS builds locally r=mach-reviewers,hneiva r!#mach-reviewers
Introduce a `./mach macos-sign` command that can be used to sign local packaged builds for manual testing.

Differential Revision: https://phabricator.services.mozilla.com/D199804
2024-02-29 19:53:53 +00:00
ahochheiden 66001aead0 Bug 1877347 - Replace `distutils.util.strtobool` with a custom `strtobool` within `mach` r=firefox-build-system-reviewers,glandium
The migration advice (https://peps.python.org/pep-0632/#migration-advice)
suggests reimplementing the functionality as per the docs (https://docs.python.org/3.9/distutils/apiref.html#distutils.util.strtobool)
which is exactly what I've done here.

Differential Revision: https://phabricator.services.mozilla.com/D199950
2024-02-26 18:01:04 +00:00
Cristian Tuns ac412e192f Backed out changeset 9b5ebc2d3b4b (bug 1877347) as requested by Aryx on element. CLOSED TREE 2024-02-09 18:51:43 -05:00
ahochheiden 664c1ecf7c Bug 1877347 - Replace `distutils.util.strtobool` with a custom `strtobool` within `mach` r=firefox-build-system-reviewers,glandium
The migration advice (https://peps.python.org/pep-0632/#migration-advice)
suggests reimplementing the functionality as per the docs (https://docs.python.org/3.9/distutils/apiref.html#distutils.util.strtobool)
which is exactly what I've done here.

Differential Revision: https://phabricator.services.mozilla.com/D199950
2024-02-09 23:41:09 +00:00
Butkovits Atila f6dfec02e6 Backed out changeset 3ccc5333fce1 (bug 1877347) for causing partial generation build bustages. a=backout 2024-02-09 13:39:27 +02:00
ahochheiden 377b24d2da Bug 1877348 - Remove the `try/except` wrappers that end up calling `distutils.core.setup` r=firefox-build-system-reviewers,glandium
This is one of the last references to `distutils` within `mach`, so
let's get rid of it to be thorough.

Differential Revision: https://phabricator.services.mozilla.com/D199951
2024-02-08 21:07:27 +00:00
ahochheiden 3b703e5316 Bug 1877347 - Replace `distutils.util.strtobool` with a custom `strtobool` within `mach` r=firefox-build-system-reviewers,glandium
The migration advice (https://peps.python.org/pep-0632/#migration-advice)
suggests reimplementing the functionality as per the docs (https://docs.python.org/3.9/distutils/apiref.html#distutils.util.strtobool)
which is exactly what I've done here.

Differential Revision: https://phabricator.services.mozilla.com/D199950
2024-02-08 21:07:26 +00:00
ahochheiden d44d931081 Bug 1878021 - Print the messages for `InvalidRepoPath` and `MissingVCSTool` when `_get_repository_object` encounters those exceptions r=firefox-build-system-reviewers,glandium
This should make it easier for a user to troubleshoot the problem,
instead of trying to decipher a subsequent exception from a function
call being attempted on the `None` returned by this function.

Differential Revision: https://phabricator.services.mozilla.com/D200496
2024-02-08 07:08:53 +00:00
ahochheiden fd25a02df1 Bug 1874208 - Remove the always printed `Site not up-to-date reason` r=firefox-build-system-reviewers,glandium
While this message was sometimes useful to help troubleshoot for end
users, it's causing issues parsing `stdout` (since it can't use the mach
logging infrastructure due to being too early in the startup). We also
can't use `stderr` since some mozharness scripts treat any `stderr`
output as a full error.

Differential Revision: https://phabricator.services.mozilla.com/D198451
2024-01-16 17:49:06 +00:00
Narcis Beleuzu c35689e579 Backed out changeset 120bb0115412 (bug 1874208) for causing BP bustages. 2024-01-12 09:02:06 +02:00
ahochheiden 44523c0504 Bug 1874208 - Only output the `Site not up-to-date reason` to `stderr` r=firefox-build-system-reviewers,glandium
It's not technically an error, but we can't make it debug level output
since the mach logging isn't available this early on startup. There's
precedent for using `stderr` output elsewhere in `site.py`, though it
usually precedes an exception being raised.

Differential Revision: https://phabricator.services.mozilla.com/D198307
2024-01-12 02:11:35 +00:00
ogiorgis 111705f5fd Bug 1840493 - doc/rst: fix some languages declaration r=firefox-source-docs-reviewers,webdriver-reviewers,necko-reviewers,geckoview-reviewers,devtools-reviewers,profiler-reviewers,championshuttler,whimboo,nchevobbe,julienw,amejiamarmol
Differential Revision: https://phabricator.services.mozilla.com/D196268
2023-12-13 18:32:20 +00:00
Joel Maher 009710fe6f Bug 1869430 - Batch 19.2 convert python unittest .ini -> .toml. r=gbrown,taskgraph-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D196124
2023-12-12 17:40:03 +00:00
ahochheiden da48f565f7 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
ogiorgis ae692e937f Bug 1749473 - fix autodoc import warning r=sylvestre DONTBUILD
NameError: name 'self' is not defined

Depends on D196011

Differential Revision: https://phabricator.services.mozilla.com/D196012
2023-12-11 10:09:09 +00:00
Andrew Halberstadt 757f0bf16a Bug 1867990 - Fix black formatting errors that snuck in due to regression, r=linter-reviewers,taskgraph-reviewers,releng-reviewers,bhearsum,sylvestre
These were not caught due to bug 1865672.

Depends on D195431

Differential Revision: https://phabricator.services.mozilla.com/D195432
2023-12-04 14:51:39 +00:00
Tom Marble 3cf3eee656 Bug 1682371 - mach skipfails part 1: add dependencies r=jmaher,mach-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D193150
2023-11-29 00:12:23 +00:00