Commit graph

123 commits

Author SHA1 Message Date
Nathan Froyd
f1626f7f7b Bug 1540082 - add a toolchain-arm64-build docker image; r=nalexander
We need this image for building clang on machines with arm64
sysroots.  (Note that this image *is* a linux x86-64 image, just with
some arm64 cross-compilation packages available.)

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

--HG--
extra : moz-landing-system : lando
2019-04-23 19:44:55 +00:00
Mike Hommey
99edb1f46a Bug 1541823 - Derive the fetch docker image from debian9-raw rather than debian9-base. r=dustin
This will make the image smaller, and will make it happen earlier in
cases its dependencies need to be rebuilt.

Differential Revision: https://phabricator.services.mozilla.com/D26082
2019-04-11 16:24:50 +09:00
Johan Lorenzo
5e83fc51e7 Bug 1540152 - Run checks done in push-apk in promote-phase, instead of the very last task of the pipeline r=mtabara
Run checks done in push-apk in promote-phase, instead of the very last task of the pipeline

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

--HG--
rename : taskcluster/docker/google-play-strings/Dockerfile => taskcluster/docker/mozapkpublisher/Dockerfile
extra : moz-landing-system : lando
2019-04-09 14:56:52 +00:00
Mike Hommey
b22d57ac74 Bug 1541821 - Update debian7 docker images for CVE-2019-3462. r=tomprince
This imports the changes from wheezy-lts (http://deb.freexian.com/extended-lts/)
and creates a package we install in the debian7-based images (with a
modified version number to work around bug #1419577.

This leaves out debian7-raw and debian7-packages as unpatched, because
of the chicken-and-egg problem.

Depends on D26100

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

--HG--
extra : moz-landing-system : lando
2019-04-04 16:23:58 +00:00
Mike Hommey
aa88106d99 Bug 1532952 - Add an optional linux64-aarch64 build on Taskcluster. r=froydnj
This sets things enough things up to be able to push to try with an
opt-in, but doesn't run the job on every push. This can be used as a
template for future work on a fuzzing job.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 00:10:29 +00:00
Mike Hommey
564e4e46d2 Bug 1532883 - Remove nasm Debian packages. r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D22257

--HG--
extra : moz-landing-system : lando
2019-03-07 05:50:31 +00:00
Mike Hommey
c1124c11a5 Bug 1532878 - Update to a more recent snapshot for Debian stretch-based docker images. r=dustin
This has the side effect of addressing bug 1524723 for those images.

Depends on D22263

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

--HG--
extra : moz-landing-system : lando
2019-03-07 07:25:27 +00:00
Mike Hommey
7d6730e166 Bug 1532878 - Derive the diffoscope docker image from debian9-base. r=dustin
Because the debian9-base apt configuration doesn't install recommended
packages, we end up needing to install more packages than before. We
could pass --install-recommended to apt-get, but that would make the
image larger than it already was after the upcoming changes, because
new versions of diffoscope come with more recommended dependencies.

The side effect is that this makes the image much smaller than it used
to be, while preserving all the useful recommended packages (we don't
actually need all of them).

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

--HG--
extra : moz-landing-system : lando
2019-03-07 21:58:18 +00:00
Mike Hommey
6c6eaa1924 Bug 1431523 - Use docker images for debian package tasks. r=dustin
We however leave moving the packages building to a script for another
day.

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

--HG--
rename : taskcluster/docker/debian-base/cloud-mirror-workaround.sh => taskcluster/docker/debian-raw/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-base/setup_packages.sh => taskcluster/docker/debian-raw/setup_packages.sh
2019-02-16 07:22:36 +09:00
Mike Hommey
f70fc6ed56 Backout changesets cdefcc66972a, 1527e2d84ff9 (bug 1527798), ac565cc75295 (bug 1431523) and 0605b508a2c6 (bug 1528150)
to give time to docker images and toolchains to build.


--HG--
rename : taskcluster/docker/debian-raw/cloud-mirror-workaround.sh => taskcluster/docker/debian-base/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-raw/setup_packages.sh => taskcluster/docker/debian-base/setup_packages.sh
2019-02-16 00:38:13 +09:00
Mike Hommey
b3af58c1e5 Bug 1431523 - Use docker images for debian package tasks. r=dustin
We however leave moving the packages building to a script for another
day.

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

--HG--
rename : taskcluster/docker/debian-base/cloud-mirror-workaround.sh => taskcluster/docker/debian-raw/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-base/setup_packages.sh => taskcluster/docker/debian-raw/setup_packages.sh
2019-02-16 00:33:21 +09:00
Mike Hommey
8369a1bd0d Backout changesets 084f5a952f04 (bug 1527798) and f8738cf7a4ae (bug 1431523) to give time to docker images, etc. to build without blocking other landings.
--HG--
rename : taskcluster/docker/debian-raw/cloud-mirror-workaround.sh => taskcluster/docker/debian-base/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-raw/setup_packages.sh => taskcluster/docker/debian-base/setup_packages.sh
2019-02-15 06:55:54 +09:00
Mike Hommey
26a6076f30 Bug 1431523 - Use docker images for debian package tasks. r=dustin
We however leave moving the packages building to a script for another
day.

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


--HG--
rename : taskcluster/docker/debian-base/cloud-mirror-workaround.sh => taskcluster/docker/debian-raw/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-base/setup_packages.sh => taskcluster/docker/debian-raw/setup_packages.sh
2019-02-15 06:54:18 +09:00
Mike Hommey
6815fbc628 Backout changeset 8f7958c7d3e5 (bug 1431523) to give time to docker images, etc. to build without blocking other landings.
--HG--
rename : taskcluster/docker/debian-raw/cloud-mirror-workaround.sh => taskcluster/docker/debian-base/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-raw/setup_packages.sh => taskcluster/docker/debian-base/setup_packages.sh
2019-02-14 09:37:02 +09:00
Mike Hommey
ced4e4afa4 Bug 1431523 - Use docker images for debian package tasks. r=dustin
We however leave moving the packages building to a script for another
day.

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


--HG--
rename : taskcluster/docker/debian-base/cloud-mirror-workaround.sh => taskcluster/docker/debian-raw/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-base/setup_packages.sh => taskcluster/docker/debian-raw/setup_packages.sh
2019-02-14 09:36:39 +09:00
Mike Hommey
ec4fc79e18 Bug 1524703 - Install nasm 2.13 in static-analysis-autotest docker image. r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D18477

--HG--
extra : moz-landing-system : lando
2019-02-04 17:56:06 +00:00
Mike Hommey
0b225ee733 Bug 1519293 - Add a build docker image based on Debian 9. r=mshal
Differential Revision: https://phabricator.services.mozilla.com/D16280

--HG--
rename : taskcluster/docker/debian7-build/Dockerfile => taskcluster/docker/debian-build/Dockerfile
extra : moz-landing-system : lando
2019-01-11 22:45:55 +00:00
Gregory Mierzwinski
995b94a176 Bug 1490427 - Build and use custom d8 from a toolchain task. r=jmaher,ahal
This patch adds a toolchain task for building d8 with customized build settings and uses it in jsshell benchmark tests. A customized image with a debian9-base ('custom-v8') is added by this patch as well and is required to build the tool.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 19:21:15 +00:00
Kartikaya Gupta
3ce845679b Bug 1507884 - Add a docker image for building and testing webrender standalone. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D14405

--HG--
extra : moz-landing-system : lando
2018-12-19 19:32:09 +00:00
Dorel Luca
8f660cb8b7 Backed out changeset ad264a713556 (bug 1490427) for build bustage. CLOSED TREE 2018-12-19 13:13:13 +02:00
Gregory Mierzwinski
a4f3ec9f0b Bug 1490427 - Build and use custom d8 from a toolchain task. r=jmaher,ahal
This patch adds a toolchain task for building d8 with customized build settings and uses it in jsshell benchmark tests. A customized image with a debian9-base ('custom-v8') is added by this patch as well and is required to build the tool.

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

--HG--
extra : moz-landing-system : lando
2018-12-19 08:18:28 +00:00
Gregory Szorc
12bd06909d Bug 1513320 - SQLite package backport for Debian 7; r=glandium
The SQLite in Debian 7 (3.7.13) lacks support for common table
expressions (the WITH keyword), which was introduced in SQLite
3.8.3. The Mercurial SQLite storage backend currently relies on
CTEs. Even if a future Mercurial doesn't require CTE, it is likely
that it will still use CTE if available for performance reasons.
So, it is in our best interest to give Mercurial access to a
modern SQLite. Plus, using a modern SQLite and avoiding potential
bugs in old versions seems prudent.

This commit introduces a SQLite package backport for Debian 7
so we can use the new SQLite feature. We had to minimally patch
the build to work with an older version of TCL that isn't using
multiarch.

I observed libsqlite3 being installed as part of building various
other packages (such as Python). I initially added the package as
a dependency so packages would be built against a more modern
SQLite. But glandium doesn't believe it matters, since nothing
should be doing build-time feature detection. Python is the most
important downstream package (since Mercurial uses its SQLite).
I audited the CPython build system and did not see any build-time
SQLite feature detection or version sniffing. So I think we'll be
fine building against an older SQLite.

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

--HG--
extra : moz-landing-system : lando
2018-12-12 22:11:59 +00:00
Thomas Daede
f901f133bb Bug 1513330 - Add nasm to debian7-amd64-build-base. r=firefox-build-system-reviewers,mshal
Differential Revision: https://phabricator.services.mozilla.com/D14181

--HG--
extra : moz-landing-system : lando
2018-12-11 19:40:02 +00:00
Tom Prince
09b40dbe1d 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

--HG--
extra : moz-landing-system : lando
2018-12-05 02:15:56 +00:00
Thomas Daede
f608f5fc83 Bug 1501796 - Add nasm to debian7-build dockerfile. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D9747

--HG--
extra : moz-landing-system : lando
2018-11-28 03:23:08 +00:00
Cosmin Sabou
eb99d367ea Backed out changeset b3412b91afe2 (bug 1501796) for causing Valgrind build bustage. CLOSED TREE 2018-11-17 05:20:03 +02:00
Thomas Daede
dd1c4d38c5 Bug 1501796 - Add nasm to debian7-build dockerfile. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D9747

--HG--
extra : moz-landing-system : lando
2018-11-17 00:38:50 +00:00
Cosmin Sabou
33ceb3272d Backed out changeset c62c378d4f58 (bug 1501796) for causing docker image builds exceptions. CLOSED TREE
--HG--
extra : amend_source : 223aa6fb65d7bcc587eb5a6c4d4792926eb49485
2018-11-17 00:37:07 +02:00
Thomas Daede
9d7634eea7 Bug 1501796 - Add nasm to debian7-build dockerfile. r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D9747

--HG--
extra : moz-landing-system : lando
2018-11-16 01:28:12 +00:00
Mike Hommey
17673d777a Bug 1504906 - Install the Gtk+ 3.10 packages and required dependencies in the build docker images. r=gps
Interestingly, the resulting binaries are still compatible with Gtk+
3.4. The only difference in symbol use are:
  g_log -> g_logv
  g_assertion_message -> g_assertion_message_expr

Both of those symbols are actually available in older versions of glib.
Some #defines just switched from using the latter rather than the
former.

Differential Revision: https://phabricator.services.mozilla.com/D11141
2018-11-08 19:49:39 +09:00
Mike Hommey
da137a9941 Bug 1504906 - Use a separate docker image for base toolchain builds. r=gps
We're going to bump our shipped builds to build against Gtk+ 3.10, but
still want to ensure we can still build against Gtk+ 3.4. As we're using
Gtk+ packages installed in the build docker image, we need to have a
separate image where the Gtk+ packages are kept at version 3.4.

Differential Revision: https://phabricator.services.mozilla.com/D11137
2018-11-08 19:49:38 +09:00
Mike Hommey
ad2fed0601 Backed out 6 changesets (bug 1504906 and bug 1505652) to give time to toolchains and docker images to build without blocking other landings.
Backed out changeset 2fe1e2b7d9c6 (bug 1504906)
Backed out changeset 27b4002951a4 (bug 1504906)
Backed out changeset f7a685b16579 (bug 1504906)
Backed out changeset f8064dbb8009 (bug 1504906)
Backed out changeset f899fbb4a5d7 (bug 1504906)
Backed out changeset 3f71db4aef73 (bug 1505652)
2018-11-08 17:18:05 +09:00
Mike Hommey
6c05abfaef Bug 1504906 - Install the Gtk+ 3.10 packages and required dependencies in the build docker images. r=gps
Interestingly, the resulting binaries are still compatible with Gtk+
3.4. The only difference in symbol use are:
  g_log -> g_logv
  g_assertion_message -> g_assertion_message_expr

Both of those symbols are actually available in older versions of glib.
Some #defines just switched from using the latter rather than the
former.

Differential Revision: https://phabricator.services.mozilla.com/D11141
2018-11-08 17:13:25 +09:00
Mike Hommey
05fb2f1483 Bug 1504906 - Use a separate docker image for base toolchain builds. r=gps
We're going to bump our shipped builds to build against Gtk+ 3.10, but
still want to ensure we can still build against Gtk+ 3.4. As we're using
Gtk+ packages installed in the build docker image, we need to have a
separate image where the Gtk+ packages are kept at version 3.4.

Differential Revision: https://phabricator.services.mozilla.com/D11137
2018-11-08 17:13:21 +09:00
Mike Hommey
d0ec6a60ce Backout changesets 2e0ed8c61e24, b569742fbbf2 and 6f8c933b7938 (bug 1504906) to give time to docker images to build without blocking other landings. 2018-11-08 10:49:16 +09:00
Mike Hommey
f263795333 Bug 1504906 - Use a separate docker image for base toolchain builds. r=gps
We're going to bump our shipped builds to build against Gtk+ 3.10, but
still want to ensure we can still build against Gtk+ 3.4. As we're using
Gtk+ packages installed in the build docker image, we need to have a
separate image where the Gtk+ packages are kept at version 3.4.

Differential Revision: https://phabricator.services.mozilla.com/D11137
2018-11-08 10:42:42 +09:00
Robert Bartlensky
6cf2bd98ec Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander
Now autotest does not require java to be installed, but
it will let the user know that infer is not being tested if java
is missing.

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

--HG--
extra : moz-landing-system : lando
2018-10-24 21:54:34 +00:00
shindli
0c0c6fddd8 Backed out changeset aae4f349fa58 (bug 1479503) per developer's request on IRC a=backout
--HG--
rename : taskcluster/docker/static-analysis-build/Dockerfile => taskcluster/docker/infer-build/Dockerfile
2018-09-14 16:35:23 +03:00
Robert Bartlensky
af9de513f7 Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander
Adds infer to ./mach static-analysis autotest.

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

--HG--
rename : taskcluster/docker/infer-build/Dockerfile => taskcluster/docker/static-analysis-build/Dockerfile
extra : moz-landing-system : lando
2018-09-13 20:58:03 +00:00
Csoregi Natalia
7ed619163e Backed out changeset 081d8311be59 (bug 1479503) for build bustage - java not found. CLOSED TREE
--HG--
rename : taskcluster/docker/static-analysis-build/Dockerfile => taskcluster/docker/infer-build/Dockerfile
2018-09-12 13:16:06 +03:00
Robert Bartlensky
b4ebd25931 Bug 1479503: Check infer in ./mach static-analysis autotest. r=nalexander
Adds infer to ./mach static-analysis autotest.

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

--HG--
rename : taskcluster/docker/infer-build/Dockerfile => taskcluster/docker/static-analysis-build/Dockerfile
extra : moz-landing-system : lando
2018-09-12 09:34:30 +00:00
Robert Bartlensky
1a56460275 Bug 1473951: Add infer to taskcluster and build. r=gps
MozReview-Commit-ID: BHi3E6J3nuH

--HG--
extra : rebase_source : a59180efe4fed56222d2847d60133739f38c8ca8
2018-07-06 17:37:16 +01:00
Ben Hearsum
9d82e727e0 bug 1477021: create a docker image that can update Pipfile.lock, and attach diffs to phabricator. r=sfraser
--HG--
extra : rebase_source : 15c8c6ea7f2124863f8e9198a6962cbb37a28ab2
2018-07-26 08:54:45 -04:00
Simon Fraser
91c0407bcc Bug 1468386 Don't build funsize balrog image r=mtabara
Differential Revision: https://phabricator.services.mozilla.com/D1655
2018-06-14 16:49:57 +00:00
Gregory Szorc
8922082362 Bug 1460777 - Taskgraph tasks for retrieving remote content; r=dustin, glandium
Currently, many tasks fetch content from the Internets. A problem with
that is fetching from the Internets is unreliable: servers may have
outages or be slow; content may disappear or change out from under us.

The unreliability of 3rd party services poses a risk to Firefox CI.
If services aren't available, we could potentially not run some CI tasks.
In the worst case, we might not be able to release Firefox. That would
be bad. In fact, as I write this, gmplib.org has been unavailable for
~24 hours and Firefox CI is unable to retrieve the GMP source code.
As a result, building GCC toolchains is failing.

A solution to this is to make tasks more hermetic by depending on
fewer network services (which by definition aren't reliable over time
and therefore introduce instability).

This commit attempts to mitigate some external service dependencies
by introducing the *fetch* task kind.

The primary goal of the *fetch* kind is to obtain remote content and
re-expose it as a task artifact. By making external content available
as a cached task artifact, we allow dependent tasks to consume this
content without touching the service originally providing that
content, thus eliminating a run-time dependency and making tasks more
hermetic and reproducible over time.

We introduce a single "fetch-url" "using" flavor to define tasks that
fetch single URLs and then re-expose that URL as an artifact. Powering
this is a new, minimal "fetch" Docker image that contains a
"fetch-content" Python script that does the work for us.

We have added tasks to fetch source archives used to build the GCC
toolchains.

Fetching remote content and re-exposing it as an artifact is not
very useful by itself: the value is in having tasks use those
artifacts.

We introduce a taskgraph transform that allows tasks to define an
array of "fetches." Each entry corresponds to the name of a "fetch"
task kind. When present, the corresponding "fetch" task is added as a
dependency. And the task ID and artifact path from that "fetch" task
is added to the MOZ_FETCHES environment variable of the task depending
on it. Our "fetch-content" script has a "task-artifacts"
sub-command that tasks can execute to perform retrieval of all
artifacts listed in MOZ_FETCHES.

To prove all of this works, the code for fetching dependencies when
building GCC toolchains has been updated to use `fetch-content`. The
now-unused legacy code has been deleted.

This commit improves the reliability and efficiency of GCC toolchain
tasks. Dependencies now all come from task artifacts and should always
be available in the common case. In addition, `fetch-content` downloads
and extracts files concurrently. This makes it faster than the serial
application which we were previously using.

There are some things I don't like about this commit.

First, a new Docker image and Python script for downloading URLs feels
a bit heavyweight. The Docker image is definitely overkill as things
stand. I can eventually justify it because I want to implement support
for fetching and repackaging VCS repositories and for caching Debian
packages. These will require more packages than what I'm comfortable
installing on the base Debian image, therefore justifying a dedicated
image.

The `fetch-content static-url` sub-command could definitely be
implemented as a shell script. But Python is readily available and
is more pleasant to maintain than shell, so I wrote it in Python.

`fetch-content task-artifacts` is more advanced and writing it in
Python is more justified, IMO. FWIW, the script is Python 3 only,
which conveniently gives us access to `concurrent.futures`, which
facilitates concurrent download.

`fetch-content` also duplicates functionality found elsewhere.
generic-worker's task payload supports a "mounts" feature which
facilitates downloading remote content, including from a task
artifact. However, this feature doesn't exist on docker-worker.
So we have to implement downloading inside the task rather than
at the worker level. I concede that if all workers had generic-worker's
"mounts" feature and supported concurrent download, `fetch-content`
wouldn't need to exist.

`fetch-content` also duplicates functionality of
`mach artifact toolchain`. I probably could have used
`mach artifact toolchain` instead of writing
`fetch-content task-artifacts`. However, I didn't want to introduce
the requirement of a VCS checkout. `mach artifact toolchain` has its
origins in providing a feature to the build system. And "fetching
artifacts from tasks" is a more generic feature than that. I think
it should be implemented as a generic feature and not something that is
"toolchain" specific.

I think the best place for a generic "fetch content" feature is in
the worker, where content can be defined in the task payload. But as
explained above, that feature isn't universally available. The next
best place is probably run-task. run-task already performs generic,
very-early task preparation steps, such as performing a VCS checkout.
I would like to fold `fetch-content` into run-task and make it all
driven by environment variables. But run-task is currently Python 2
and achieving concurrency would involve a bit of programming (or
adding package dependencies). I may very well port run-task to Python
3 and then fold fetch-content into it. Or maybe we leave
`fetch-content` as a standalone script.

MozReview-Commit-ID: AGuTcwNcNJR

--HG--
extra : source : 0b941cbdca76fb2fbb98dc5bbc1a0237c69954d0
extra : histedit_source : a3e43bdd8a9a58550bef02fec3be832ca304ea93
2018-06-06 14:37:49 -07:00
Gurzau Raul
53a10471cf Backed out 2 changesets (bug 1460777) for Toolchains failure on a CLOSED TREE
Backed out changeset 52ef9348401d (bug 1460777)
Backed out changeset 60ed097650b8 (bug 1460777)
2018-06-06 20:57:29 +03:00
Gregory Szorc
2f189264b9 Bug 1460777 - Taskgraph tasks for retrieving remote content; r=dustin,glandium
Currently, many tasks fetch content from the Internets. A problem with
that is fetching from the Internets is unreliable: servers may have
outages or be slow; content may disappear or change out from under us.

The unreliability of 3rd party services poses a risk to Firefox CI.
If services aren't available, we could potentially not run some CI tasks.
In the worst case, we might not be able to release Firefox. That would
be bad. In fact, as I write this, gmplib.org has been unavailable for
~24 hours and Firefox CI is unable to retrieve the GMP source code.
As a result, building GCC toolchains is failing.

A solution to this is to make tasks more hermetic by depending on
fewer network services (which by definition aren't reliable over time
and therefore introduce instability).

This commit attempts to mitigate some external service dependencies
by introducing the *fetch* task kind.

The primary goal of the *fetch* kind is to obtain remote content and
re-expose it as a task artifact. By making external content available
as a cached task artifact, we allow dependent tasks to consume this
content without touching the service originally providing that
content, thus eliminating a run-time dependency and making tasks more
hermetic and reproducible over time.

We introduce a single "fetch-url" "using" flavor to define tasks that
fetch single URLs and then re-expose that URL as an artifact. Powering
this is a new, minimal "fetch" Docker image that contains a
"fetch-content" Python script that does the work for us.

We have added tasks to fetch source archives used to build the GCC
toolchains.

Fetching remote content and re-exposing it as an artifact is not
very useful by itself: the value is in having tasks use those
artifacts.

We introduce a taskgraph transform that allows tasks to define an
array of "fetches." Each entry corresponds to the name of a "fetch"
task kind. When present, the corresponding "fetch" task is added as a
dependency. And the task ID and artifact path from that "fetch" task
is added to the MOZ_FETCHES environment variable of the task depending
on it. Our "fetch-content" script has a "task-artifacts"
sub-command that tasks can execute to perform retrieval of all
artifacts listed in MOZ_FETCHES.

To prove all of this works, the code for fetching dependencies when
building GCC toolchains has been updated to use `fetch-content`. The
now-unused legacy code has been deleted.

This commit improves the reliability and efficiency of GCC toolchain
tasks. Dependencies now all come from task artifacts and should always
be available in the common case. In addition, `fetch-content` downloads
and extracts files concurrently. This makes it faster than the serial
application which we were previously using.

There are some things I don't like about this commit.

First, a new Docker image and Python script for downloading URLs feels
a bit heavyweight. The Docker image is definitely overkill as things
stand. I can eventually justify it because I want to implement support
for fetching and repackaging VCS repositories and for caching Debian
packages. These will require more packages than what I'm comfortable
installing on the base Debian image, therefore justifying a dedicated
image.

The `fetch-content static-url` sub-command could definitely be
implemented as a shell script. But Python is readily available and
is more pleasant to maintain than shell, so I wrote it in Python.

`fetch-content task-artifacts` is more advanced and writing it in
Python is more justified, IMO. FWIW, the script is Python 3 only,
which conveniently gives us access to `concurrent.futures`, which
facilitates concurrent download.

`fetch-content` also duplicates functionality found elsewhere.
generic-worker's task payload supports a "mounts" feature which
facilitates downloading remote content, including from a task
artifact. However, this feature doesn't exist on docker-worker.
So we have to implement downloading inside the task rather than
at the worker level. I concede that if all workers had generic-worker's
"mounts" feature and supported concurrent download, `fetch-content`
wouldn't need to exist.

`fetch-content` also duplicates functionality of
`mach artifact toolchain`. I probably could have used
`mach artifact toolchain` instead of writing
`fetch-content task-artifacts`. However, I didn't want to introduce
the requirement of a VCS checkout. `mach artifact toolchain` has its
origins in providing a feature to the build system. And "fetching
artifacts from tasks" is a more generic feature than that. I think
it should be implemented as a generic feature and not something that is
"toolchain" specific.

I think the best place for a generic "fetch content" feature is in
the worker, where content can be defined in the task payload. But as
explained above, that feature isn't universally available. The next
best place is probably run-task. run-task already performs generic,
very-early task preparation steps, such as performing a VCS checkout.
I would like to fold `fetch-content` into run-task and make it all
driven by environment variables. But run-task is currently Python 2
and achieving concurrency would involve a bit of programming (or
adding package dependencies). I may very well port run-task to Python
3 and then fold fetch-content into it. Or maybe we leave
`fetch-content` as a standalone script.

MozReview-Commit-ID: AGuTcwNcNJR

--HG--
extra : rebase_source : 4918b8c3bac53d63665006802054038bfbca0314
2018-06-06 09:37:38 -07:00
Gregory Szorc
8628c39666 Bug 1466746 - Install python-zstandard in debian-base; r=glandium
Let's install python-zstandard for both Python 2 and Python 3 in
all our Debian-based images so it is readily available for use.

MozReview-Commit-ID: 1L8zDc5MYXA

--HG--
extra : rebase_source : db718891dd31d4feceff76fbce753b63049e20b1
2018-06-04 23:21:19 -07:00
Gregory Szorc
a339b799f8 Bug 1460451 - Add /usr/bin/python3 to Debian images; r=glandium
The python3-minimal package provides /usr/bin/python3 on Debian.

This commit installs this package so a `python3` executable is
provided.

This required backporting the package to wheezy. The final patch
is trivial. But I wasted a bit of time figuring out why `mk-build-deps`
wasn't working. It would no-op and exit 0 and then the build would
complain about missing dependencies!

glandium's theory is that the ":any" multiarch support on wheezy
isn't complete. Removing ":any" seems to make things "just work."

MozReview-Commit-ID: FBicpK4SmkQ

--HG--
extra : rebase_source : a28ce731024e8ed6a43fb30e2ed57da2abb50d0f
2018-05-09 19:54:21 -07:00
Ben Hearsum
f6aa7204c0 Bug 1442545: [partner-repack] Add docker image for partner repacks; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D979

--HG--
extra : rebase_source : 9d5b469a66c872a3c9623e2f8afbe21c0514059e
extra : histedit_source : e2371130271cc7a44dab498ecc01c4f7d243e3bf
2018-04-19 10:00:47 -06:00