Commit Graph

557 Commits

Author SHA1 Message Date
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
Cosmin Sabou
f35f3f7628 Backed out changeset 4c5b3ec73a9a (bug 1682371) for python related failures. CLOSED TREE 2023-11-28 01:20:46 +02:00
Tom Marble
476009c507 Bug 1682371 - mach skipfails part 1: add dependencies r=jmaher,mach-reviewers,ahal
Differential Revision: https://phabricator.services.mozilla.com/D193150
2023-11-27 23:00:41 +00:00
ahochheiden
533fde5564 Bug 1865915 - Make the suggest_command code run before activating a virtualenv so that suggest command's venv is activated r=firefox-build-system-reviewers,sergesanspaille
I wasn't able to modify `sys.argv[1]` with the `suggested_command` and have
it propagate to `dispatcher.py`, so the code still has to run in both
places, otherwise there's crashes for trying to access invalid command
handlers.

Differential Revision: https://phabricator.services.mozilla.com/D194599
2023-11-27 07:50:18 +00:00
ahochheiden
b00f709d6d Bug 1866382 - Properly get the aliased command name for dictionary lookup r=firefox-build-system-reviewers,sergesanspaille
The previous implementation had an error where only aliases that were 1:1 with the dictionary would work.

Differential Revision: https://phabricator.services.mozilla.com/D194591
2023-11-27 07:50:18 +00:00
Cosmin Sabou
720d42893d 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
02c5e485e8 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
Chris H-C
efd2596fde Bug 1852098 - mach command gen-use-counter-metrics r=emilio,firefox-build-system-reviewers,ahochheiden
Takes use counter definitions and generates a use_counter_metrics.yaml with
`counter` metric definitions for each use counter and denominator.

Total use counters at time of writing: 2271 (excludes denominators)

Differential Revision: https://phabricator.services.mozilla.com/D193246
2023-11-21 17:09:52 +00:00
ahochheiden
272742b40d Bug 1857279 - Load @SettingsProvider settings early so that we can parse set aliases and load the correct virtualenv r=ahal
Aliased commands have not loaded the virtualenv associated with a
command/subcommand since bug 1695312. It has been defaulting to the
`common` virtualenv, which worked most of the time since most commands
use `common` and it also contains a large share of our dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D192376
2023-11-20 18:05:57 +00:00
ahochheiden
f605774f28 Bug 1857279 - Consolidate all mach @SettingsProvider hooks in one file and class and have them execute very early during mach_initialize() r=ahal
The only remaining @SettingsProvider hooks should be in test files.

Differential Revision: https://phabricator.services.mozilla.com/D192375
2023-11-20 18:05:57 +00:00
Narcis Beleuzu
3f6ba0d4ad Backed out 7 changesets (bug 1852098) for bustages on UseCounterMetrics.h . CLOSED TREE
Backed out changeset 3b87419a9eea (bug 1852098)
Backed out changeset d9c7c84c82df (bug 1852098)
Backed out changeset e594c7eebb91 (bug 1852098)
Backed out changeset 15e0b0bd3bfb (bug 1852098)
Backed out changeset 220e9ee63ec3 (bug 1852098)
Backed out changeset 9edef145d1c5 (bug 1852098)
Backed out changeset 920a798dbb8a (bug 1852098)
2023-11-16 01:00:42 +02:00
Chris H-C
adcd2dc7f9 Bug 1852098 - mach command gen-use-counter-metrics r=emilio,firefox-build-system-reviewers,ahochheiden
Takes use counter definitions and generates a use_counter_metrics.yaml with
`counter` metric definitions for each use counter and denominator.

Total use counters at time of writing: 2271 (excludes denominators)

