Commit graph

106 commits

Author SHA1 Message Date
Mike Hommey
2df59e529f Bug 1661589 - Track decision task duration on perfherder. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D88495
2020-08-28 10:45:23 +00:00
Ricky Stewart
31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
Tom Prince
a5db55b4fd No bug: [taskgrah] Fix mach taskgraph full --tasks <...> on python 3; r=Callek DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D85895
2020-08-04 17:16:15 +00:00
Tom Prince
e92bbf5dd8 No bug: [taskgraph] Make verify_test_packaging handle --target-kind gracefully; r=Callek
If we are generating only a part of the graph, to given kind, don't fail if a
build is packaging tests and there is no corresponding test task, as the tests
may not have been generated.

Differential Revision: https://phabricator.services.mozilla.com/D82097
2020-07-14 07:17:26 +00:00
Tom Prince
fc3ae614bc No bug: Update links to hg.mozilla.org to use default instead of tip in taskcluster/; r=Callek
The latter sometimes bites us if we have a legacy support branch that gets
pushed more recently than default.

Differential Revision: https://phabricator.services.mozilla.com/D82628
2020-07-08 18:41:17 +00:00
Tom Prince
909e7275e8 Bug 1648591: Remove taskgraph based cron implementation; r=aki
Differential Revision: https://phabricator.services.mozilla.com/D81270
2020-07-07 16:04:00 +00:00
Tom Prince
9f3450be95 Bug 1641971: [taskgraph] Pass explicit decision task id to action.json generation; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D77550
2020-06-03 02:35:05 +00:00
Tom Prince
6617f03f05 Bug 1641971: Allow references to decision task via task-reference/artifact-reference; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D77547
2020-06-03 02:43:34 +00:00
Narcis Beleuzu
479c45bbea Backed out 7 changesets (bug 1641971) for breaking Gecko Decision Task opt . CLOSED TREE
Backed out changeset a039e60a26d2 (bug 1641971)
Backed out changeset e7d4c490c31a (bug 1641971)
Backed out changeset f2322981b294 (bug 1641971)
Backed out changeset d123b08d2c20 (bug 1641971)
Backed out changeset 57772c0b9b3e (bug 1641971)
Backed out changeset 11a887f73dbb (bug 1641971)
Backed out changeset e9c7a59d4bc5 (bug 1641971)
2020-06-03 05:30:51 +03:00
Tom Prince
7c6a413ca9 Bug 1641971: [taskgraph] Pass explicit decision task id to action.json generation; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D77550
2020-06-02 18:23:20 +00:00
Tom Prince
602da9cdcd Bug 1641971: Allow references to decision task via task-reference/artifact-reference; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D77547
2020-06-02 18:50:10 +00:00
Mitchell Hentges
2a66b39bc4 Bug 1641962: Defer imports of distutils.util to ensure bootstrap can run r=rstewart,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D77516
2020-05-29 20:17:27 +00:00
Chris AtLee
cd35328624 Bug 1637381: Add support for extracting zst files to mozbuild tooltool r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D75203
2020-05-21 13:28:33 +00:00
Ricky Stewart
0fa8a98bdb Bug 1524639: [taskgraph] Enforce unicode strings in schemas r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D18376

--HG--
extra : moz-landing-system : lando
2020-01-21 17:12:08 +00:00
Razvan Maries
ffc90b2ec8 Backed out changeset a57aed49dc58 (bug 1524639) for beetmover bustages. a=backout 2020-01-16 14:04:31 +02:00
Ricky Stewart
fecc988cc6 Bug 1524639: [taskgraph] Enforce unicode strings in schemas r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D18376

--HG--
extra : moz-landing-system : lando
2020-01-15 20:33:20 +00:00
Andrew Halberstadt
fa8c3bb64c Bug 1568277 - [taskgraph] Add ability to redirect |mach taskgraph|'s output to a file, r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D42172

