Commit Graph

78 Commits

Author SHA1 Message Date
Mike Hommey
3e3f1aea03 Bug 1677020 - Always cap try tasks to a 28 days expiry. r=taskgraph-reviewers,jmaher
Currently, if a task defines its own expiry with a very large value,
that will be respected even on try, where we actually don't want that to
happen.

This also helps simplify the setup for docker images.

We also take on the occasion to remove the discrepancy between the
default expiry for tasks in general and tests in particular. Bug 1258497
set the original expiry to 14 days, bug 1281004 added another place
where the expiry was set to 14 days for tests specifically, and then bug
1304180 changed the expiry to 28 days, but it just seems the location
for tests was overlooked rather than deliberately left to 14 days.

Differential Revision: https://phabricator.services.mozilla.com/D96962
2020-11-16 23:51:22 +00:00
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
Mike Hommey
f08fa9d8d8 Bug 1651538 - Relabel docker images with the prefix "docker-image" instead of "build-docker-image". r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D82807
2020-10-09 00:07:56 +00:00
Rob Lemley
4d41e9234b Bug 1665414 - Use image_path to locate context path in docker_image transform. r=taskgraph-reviewers,aki
This change is to facilitate defining docker-images in comm/taskcluster/docker. At the
moment this is not possible due to how 'context_path' is set.

taskgraph.docker.util is already imported by the transform code, so it can make use of
the existing image_path function. image_path return an absolute_path, while some of the
consumers of context_path expect a path that's relative to topsrcdir.

Differential Revision: https://phabricator.services.mozilla.com/D92702
2020-10-08 18:28:08 +00:00
Aki Sasaki
9e1030b30d Bug 1661637 - upload image_builder:5.0.0 r=releng-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D88660
2020-08-28 19:34:14 +00:00
Tom Prince
c9e48b40d8 Bug 1657199: Generate the same docker-image digests locally as in automation; r=Callek
In bug 1626058, I changed how the docker image digest was generated:

- I used the same directory structure to generate the digest as was used for generating the context
- I moved context generation to the decision task, and used the hash of that as part of the digest.

Unfortunately, it turns out the file name in the gzip header of the context
.tar.gz differed between when we are creating a context to write out, and when
were just generating the hash.

This adjust the name used in the gzip header to be consistent.

Differential Revision: https://phabricator.services.mozilla.com/D84753
2020-08-04 19:50:05 +00:00
Rail Aliiev
6063567825 Bug 1655893 - docker_image.py transform should set artifact_prefix; r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D85232
2020-07-29 16:56:37 +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
Mike Hommey
39d94643fd Bug 1651549 - Remove now unnecessary order_image_tasks. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D82810
2020-07-09 03:54:46 +00:00
Mike Hommey
fd195fa4a2 Bug 1651227 - Use the in-tree kaniko image builder image to build docker images. r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D82622
2020-07-09 03:54:46 +00:00
Tom Prince
7e58f4898b Bug 1626058: Build docker images with kaniko, instead of dind; r=glandium,hwine
Differential Revision: https://phabricator.services.mozilla.com/D77864
2020-07-07 19:53:32 +00:00
Tom Prince
5e9f32e76a Bug 1641971: Allow making references to a task itself in the task definition; r=Callek
This is to support linking to the a specific task in taskcluster.

Differential Revision: https://phabricator.services.mozilla.com/D77529
2020-06-03 02:35:14 +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
75bd8f4005 Bug 1641971: Allow making references to a task itself in the task definition; r=Callek
This is to support linking to the a specific task in taskcluster.

Differential Revision: https://phabricator.services.mozilla.com/D77529
2020-06-02 18:22:55 +00:00
Mike Hommey
98be042706 Bug 1634605 - Stop retrying on apt-get errors. r=tomprince
We starting doing that because snapshot.debian.org would ban some AWS IP
ranges, and we would get random failures, but that's not the case
anymore. OTOH, when more "normal" errors happen, like when you change a
Dockerfile to add a package, and that package actually doesn't exist,
the image build is tried 5 times, with no chance it will succeed, and
treeherder doesn't link to the log because it's purple, so you need to
manually go to taskcluster.

Removing the autoretry will make things smoother.