Differential Revision: https://phabricator.services.mozilla.com/D193246
2023-11-15 21:32:40 +00:00
Stanca Serban
1a7724cfd6 Backed out 7 changesets (bug 1852098) for causing build bustages in UseCounterMetrics.cpp. CLOSED TREE
Backed out changeset 2caabd4bfe86 (bug 1852098)
Backed out changeset 5c174b0ee1ab (bug 1852098)
Backed out changeset 05ba23510b93 (bug 1852098)
Backed out changeset 256984effaa2 (bug 1852098)
Backed out changeset 8bed08cf2a68 (bug 1852098)
Backed out changeset 16b0698a239d (bug 1852098)
Backed out changeset 6e8d54a51fb7 (bug 1852098)
2023-11-15 23:02:32 +02:00
Chris H-C
6aaf4230a3 Bug 1852098 - mach command gen-use-counter-metrics r=emilio,firefox-build-system-reviewers,ahochheiden
Takes use counter definitions and generates a use_counter_metrics.yaml with
`counter` metric definitions for each use counter and denominator.

Total use counters at time of writing: 2271 (excludes denominators)

Differential Revision: https://phabricator.services.mozilla.com/D193246
2023-11-15 17:01:28 +00:00
Cristian Tuns
cfd3ae2be5 Backed out 3 changesets (bug 1857279) for causing try failures with exit status 1 CLOSED TREE
Backed out changeset 4c1965a65011 (bug 1857279)
Backed out changeset b9885d1b6980 (bug 1857279)
Backed out changeset 76706ea52991 (bug 1857279)
2023-11-06 13:12:25 -05:00
ahochheiden
5cfd70f690 Bug 1857279 - Load @SettingsProvider settings early so that we can parse set aliases and load the correct virtualenv r=ahal
Aliased commands have not loaded the virtualenv associated with a
command/subcommand since bug 1695312. It has been defaulting to the
`common` virtualenv, which worked most of the time since most commands
use `common` and it also contains a large share of our dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D192376
2023-11-06 17:08:32 +00:00
ahochheiden
4f09acb466 Bug 1857279 - Consolidate all mach @SettingsProvider hooks in one file and class and have them execute very early during mach_initialize() r=ahal
The only remaining @SettingsProvider hooks should be in test files.

Differential Revision: https://phabricator.services.mozilla.com/D192375
2023-11-06 17:08:31 +00:00
Mike Hommey
7eeae1609b Bug 1858776 - Remove "build tasks" tracking. r=firefox-build-system-reviewers,sergesanspaille
It was added in bug 1646794 and is now redundant with what was done more
generally in bug 1850647, although bug 1850647 doesn't keep track of all
arguments, but we've never made use of that information.

Differential Revision: https://phabricator.services.mozilla.com/D190854
2023-10-18 05:28:25 +00:00
serge-sans-paille
65ae75234f Bug 1857516 - Get rid of deprecated imp python module in favor of importlib r=saschanaz CLOSED TREE
Following the official migration guide from
https://docs.python.org/3/whatsnew/3.12.html#imp

Differential Revision: https://phabricator.services.mozilla.com/D190465
2023-10-17 09:17:47 +00:00
Norisz Fay
1aa4e4dfed Backed out changeset 7f8e4fcfcbfa (bug 1857516) for causing web platform test failures CLOSED TREE 2023-10-17 13:33:51 +03:00
serge-sans-paille
2043e40f57 Bug 1857516 - Get rid of deprecated imp python module in favor of importlib r=saschanaz
Following the official migration guide from
https://docs.python.org/3/whatsnew/3.12.html#imp

Differential Revision: https://phabricator.services.mozilla.com/D190465
2023-10-17 09:17:47 +00:00
serge-sans-paille
5b54c95306 Bug 1858056 - Favor RawConfigParser.read_file instead of deprecated readfp r=saschanaz
readfp is deprecated since Python 3.2

Differential Revision: https://phabricator.services.mozilla.com/D190532
2023-10-10 16:36:17 +00:00
ahochheiden
8ab1c0738b Bug 1855312 - Check against all possible 'Mach' sites when activating telemetry, rather than just the mach site r=sheehan
Changes in Bug 1695312 made it so the actual command site is activated
much sooner, as such, at this point in the program execution, any of the
'Mach' sites can be active, so we should check against all of them.