--HG--
extra : moz-landing-system : lando
2019-08-16 14:27:14 +00:00
Sebastian Hengst
741204a688 Backed out 10 changesets (bug 1568277) for breaking ./mach bootstrap. a=backout
Backed out changeset 056d9515483c (bug 1568277)
Backed out changeset 632d943c947b (bug 1568277)
Backed out changeset d7e8f80e2c85 (bug 1568277)
Backed out changeset 7b59ed5d703d (bug 1568277)
Backed out changeset f8b41cbaaf8e (bug 1568277)
Backed out changeset 391a90f3f02b (bug 1568277)
Backed out changeset d2b1d6c0a732 (bug 1568277)
Backed out changeset cb35fd836621 (bug 1568277)
Backed out changeset c8f797a19731 (bug 1568277)
Backed out changeset 9b89f970d46b (bug 1568277)

--HG--
rename : taskcluster/taskgraph/optimize/__init__.py => taskcluster/taskgraph/optimize.py
rename : taskcluster/taskgraph/optimize/seta.py => taskcluster/taskgraph/util/seta.py
2019-08-16 11:19:54 +02:00
Andrew Halberstadt
699de357f9 Bug 1568277 - [tasgraph] Add ability to redirect |mach taskgraph|'s output to a file, r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D42172

--HG--
extra : moz-landing-system : lando
2019-08-15 19:36:15 +00:00
Tom Prince
c9b692824c Bug 1459355: Don't pass parameters as part of actions; r=dustin
This causes actions to fail on graphs with large parameters, such as
release graphs and try pushes.

Differential Revision: https://phabricator.services.mozilla.com/D37499

--HG--
extra : moz-landing-system : lando
2019-08-09 17:02:15 +00:00
Mitchell Hentges
4eb5055ed6 Bug 1535056 - Specifies schema for taskgraph parameters r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D23756

--HG--
extra : moz-landing-system : lando
2019-06-04 12:10:18 +00:00
Tom Prince
6d48558d79 Bug 1488313: [taskgraph] Add options to reuse on-push tasks in cron graphs; r=dustin,aki
Differential Revision: https://phabricator.services.mozilla.com/D13151

--HG--
extra : moz-landing-system : lando
2019-03-27 19:34:53 +00:00
Dustin J. Mitchell
4b406f0a1e Bug 1534283 - add a 'tasks_for' property; r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D23569

--HG--
extra : moz-landing-system : lando
2019-03-14 20:01:32 +00:00
Tom Prince
4ecf218463 Bug 1525736: [taskgraph] Allow looking up parameters by project for trust-domains other than gecko; r=dustin
Previously, this code looked parameters under `gecko.v2`, but that doesn't work
for projects using the out-of-tree taskgraph code, or Thunderbird. This moves
the parameter loading slightly later to vary the index used based on trust domain.

Differential Revision: https://phabricator.services.mozilla.com/D19028

--HG--
extra : moz-landing-system : lando
2019-02-14 21:34:49 +00:00
Tom Prince
9fff567bdd Bug 1524639: [taskgraph] Force yaml to be loaded as unicode; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D18375

--HG--
extra : moz-landing-system : lando
2019-02-04 22:18:57 +00:00
Dustin J. Mitchell
c8fe0990f8 Bug 1524358 - get commit message locally, rather than from task parameters r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D18288

--HG--
extra : moz-landing-system : lando
2019-02-01 23:27:48 +00:00
Tom Prince
bce106f4b1 Bug 1514087: [taskgraph] Add an option to not optimize target tasks in cron graphs; r=dustin
This allows the target tasks to include cached tasks, which by default, get
optimized out of the graph on on-`try` branches.

Differential Revision: https://phabricator.services.mozilla.com/D15278

