Commit Graph

118 Commits

Author SHA1 Message Date
Ricky Stewart
31b8ca9716 Bug 1654103: Standardize on Black for Python code in mozilla-central.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Bogdan Tara
612312a64c Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart
065d2eb893 Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Dorel Luca
95b44c982f Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart
43baed3c18 Bug 1654103: Standardize on Black for Python code in mozilla-central. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Andrew Halberstadt
5f39e949bf Bug 1659187 - [taskgraph] Implement a mechanism to only run tasks when a specified dependency is present, r=bhearsum
Certain tasks are meant to perform follow-up work to another task. For example,
a 'signing' task signs an artifact from a dependency task. An 'upload-symbols'
tasks uploads an artifact from a dependency task.

In general, we only want to run these types of tasks when the dependency task
is running. But in practice, these tasks often cause the dependency to get
pulled in.

We've tried to fix this in the past by making the 'run-on-projects' and
'optimization' keys match their primary dependency. But it's very easy to
mess this up, and some optimizations (like bugbug) take the content of the
task definition into account. So even if both tasks use the same optimization,
they could have different results.

This revision adds a new 'if-dependencies' key that denotes a task that should
only run if one of the dependencies specified in this list is also run. It
will allow us to stop playing whack-a-mole when trying to make sure tasks
aren't being pulled in solely due to these types of dependencies.

This feature is implemented independently of the 'optimization', so tasks that
specify this can still be optimized even if their primary dependency does run.

Differential Revision: https://phabricator.services.mozilla.com/D80508
2020-08-27 20:45:33 +00:00
Razvan Maries
2a46b35060 Backed out changeset 9251996ce8c9 (bug 1657939) for Gecko Decision Task failures. CLOSED TREE 2020-08-11 00:32:44 +03:00
Justin Wood
9f41cda459 Bug 1657939 - Output an artifact that identifies replaced taskID's. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D86379
2020-08-10 19:20:28 +00:00
Justin Wood
5ea59432a8 Bug 1653050 - Allow optimizing by replacement existing (pending/unscheduled) cached tasks. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D83280
2020-07-30 16:14:15 +00:00
Csoregi Natalia
f04bc0b9ed Backed out changeset c2746ff5e6b4 (bug 1653050) for failing gecko decision task. CLOSED TREE 2020-07-30 05:31:21 +03:00
Justin Wood
4beb608448 Bug 1653050 - Allow optimizing by replacement existing (pending/unscheduled) cached tasks. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D83280
2020-07-28 19:58:14 +00:00
Andrew Halberstadt
b462d16eef Bug 1636271 - [taskgraph] Move 'optimize-strategies' from try_task_config.json to a parameter, r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D79704
2020-07-28 13:21:05 +00:00
Narcis Beleuzu
f6c2e1b1c1 Backed out 3 changesets (bug 1636271) for breaking the Gecko Decision Task. CLOSED TREE
Backed out changeset 4b0f13fcf941 (bug 1636271)
Backed out changeset 4250f49877ba (bug 1636271)
Backed out changeset d3f93bd6b1f9 (bug 1636271)
2020-07-22 23:40:32 +03:00
Andrew Halberstadt
7d9e380699 Bug 1636271 - [taskgraph] Move 'optimize-strategies' from try_task_config.json to a parameter, r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D79704
2020-07-22 15:36:55 +00:00
Tom Prince
63f5651320 Bug 1653717: [taskgraph] Handle composite description nicely; r=Callek
When links to specific tasks in treeherder was added to the description in
Bug 1630710, This caused the descriptions for several derived tasks to include
the `{'task-reference': '...'}` wrapper in the derived description. This is
in addition to the already duplicate links to treeherder those tasks had.

To ameliorate this issue, keep track of the original description without the
treeherder link and use that in derived tasks.