Differential Revision: https://phabricator.services.mozilla.com/D73392
2020-05-02 06:18:13 +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
08ece47786 Bug 1532783: [taskgraph] Switch to using worker aliases for docker-worker and generic-worker; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D24238
2019-04-30 22:58:06 +00:00
Connor Sheehan
75a2f7e30d Bug 1534463: give tasks access to hgmointernal Taskcluster secret r=tomprince
Now that we have added the necessary scopes to `ci-configuration`,
we can add the in-tree scopes to give tasks access to the
`hgmointernal` config Taskcluster secret.

Differential Revision: https://phabricator.services.mozilla.com/D25001
2019-03-27 18:47:21 +00:00
Dustin J. Mitchell
d2fd152781 Bug 1508381 - use rootUrl style with taskcluster-proxy r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D18023
2019-03-12 20:38:42 +00:00
Chris AtLee
f4ab126241 Bug 1527394: Squash docker images before exporting/compressing them r=tomprince
Differential Revision: https://phabricator.services.mozilla.com/D19541
2019-02-23 17:16:43 +00:00
Tom Prince
4c30d23ee1 Bug 1528362: [taskgraph] Use trust-domain prefixed caches; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D20049
2019-02-21 07:32:36 +00:00
Tom Prince
f6e4863b7d Bug 1525987: [taskgraph] Allow docker images to be indexed as build products; r=dustin
This is useful for the out-of-tree taskgraph code. Downstream products can
pin the generated decision task image by revision, rather than contents.

Differential Revision: https://phabricator.services.mozilla.com/D19032
2019-02-07 20:06:37 +00:00
Tom Prince
a67b7cdc04 Bug 1525987: [taskgraph] Allow docker images to not be cached; r=dustin
This allows images to be built on every commit. This is useful for the
out-of-tree taskgraph, that builds a docker image with the taskgraph code
installed.

Differential Revision: https://phabricator.services.mozilla.com/D19031
2019-02-07 21:02:13 +00:00
Dustin J. Mitchell
3c41a8f923 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 in production, and
TASKCLUSTER_PROXY_URL is set wherever the proxy is active.

The taskgraph Taskcluster utils module gets a `get_root_url()` that gets the
root URL for the current run, either from an environment variable in production
or, on the command line, defaulting to https://taskcluster.net for user
convenience.  When the production instance's URL changes, we can simply change
that default.

Other changes to use this function are reserved for later commits.

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.
2018-09-25 20:18:19 +00:00
Sebastian Hengst
e6609388b4 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)
2018-12-20 12:43:22 +02:00
Dustin J. Mitchell
ad8c17d35d 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.
2018-09-25 20:18:19 +00:00
Margareta Eliza Balazs
c18ee639c6 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
9ebb32c996 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
2018-12-18 05:37:41 +00:00
Tom Prince
5766dd4f06 Bug 1471905: [taskgraph] Consistently include the cache digests of parent tasks in downstream cached tasks; r=dustin
There are several kinds that cache tasks based on the inputs that go into the task. Historically,
these inputs included the name of upstream tasks. This change these tasks to include the digest
of the upstream tasks.

This also bumps the version of the docker and toolchain as every digest is changed for them.

Differential Revision: https://phabricator.services.mozilla.com/D11949
2018-12-05 02:15:56 +00:00
Dustin J. Mitchell
5a3e35c75e Bug 1498640 - deploy latest image_builder image r=glandium
This uses the latest image_builder image (on docker hub) to build even the
image_builder image.

The change to `docker.py` handles a new API response (`aux`) from the Docker
daemon.  It's unclear what this key means, but displaying it is simple.

Differential Revision: https://phabricator.services.mozilla.com/D8441
2018-10-31 23:02:42 +00:00
Tom Prince
2723a990c8 Bug 1471905: [taskgraph] Don't calculate docker context hashes if asked for a fast taskgraph; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D12064
2018-11-17 03:41:06 +00:00
Tom Prince
48c55c2fa4 Bug 1471905: [taskgraph] Fix some typos in docker image transform; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D12063
2018-11-17 03:49:01 +00:00
Tom Prince
1b5387cfd8 Bug 1507898: [taskgraph] Factor out schema validation in transformations; r=dustin
Most jobs include at least one transform that verifies the input of all the
tasks against a schema. This code is duplicated in each transform. Refactor it,
so that we only need one copy of the logic.

Differential Revision: https://phabricator.services.mozilla.com/D12165
2018-11-20 23:44:12 +00:00
Narcis Beleuzu
87aec3eb00 Backed out changeset e947694d0ed7 (bug 1507898) for Linting failure. CLOSED TREE 2018-11-21 00:29:17 +02:00
Tom Prince
e6b2bfdab7 Bug 1507898: [taskgraph] Factor out schema validation in transformations; r=dustin
Most jobs include at least one transform that verifies the input of all the
tasks against a schema. This code is duplicated in each transform. Refactor it,
so that we only need one copy of the logic.