--HG--
extra : moz-landing-system : lando
2018-12-26 14:43:34 +00:00
Sebastian Hengst
767c971623 Backed out 21 changesets (bug 1492664) for breaking cron task for nightlies. a=backout
Backed out changeset a7d50dbb2c8e (bug 1492664)
Backed out changeset 2d876c4ece8b (bug 1492664)
Backed out changeset c82285d253de (bug 1492664)
Backed out changeset bf6d089640eb (bug 1492664)
Backed out changeset d9a7f2ce49c3 (bug 1492664)
Backed out changeset 06c466ab4323 (bug 1492664)
Backed out changeset c1ea4a10cc8d (bug 1492664)
Backed out changeset 4c63a04fdd47 (bug 1492664)
Backed out changeset 742b038bb1dd (bug 1492664)
Backed out changeset 911b4b0fb683 (bug 1492664)
Backed out changeset 870c8cec99e5 (bug 1492664)
Backed out changeset 77699b51336b (bug 1492664)
Backed out changeset 29f33f22fd8b (bug 1492664)
Backed out changeset e7f305408708 (bug 1492664)
Backed out changeset 335a92b1f424 (bug 1492664)
Backed out changeset c566f1c8dcdf (bug 1492664)
Backed out changeset c77ae59aba41 (bug 1492664)
Backed out changeset 9c35dd209c6b (bug 1492664)
Backed out changeset a972d6b4434e (bug 1492664)
Backed out changeset 5ea6f03f845e (bug 1492664)
Backed out changeset 0699d3873e44 (bug 1492664)