Differential Revision: https://phabricator.services.mozilla.com/D84047
2020-07-18 15:59:27 +00:00
Tom Prince
baf6c990ce Bug 1652786: [taskgraph] Fix parameter handling `load_tasks_for_kind; r=Callek a=Callek
DONTBUILD

Differential Revision: https://phabricator.services.mozilla.com/D83566
2020-07-14 21:09:34 +00:00
Tom Prince
e7d8f225cb 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
e1fa5c277f Bug 1652086: Make kind_dependencies_tasks a dictionary based on the label; r=Callek
I was looking at py-spy for generating the taskgraph, and found that a bunch
of time was spent in taskgraph.transforms.job.use_fetches[1]. Use a dictionary
there instead saves about 20-30s on my machine.

[1] https://searchfox.org/mozilla-central/rev/622dbd3409610ad3f71b56c9a6a92da905dab0aa/taskcluster/taskgraph/transforms/job/__init__.py#243-247

Differential Revision: https://phabricator.services.mozilla.com/D83166
2020-07-14 07:39:20 +00:00
Tom Prince
393924276c Bug 1626058: Add support for writting out artifacts from transforms in the decision task; r=Callek,ahal
To support using kaniko[1] for building images, we need to generate the docker
contexts in a seprate task from the docker-image task. Since we use the hash of
the context as the cached-task digest, we generate the context in the decision
task already, so this adds a way to write that out to be used by downstream
tasks.

[1] https://github.com/GoogleContainerTools/kaniko

Differential Revision: https://phabricator.services.mozilla.com/D77839
2020-07-07 19:56:11 +00:00
Ben Hearsum
55cd1ac886 Bug 1641058: tasks that only exist because of another that is later optimized away should not be scheduled r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D81745
2020-07-02 21:28:57 +00:00
Narcis Beleuzu
52c2b9ae86 Backed out changeset 6a42da21836e (bug 1641058) for breaking action tasks like retriggers . CLOSED TREE 2020-07-02 21:45:53 +03:00
Ben Hearsum
5ee69884d2 Bug 1641058: tasks that only exist because of another that is later optimized away should not be scheduled r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D81745
2020-07-02 17:00:03 +00:00
Marco Castelluccio
fbfce043e0 Bug 1637544 - Support project-specific verifications in taskgraph. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D77247
2020-06-04 19:40:46 +00:00
Tom Prince
d648744c0d 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
982ec4412a 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
d9be0f48e6 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
Andrew Halberstadt
d2436df34a Bug 1603463 - [tryselect] Add the ability to run 'mach try auto' with alternative scheduling algorithms, r=tomprince
This allows us to change the default optimization strategy used in try pushes.
While probably not super useful to developers, it can help us easily test
changes to new and experimental optimizations on try.

This also changes the default to the 'bugbug_push_schedules' strategy, since
SETA is more or less random and shouldn't be used by 'mach try auto'. In the
future, we'll switch this back to simply using the default optimization as the
default will ideally be the best one that we have.

Differential Revision: https://phabricator.services.mozilla.com/D65746
2020-03-13 20:32:14 +00:00
Ricky Stewart
38b0fb15c9 Bug 1569059 - Run 'mach bootstrap' with Python 3 r=firefox-build-system-reviewers,mshal,Callek
Differential Revision: https://phabricator.services.mozilla.com/D60898
2020-02-07 18:12:23 +00:00
Rob Lemley
f96a7a13a3 Bug 1609987 - Port bug 1568006: Add project's taskgraph directory to the python path. r=tomprince
For mozilla-central, all the code related to taskgraph lives in
taskcluster/taskgraph. Thunderbird's build requirements are evolving, and
we want to be able to have repository-specific code. The natural place for it
to live is an a package beside taskcluster/ci. Add that to python path,
and provide some hooks for adding to the various registries in taskgraph.

Differential Revision: https://phabricator.services.mozilla.com/D60540
2020-01-23 17:09:41 +00:00
Rob Lemley
b758442f2b Bug 1611014 - Make sure Taskcluster root_dir is a unicode string. r=rstewart
This fixes an issue when running "mach taskgraph" with the --root parameter
from the commandline. We use this regularly when working on Thunderbird task
configuration.

The initial list of kind names is read with os.listdir(), which returns
non-unicode strings when given a non-unicode string. As a result, some tasks
fail to validate because there's a non-unicode string where a unicode string
is expected.

Differential Revision: https://phabricator.services.mozilla.com/D60775
2020-01-23 00:32:53 +00:00
Ricky Stewart
02945d3f8a Bug 1524639: [taskgraph] Enforce unicode strings in schemas r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D18376
2020-01-21 17:12:08 +00:00
Razvan Maries
1b1233c4a4 Backed out changeset a57aed49dc58 (bug 1524639) for beetmover bustages. a=backout 2020-01-16 14:04:31 +02:00
Ricky Stewart
16061a0a81 Bug 1524639: [taskgraph] Enforce unicode strings in schemas r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D18376
2020-01-15 20:33:20 +00:00
Tom Prince
f427bfab62 Bug 1604749: Get misc worker-type from graph config; r=Callek
This will allow comm branches to use their own worker type.

Differential Revision: https://phabricator.services.mozilla.com/D58408
2019-12-30 22:54:10 +00:00
Aki Sasaki
b209b421fe Bug 1500321 - only run always-target tasks on hg-push. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D56608
2019-12-11 18:51:01 +00:00
Andrew Halberstadt
9fa3661800 Bug 1568277 - [taskgraph] Ensure user specified optimization strategies update instead of replace the default ones r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D40205
2019-08-16 14:26:08 +00:00
Sebastian Hengst
c69e2b02be 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)
2019-08-16 11:19:54 +02:00
Andrew Halberstadt
533a7d7efa Bug 1568277 - [taskgraph] Ensure user specified optimization strategies update instead of replace the default ones r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D40205
2019-08-15 18:49:01 +00:00
Andrew Halberstadt
b0223a916c Bug 1555032 - [taskgraph] Add ability to pass external optimize strategies via env, r=tomprince
This allows users to set TASKGRAPH_OPTIMIZE_STRATEGIES to a
python_path.find_object string. E.g:

    TASKGRAPH_OPTIMIZE_STRATEGIES="module:strategies" ./mach taskgraph optimized

This opens the door to swap in external strategies at runtime and will be
used for back testing experimental strategies.

Differential Revision: https://phabricator.services.mozilla.com/D33203
2019-05-31 12:56:47 +00:00
Bastien Abadie
098e3defcf Bug 1527895 - Add soft-dependencies to taskgraph, r=ahal,marco,tomprince,dustin
Differential Revision: https://phabricator.services.mozilla.com/D19791
2019-03-04 17:07:34 +00:00
Tom Prince
bc04b4b311 Bug 1524639: [taskgraph] Change load_yaml to accept any number of path components; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D18374
2019-02-04 16:55:54 +00:00
Tom Prince
688f3f7ee7 No bug: [taskgraph] Use trust-domain to determine what index routes to verify; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D14477
2018-12-13 21:01:39 +00:00
Gurzau Raul
82985c8c94 Backed out changeset 6ec585347976 on request from tomprince on a CLOSED TREE 2018-12-13 23:09:18 +02:00
Tom Prince
f1f1c923c0 No bug: [taskgraph] Use trust-domain to determine what index routes to verify; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D14477
2018-12-13 19:00:23 +00:00
Tom Prince
ca7dfc69b3 Bug 1397847: Pass the taskcluster root to load_tasks_for_kind in mach artifact toolchain; r=dustin a=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D13433
2018-11-29 09:37:39 -07:00
Tom Prince
844e288495 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
2018-11-28 17:55:35 +00:00
Tom Prince
9fc24da1ba Bug 1507860: [taskgraph] Move most classes to use attrs; r=dustin
This moves most of the low-hanging fruit to use attrs.

Differential Revision: https://phabricator.services.mozilla.com/D1141
2018-11-21 23:50:04 +00:00
Tom Prince
e5cb665282 Backed out changeset d1d4e3bf3945 (Bug 1507860) for causing decision task failures a=backout 2018-11-20 21:30:33 -07:00
Tom Prince
e09b55569a Bug 1507860: [taskgraph] Move most clases to use attrs; r=dustin
This moves most of the low-hanging fruit to use attrs.

Differential Revision: https://phabricator.services.mozilla.com/D1141
2018-11-20 21:52:24 +00:00
Tom Prince
aa02404834 No bug: [taskgraph] Log which kind had an error; r=dustin
This makes it easier to see what failed, rather than have to guess based on
ordering.

Differential Revision: https://phabricator.services.mozilla.com/D9848
2018-10-25 21:02:05 +00:00