Differential Revision: https://phabricator.services.mozilla.com/D12165
2018-11-20 22:09:34 +00:00
Andreea Pavel
808a86b809 Backed out 5 changesets (bug 1498640, bug 1436037, bug 1497660, bug 1505579) for mass failures on a CLOSED TREE
Backed out changeset 914a7a899dd1 (bug 1436037)
Backed out changeset e072757bf691 (bug 1436037)
Backed out changeset b0805a8cf6eb (bug 1505579)
Backed out changeset aa32ba9e6df3 (bug 1498640)
Backed out changeset ce441b8a784c (bug 1497660)
2018-11-15 07:53:41 +02:00
Dustin J. Mitchell
d347f980f8 Bug 1498640 - deploy latest image_builder image r=glandium
This uses the latest image_builder image (on docker hub) to build even the
image_builder image.

The change to `docker.py` handles a new API response (`aux`) from the Docker
daemon.  It's unclear what this key means, but displaying it is simple.

Differential Revision: https://phabricator.services.mozilla.com/D8441
2018-10-31 23:02:42 +00:00
Tom Prince
04309cb221 Bug 1506920: [taskgraph] Track parent images in docker image digests; r=dustin
The digest for a docker image task did not include the digest for the parent
image in it, and so in particular did not depend on the versions of packages
included in a parent image.

If two branches have a docker image with identical docker files, but different
parents, this would lead to them both getting the same digest, leading to
unexpected interference between the branches.

This fixes things by including the digest of the parent image as input into the
digest of child images.

Differential Revision: https://phabricator.services.mozilla.com/D11807
2018-11-14 14:29:26 +00:00
Mike Hommey
277a890d0d Bug 1486071 - Retry docker-image and packages tasks that fail during apt-get. r=dustin
When apt-get fails, it has a distinctive error code (100). Most of the
time, when apt-get fails, it's because of some network error, or
possibly some problem unpacking archives. When that happens, retrying
the task usually "fixes" the issue.

One of the (currently) most common causes of problems is
snapshot.debian.org not being available to some of the EC2 instances.

It would be possible to only set things up so that we only retry when we
detect such setup (checking the public IP of the instance is not in the
known list of problematic IPs), but that would require possibly wrapping
apt-get, or something along those line, which is not entirely trivial to
do for the packages tasks, because they don't rely on docker images.

However, since there aren't many apt-get failures other than these,
and since there have been, historically, some intermittent apt-get
failures of a different nature that were solved by re-running the tasks,
it seems fair to just retry wheneven apt-get fails.

One downside of the approach is that if for some reason a change to a
Dockerfile ends up mentioning a package that doesn't exist, that too
will result in multiple retries ; which might be inconvenient, but
that's not something that's going to happen often.

Differential Revision: https://phabricator.services.mozilla.com/D11420
2018-11-13 22:17:14 +00:00
shindli
cd0140d68f Backed out changeset f33b9e6aca06 (bug 1498640) for mda permafailures with "Error in test execution: NotFoundError: The object can not be found here." message 2018-11-01 06:20:05 +02:00
Dustin J. Mitchell
fd0132a8ea Bug 1498640 - deploy latest image_builder image r=glandium
This uses the latest image_builder image (on docker hub) to build even the
image_builder image.

The change to `docker.py` handles a new API response (`aux`) from the Docker
daemon.  It's unclear what this key means, but displaying it is simple.

Differential Revision: https://phabricator.services.mozilla.com/D8441
2018-10-31 23:02:42 +00:00
Jordan Lund
b206a91c2b Bug 1423058 - intermittent - funsize-update-generator docker image hangs while installing packages, CLOSED TREE r=bustage
MozReview-Commit-ID: EnKpG5EttrR
2018-02-21 13:36:22 -08:00
41ebe9538a Bug 1423058 - intermittent - funsize-update-generator docker image hangs while installing packages, r=jlund
MozReview-Commit-ID: COpnWQGuEeM
2018-02-21 13:00:48 -08:00
Tom Prince
a2f4383d4d Bug 1433975: Error out if a parent docker image isn't present in the configuration; r=dustin
MozReview-Commit-ID: ASeCAXLzOEZ
2018-01-29 11:03:06 -07:00