--HG--
extra : histedit_source : 5cb1f7e50f25d4a875c1a58c86b7dce902e1a89c%2C20f1ab1a843b612cfcc67cf5c6ff745d65abf076
2018-12-20 12:43:22 +02:00
Dustin J. Mitchell
4a0a6eae05 Bug 1492664 - set TASKCLUSTER_ROOT_URL and TASKCLUSTER_PROXY_URL; r=tomprince,glandium
Eventually, workers will provide these variables directly
(https://bugzilla.mozilla.org/show_bug.cgi?id=1460015).  But for now, this
ensures that TASKCLUSTER_ROOT_URL is set everywhere, and TASKCLUSTER_PROXY_URL
is set wherever the proxy is active.

The setup for the mach commands defaults to https://taskcluster.net for user
convenience.  When the production instance's URL changes, we can simply change
that default.

This changes the docker build process propagate TASKCLUSTER_ROOT_URL into the
docker images where necessary (using %ARG), specifically to create URLs for
debian repo paths.

--HG--
extra : rebase_source : 0626ebdb66a9f4078cb75ab71be256c334297363
2018-09-25 20:18:19 +00:00
Margareta Eliza Balazs
2e5e28f518 Backed out 16 changesets (bug 1492664) for breaking developer artifact builds, requested by standard8 a=backout
Backed out changeset 31e500489665 (bug 1492664)
Backed out changeset f4945658d45f (bug 1492664)
Backed out changeset 6d17291b8b92 (bug 1492664)
Backed out changeset 90f3faa36137 (bug 1492664)
Backed out changeset 0b229b00818a (bug 1492664)
Backed out changeset 5eb2c77d70a9 (bug 1492664)
Backed out changeset e1ebad5d89c5 (bug 1492664)
Backed out changeset 3017e5890739 (bug 1492664)
Backed out changeset c8b7e620eabf (bug 1492664)
Backed out changeset d3dfbd848236 (bug 1492664)
Backed out changeset 5c92bb5ac895 (bug 1492664)
Backed out changeset fb7cfca6ebc3 (bug 1492664)
Backed out changeset 0c4101230d4d (bug 1492664)
Backed out changeset b93a0fcc86f3 (bug 1492664)
Backed out changeset 6dc9522ee0bf (bug 1492664)
Backed out changeset 85d7f8b330eb (bug 1492664)
2018-12-19 11:45:29 +02:00
Dustin J. Mitchell
211a6cf5e3 Bug 1492664 - set TASKCLUSTER_ROOT_URL and TASKCLUSTER_PROXY_URL; r=tomprince,glandium
Eventually, workers will provide these variables directly
(https://bugzilla.mozilla.org/show_bug.cgi?id=1460015).  But for now, this
ensures that TASKCLUSTER_ROOT_URL is set everywhere, and TASKCLUSTER_PROXY_URL
is set wherever the proxy is active.

The setup for the mach commands defaults to https://taskcluster.net for user
convenience.  When the production instance's URL changes, we can simply change
that default.

This changes the docker build process to propagate TASKCLUSTER_ROOT_URL into
the docker images, and for good measure includes some code to use that value to
generate debian repo paths.

Differential Revision: https://phabricator.services.mozilla.com/D14196

--HG--
extra : moz-landing-system : lando
2018-12-18 05:37:41 +00:00
Tom Prince
8c933de83a Bug 1397847: Add supported API to get tasks of a given kind from a taskgraph; r=dustin
`mach artifact toolchain` gets task definitions from taskgraph, to get the
index path to find the artifacts at. Now that these index paths depend on the
digests of fetch tasks, those kinds need to be loaded as well. This adds a
supported API to get task definitions for a given kind, which loads all the
kind dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D12161

--HG--
extra : moz-landing-system : lando
2018-11-28 17:55:35 +00:00
Kartikaya Gupta
7a4b1d8a07 Bug 1509900 - Improve documentation for taskcluster-load-image. r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D12932

--HG--
extra : moz-landing-system : lando
2018-11-26 18:24:43 +00:00
Dustin J. Mitchell
37fd25c3c6 Bug 1473636: clarify arguments to action callbacks; r=tomprince
MozReview-Commit-ID: j3OiNkjngD

--HG--
extra : rebase_source : c1c169f5c1295628fe3ea5608407bd85cec34a00
2018-07-05 17:07:40 +00:00
Nick Thomas
95c9aa6874 Bug 1415868 - fix test-action-callback after rev e2931d904975, r=dustin
MozReview-Commit-ID: LlUQHanvVng

--HG--
extra : rebase_source : 170b5baaa018a00e2cffd13ecc0b0e92165379a9
2018-06-21 16:15:46 +12:00
Brian Stack
3ba851c889 Bug 1465117 - Take two at updating backfill task. Use modifier this time. r=dustin,jmaher
MozReview-Commit-ID: CAs0WRb839r

--HG--
extra : rebase_source : 5da88d38315f8b6795aa6d5a97de63883eda1ab0
2018-06-08 12:08:34 -07:00
Ciure Andrei
e0538d334b Backed out 1 changesets (bug 1465117) for fix_task_dependencies not working as expected a=backout
Backed out changeset 3d3fe54d0cb6 (bug 1465117)
2018-06-08 00:00:20 +03:00
Brian Stack
3672e158f8 Bug 1465117 - Add additional options to backfilling action task r=dustin,jmaher
MozReview-Commit-ID: FMGjhQbg4im

--HG--
extra : rebase_source : a03e351836c7356c6912af85be9108921e50aabd
2018-06-01 16:44:16 -07:00
Dustin J. Mitchell
aeb0a55c25 Bug 1415868 - remove ACTION_TASK r=jonasfj,tomprince
For kind=hook, the spec doesn't include this value as it's untrustworthy.

For kind=task, it's still untrustworthy, but there is no privilege escalation
so that's not important. Still, it dramatically expands the size of the task
definition.

MozReview-Commit-ID: 6scQ2ZwxP10

--HG--
extra : rebase_source : 4dc34390a510091ddc26023755992995fe358e47
2018-04-27 22:24:42 +00:00
Dustin J. Mitchell
1faeb13c08 Bug 1415868 - add 'mach taskgraph actions'; r=jonasfj,tomprince
MozReview-Commit-ID: ExVRgcD02GK

--HG--
extra : rebase_source : e823a8646655394f1644ed0010033a8cdf96ae0c
2018-04-23 21:14:14 +00:00
Gregory Szorc
a3113a2560 Bug 1460475 - Install zstandard 0.9.0 in mach; r=dustin
The latest python-zstandard uses a newer zstandard that is faster.
It also has wheels available, which means installation doesn't require
Python development headers, etc.

MozReview-Commit-ID: 5gRq81KYmX4

--HG--
extra : rebase_source : 96ccc64e9707c6b4815c1bfa5c1a98b9a428b387
2018-05-09 20:13:28 -07:00
Tom Prince
8ae52f6885 Bug 1456379: Remove references to date branch; r=aki
Differential Revision: https://phabricator.services.mozilla.com/D1028

--HG--
extra : rebase_source : d25e21bd7c0140392efdecf01fa3bd879a8a9779
2018-01-23 14:48:27 -07:00
Tom Prince
82818118aa Bug 1418058: [taskcluster] Load graph configuration for the correct project when running actions; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D914

--HG--
extra : rebase_source : f2e6591f3ac126b16070549789975fae58c0b3bc
2018-04-11 12:02:19 -06:00
Tom Prince
1f286055e2 Bug 1447460: Teach mach taskgraph cron to handle configuration in sub-repositories; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D815

--HG--
extra : rebase_source : f0153c78bf4ffe0dbf520e0fb4d0683c82173f8b
2018-03-28 11:34:20 -07:00
Tom Prince
74bcf37b60 Bug 1447460: Mark some obsolete mach taskgraph cron parameters as ignored; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D814

--HG--
extra : rebase_source : c50bd800ca9cd09bf0cd1ec9f7eb19f20d1b0866
2018-03-27 10:30:02 -07:00
Dustin J. Mitchell
23bfb18da8 Bug 1437710: fix spelling of zstd; r=gps
MozReview-Commit-ID: 8bSU61Lvh0T

--HG--
extra : rebase_source : 4fabfadcde7c51f483c6612e2b3a4c0d2c2efd92
2018-02-12 23:32:11 +00:00
Mike Hommey
fd6ffda3c8 Bug 1432390 - Make mach taskcluster-build-image talk directly to the docker socket in the image builder. r=dustin
Now that `mach taskcluster-build-image` can, we can avoid all the manual
handling based on curl and jq in the image builder.

An additional advantage on relying on `mach taskcluster-build-image`
doing more is that less changes to the build-image.sh script will be
necessary, and thus less updates of the image builder docker image.

--HG--
extra : rebase_source : dd174d60675e41e4391894f28235c674c1840829
2018-01-25 13:36:47 +09:00
Mike Hommey
16c5f4c5f4 Bug 1432390 - Use zstandard and requests modules instead of spawning curl | zstd in docker.load_image. r=dustin
The zstd command we spawn, if available at all, might be the wrong
version: zstd changed its stream format in an incompatible way at some
point, and the version shipped in e.g. Ubuntu 16.04 uses the old format,
while the version taskcluster relies on uses the new format.

Relying on gps's zstandard library allows to ensure we use the right
version. Another advantage is that we can trivially pip install it in a
virtualenv if it isn't available on the system running the command.

If we're ridding ourselves of the subprocess spawning for zstd, we might
as well cover curl as well. Especially considering the error handling
when subprocesses are involved is not trivial, such that the current
error handling code is actually broken and leads to dead-lock
conditions, when, for example, curl is still waiting for the python side
to read data, but the python side is not reading data anymore because
an exception was thrown in the tar reading loop.

--HG--
extra : rebase_source : 054c37cfaa68bf475b37545ebaa99144584b93d4
2018-01-24 11:18:13 +09:00
Mike Hommey
49e7b07ecc Bug 1419638 - Allow to pass arguments to docker when building docker-images. r=dustin
Ideally, we'd simply use the --build-arg docker argument along with ARG
in the Dockerfile, but that's only supported from Docker API 1.21, and
we're stuck on 1.18 for the moment.

So we add another hack to how we handle the Dockerfile, by adding a
commented syntax that allows to declare arguments to the Dockerfile.

The arguments can be defined in the docker images kind.yml file through
the `args` keyword. Under the hood, they are passed down to the docker
image task through the environment. The mach taskcluster-build-image
command then uses the corresponding values from the environment to
generate a "preprocessed" Dockerfile for its context.

--HG--
extra : rebase_source : 26a43dd680c1ab97b1a4689a23c55594a3b21b67
2017-12-24 07:51:29 +09:00
Chris AtLee
7bdb7826e2 Bug 1420449: Add mach taskgraph -F/--fast r=ahal
Initially this will skip toolchain task optimizations, which avoids hashing
local directory contents and speeds up taskgraph generation by about 25%.

MozReview-Commit-ID: B4LB5BV86nw

--HG--
extra : rebase_source : c41e4d838e8920b865cd62bb8de38e64b85b2d84
2017-11-30 12:07:02 -05:00