In the past, the 'mach' site was the only one that could be active at
this time, so it was the only one that was needed to be checked for.

Differential Revision: https://phabricator.services.mozilla.com/D189290
2023-09-27 17:04:33 +00:00
Alexandre Poirot
2e2e9b1590 Bug 1320607 - [devtools] Remove the generated CSS Properties database. r=devtools-reviewers,nchevobbe
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.

Differential Revision: https://phabricator.services.mozilla.com/D187492
2023-09-07 20:59:34 +00:00
Butkovits Atila
ef58dad0ea Backed out changeset fb19de542f01 (bug 1320607) for causing python failures complaining about test_devtools_database_parsing . CLOSED TREE 2023-09-07 18:58:05 +03:00
Alexandre Poirot
622b937669 Bug 1320607 - [devtools] Remove the generated CSS Properties database. r=devtools-reviewers,nchevobbe
This wasn't really used anymore.
We are fetching the database from the server runtime in order to support
remote debugging correctly, where frontend CSS may be different from debuggee CSS.

Differential Revision: https://phabricator.services.mozilla.com/D187492
2023-09-07 13:08:37 +00:00
Logan Rosen
f024d94b2b Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D186092
2023-09-06 16:14:30 +00:00
Logan Rosen
51f5fcdd75 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
Vinny Diehl
30d47ab8f9 Bug 1848308 - Properly quote args in run_process logs r=firefox-build-system-reviewers,ahochheiden,glandium
Differential Revision: https://phabricator.services.mozilla.com/D185992
2023-08-18 19:29:19 +00:00
Kagami Sascha Rosylight
5dc325c4e3 Bug 1846335 - Use f-string for exit code exception r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D186218
2023-08-17 11:18:23 +00:00
ahochheiden
f71b25f3ce Bug 1845833 - Add the ability to specify command dependencies for commands r=firefox-build-system-reviewers,glandium
This just forces other command modules to be loaded in addition to the
'base' command. We need this so that decorators needed by the 'base'
command that are in another command module are ran during initialization
(eg: `@SettingsProvider`).

I thought about centralizing the `@SettingsProvider` decorators into one
module and always loading it, but they can depend on the
'command_handlers' in `Registrar`, so the modules they're currently in
have to be loaded for them to execute, so there wasn't a way around
this.

Differential Revision: https://phabricator.services.mozilla.com/D184852
2023-08-01 19:59:25 +00:00
ahochheiden
26bb1c1636 Bug 1846065 - Exit DetermineCommandVenvAction early if unknown command so that it can be gracefully handled elsewhere r=firefox-build-system-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D184851
2023-08-01 19:59:25 +00:00
ahochheiden
d1b78cde03 Bug 1845272 - Set 'site' early before checking for a sub_command site r=ahal a=RyanVM
This will make it so that if there was a potential subcommand, but it
was not a real subcommand, the base `command`'s site is still passed
through and activated.

Differential Revision: https://phabricator.services.mozilla.com/D184837
2023-07-28 17:36:17 +00:00
ahochheiden
d8ef20cc4f Bug 1845365 - Fixed logical error causing arguments without a - prefix to be checked as a sub_command, and then causing the actual command's virtualenv not to be selected r=ahal
Also added missing module `redo` to the `wpt` site.

Differential Revision: https://phabricator.services.mozilla.com/D184519
2023-07-25 23:09:11 +00:00
Kagami Sascha Rosylight
656bca507e Bug 1845125 - Work around a stalled Popen.wait with pid_exists r=firefox-build-system-reviewers,ahochheiden
Differential Revision: https://phabricator.services.mozilla.com/D184517
2023-07-25 22:20:30 +00:00
Rob Lemley
fb2dcbd226 Bug 1844417 - Allow virtualenv sites to load from comm-central. r=ahochheiden
Depends on D184036

Differential Revision: https://phabricator.services.mozilla.com/D184037
2023-07-25 00:24:53 +00:00