Commit Graph
45 Commits
Author SHA1 Message Date
Nick Alexander 020608bac5 Bug 1396098 - part 1 - base android-build on Debian instead of CentOS; r=glandium,dustin
CentOS 6 is pinned to glibc 2.12, but newer Android build-tools (like
aapt) require glibc 2.14.  It's not possible to safely upgrade CentOS
6 distributions to glibc 2.14.

CentOS 7 is pinned to glibc 2.17, which is new enough for newer
Android build-tools. However, I had great difficulty bringing forward
our existing centos:6 Docker image to centos:7.  In particular,
installing recent enough Mercurial, git, Python, and pip versions was
difficult enough that I elected to not pursue this approach.

Instead, I've elected to follow glandium's suggestion from
https://bugzilla.mozilla.org/show_bug.cgi?id=1370119#c5: base on
Debian with snapshots.debian.org for reproducibility.

The most significant changes here:

- using Debian's snapshots repository
- using Python and related tools provided by Debian and baked into the
  build image
- using the JDK and JRE provided by Debian and baked into the build
  image, rather than versions from tooltool (or eventually a toolchain
  build)

Moving the builds over to use this image will follow in the patches
ahead.
2017-09-18 15:38:22 -04:00
Gregory Szorc 7495229000 Backed out changesets ef813898b5d3, ce228388aaf6, and c798f482b2c5 (bug 1396098) for violating TC cache constraints
CLOSED TREE
2017-09-18 13:30:43 -07:00
Nick Alexander 80be0903de Bug 1396098 - part 1 - base android-build on Debian instead of CentOS; r=glandium,dustin
CentOS 6 is pinned to glibc 2.12, but newer Android build-tools (like
aapt) require glibc 2.14.  It's not possible to safely upgrade CentOS
6 distributions to glibc 2.14.

CentOS 7 is pinned to glibc 2.17, which is new enough for newer
Android build-tools. However, I had great difficulty bringing forward
our existing centos:6 Docker image to centos:7.  In particular,
installing recent enough Mercurial, git, Python, and pip versions was
difficult enough that I elected to not pursue this approach.

Instead, I've elected to follow glandium's suggestion from
https://bugzilla.mozilla.org/show_bug.cgi?id=1370119#c5: base on
Debian with snapshots.debian.org for reproducibility.

The most significant changes here:

- using Debian's snapshots repository
- using Python and related tools provided by Debian and baked into the
  build image
- using the JDK and JRE provided by Debian and baked into the build
  image, rather than versions from tooltool (or eventually a toolchain
  build)

Moving the builds over to use this image will follow in the patches
ahead.
2017-09-18 15:38:22 -04:00
Jonas Finnemann Jensen 4e7abc11d5 Bug 1393655 - Strip microsecond from run-task logs r=gps
* Strip microsecond from log prefixes generated
    by run-task.

MozReview-Commit-ID: 87kL6gs2LZS
2017-08-24 17:56:15 -07:00
Gregory Szorc a7ff09d251 Bug 1390700 - Support sparse checkouts in run-task; r=dustin
`run-task` is taught a --sparse-profile argument to be passed down
to `hg robustcheckout` for the main source checkout. It does what
you expect: performs a sparse checkout using the named profile.

The Taskgraph YAML for run-task is taught a "sparse-profile"
property to define the sparse profile. When defined, --sparse-profile
will be passed down to `run-task` and the cache name will be updated
to reflect the use of sparse checkout.

Our cache checking transform is updated to audit for the use of
--sparse-profile without the corresponding "-sparse" cache name
variation.

The reason we need a distinct cache name for sparse is because
clients that aren't sparse aware will be unable to read checkouts
that are sparse. By forcing sparse and non-sparse into different
cache pools, we avoid compatibility issues.

In the ideal world, we probably support sparse profiles on all the
VCS checkouts that `run-task` supports (e.g. --tools-checkout).
Perfect is the enemy of done. All of this is defined in-tree and
it is easy enough to change atomically.

MozReview-Commit-ID: 79k7Vul0hHO
2017-08-23 18:54:14 -07:00
Gregory Szorc a3c18f48fa Bug 1390700 - Fix some error messages in run-task; r=dustin
Include "error:" so Treeherder log parser picks things up (hopefully).

Also, actually include cache path in string.

MozReview-Commit-ID: 8b8ou7TJYZs
2017-08-24 09:06:45 -07:00
Gregory Szorc 3641ed7fbf Bug 1391476 - Add UID and GID to cache parameters; r=dustin
The UID and GID that a task executes under is dynamic. As a result,
caches need to be aware of the UID and GID that owns files otherwise
subsequent tasks could run into permission denied errors. This is
why `run-task --chown-recursive` exists. By recursively changing
ownership of persisted files, we ensure the current task is able
to read and write all existing files.

When you take a step back, you realize that chowning of cached
files is an expensive workaround. Yes, this results in cache hits.
But the cost is you potentially have to perform hundreds of thousands
of I/O system calls to mass chown. The ideal situation is that
UID/GID is consistent across tasks on any given cache and
potentially expensive permissions setting can be avoided. So, that's
what this commit does.

We add the task's UID and GID to run-task's requirements. When we
first see a cache, we record a UID and GID with it and chown the
empty cache directory to that UID and GID. Subsequent tasks using
this cache *must* use the same UID and GID or else run-task will
fail.

Since run-task now guarantees that all cache consumers use the same
UID and GID, we can avoid a potentially expensive recursive chown.

But there is an exception. In untrusted environments (namely Try),
we recursively chown existing caches if there is a uid/gid mismatch.
We do this because Try is a sandbox and any random task could
experiment with a non-standard uid/gid. That populated cache would
"poison" the cache for the next caller. Or vice-versa. It would be
annoying if caches were randomly poisoned due to Try pushes that
didn't realize there was a UID/GID mismatch. We could outlaw "bad"
UID and GIDs. But that makes the barrier to testing things on Try
harder. So, we go with the flow and recursively chown caches in
this scenario.

This change will shine light on all tasks using inconsistent UID
and GID values on the same cache. Bustage is anticipated.
Unfortunately, we can't easily know what will break. So it will be
one of those things where we will have to fix problems as they arise.
Fortunately, because caches are now tied to the content of run-task,
we only need to back out this change and tasks should revert to caches
without UID and GID pinning requirements and everything will work
again.

MozReview-Commit-ID: 2ka4rOnnXIp
2017-08-22 16:49:26 -07:00
Gregory Szorc 5e32e83855 Bug 1391476 - Automatically set cache/volume permissions in run-task; r=dustin
run-task's --chown and --chown-recursive are only used on volumes and
caches - the only locations that aren't controlled by the Docker image
itself and thus whose permissions could be "undefined."

Previous commits have taught run-task about the locations of all caches
and volumes. Therefore, we no longer need to manually define paths to
chown. Instead, we can chown as a side-effect of the path being a
cache or a volume.

So, this commit changes run-task to chown caches and volumes
automatically. Since we no longer have a use for --chown and
--chown-recursive, those arguments are removed.

There /could/ be some paths that are caches or volumes but aren't
getting defined as such in Taskgraph. I consider this a bug in
Taskgraph and the recourse is to properly define a path as a cache or
a volume there.

MozReview-Commit-ID: 1yqrhjil6gy
2017-08-23 12:07:18 -07:00
Gregory Szorc 6be419bf57 Bug 1391476 - Tell run-task about volumes so it can sanitize them; r=dustin
We recently introduced support for telling run-task about caches so
it could sanitize them automatically. We also recently taught
docker-worker and docker-engine how to declare volumes.

Building on that work, we now pass a list of paths corresponding
to Docker volumes to run-task.

run-task now verifies volumes behave as expected. Unless the volume
paths correspond to caches, run-task verifies they are empty and chowns
them to an appropriate owner.

Requiring empty volumes is an arbitrary decision. But as the inline
comment says, it keeps things simpler and makes caches and volumes
behave more like each other.

MozReview-Commit-ID: 5lm2uIitrS3
2017-08-23 10:47:37 -07:00
Gregory Szorc b185e46c30 Bug 1391476 - Print cache info; r=dustin
For forensic purposes.

MozReview-Commit-ID: 6pcOm90cPdw
2017-08-22 16:48:03 -07:00
Gregory Szorc b331ebe160 Bug 1391476 - Dedent block; r=dustin
MozReview-Commit-ID: 1l8gWfBNBMs
2017-08-22 12:40:44 -07:00
Rok Garbas 9d7ac6a8ed Bug 1284475 - migrate ToolTool blueprint to new codebase of relengapi r=KWierso
UPGRADE_NSS_RELEASE a=kaie
MozReview-Commit-ID: 7CB1VYb8OJP
2017-08-08 10:55:52 +02:00
Gregory Szorc 24512ad68d Bug 1392886 - Enable sparse extension in Docker images; r=mshal
This needs to be globally enabled to support sparse checkouts
and accessing repos using sparse checkouts.

Having the extension enabled should no-op unless sparse checkouts
are being used. i.e. it should be harmless to globally enable.

MozReview-Commit-ID: AKNUOXfYQPx
2017-08-22 20:44:57 -07:00
Wander Lairson Costa b99b3af74a Bug 1391806: Move valgrind task to its own docker image. r=ted
bug 1382280 tripled the size of desktop-build image because of
installation of debug symbols. It is only used for valgrind, so let's
move valgrind task to use its own image.

MozReview-Commit-ID: 16St7dDj8tr
2017-08-21 08:50:08 -03:00
Gregory Szorc ff6e79eb22 Bug 1391789 - Improve cache coherence via run-task integration; r=dustin
Today, cache names are mostly static and are brittle as a result.

In theory, when a backwards incompatible change is performed on
something that touches a cache, the cache name needs to be changed
to ensure tasks running the old code don't see cached data from the
new task. (Alternatively, all code is forward compatible, but that is
hard to implement in practice.)

For many things, the process works as planned. However, not everyone
knows that cache names need changed. And, it isn't always obvious
that some things require fresh caches. When mistakes are made, tasks
break intermittently due to cache wonkiness.

One area where we get into trouble is with UID and GID mismatch.
Task A will use a Docker image where our standard "worker" user/group
is UID/GID 1000:1000. Then Task B will use UID/GID 500:500. (This is
common when mixing Debian and RedHel based distros.) If they use the
same cache, then Task B needs to chown/chmod all files in the cache
or there could be a permissions problem. This is exactly why
run-task recursively chowns certain paths before dropping root
privileges.

Permissions setting in run-task solves permissions problems. But
it doesn't solve content incompatibility problems. For that, you
need to change cache names, not use caches, or blow away content
when incompatibilities are detected.

This commit starts the process of adding a little bit more coherence
to our caching story.

There are two main features in this commit:

1) Cache names tied to run-task content
2) Cache validation in run-task

Taskgraph now detects when a task is using caches with run-task. When
caches and run-task are both being used, the cache name is adjusted to
contain a hash of run-task's content. When run-task changes, the cache
name changes. So, changing run-task ensures that all caches from that point
forward are "clean." This frees run-task and any functionality related
to run-task (such as maintaining version control checkouts) from
having to maintain backwards or forwards compatibility with any other
version of run-task. This does mean that any changes to run-task
effectively wipe out caches. But changes to run-task tend to be
seldom, so this should be acceptable.

The second part of this change is code in run-task to record per-cache
properties and validate whether a populated cache is appropriate for
use. To enable this, taskgraph passes a list of cache paths via an
environment variable. For each cache path, run-task looks for a
well-defined file containing a list of "requirements." Right now,
that list is simply a version string. But other features will be
worked into it. If the cache is empty, we simply write out a new
requirements file and are done. If the file exists, we compare
requirements and fail fast if there is a mismatch. If the cache
has content but not this special file, then we abort (because this
should never happen).

The "requirements" validation isn't very useful now because the only
entry comes from run-task's source code and modifying run-task will
change the hash and cause a new cache to be used. The implementation
at this point is more demonstrating the concept than doing anything
terribly useful with it.

MozReview-Commit-ID: HtpXIc7OD1k
2017-08-18 14:07:03 -07:00
Gregory Szorc 557535d9c5 Bug 1391789 - Extract permission setting to own functions; r=dustin
I must have been in a closure mood when I wrote this code. The
main function is getting a bit heavyweight. So let's extract
these closures to make things less dense.

MozReview-Commit-ID: 4p5yKB1tTxn
2017-08-17 17:06:16 -07:00
Tom Prince 3f379db4b4 Bug 1384210 - Add comm-central checkout support to taskcluster's run-task; r=gps
MozReview-Commit-ID: LxjYLdzmNO3
2017-07-25 10:17:03 -06:00
Gregory Szorc 1c25795302 Bug 1389715 - Upgrade to Mercurial 4.3.1; r=ted
This is pretty straightforward: we just update some version numbers
and hashes.

The tooltool artifacts were produced and uploaded by me, just like
the last ones. I have some patches to establish a proper toolchain
task to build Mercurial. But it is a bit of a rabbit hole due to the
chicken-and-egg problem of Mercurial needing to be in Docker images.
Preserving the existing install mechanism is the simplest path
forward. Plus we need this patch so we can uplift so earlier releases
get a secure Mercurial in their Docker images.

color and pager are enabled by default in 4.2. So remove configuration
options for them that add no value.

MozReview-Commit-ID: 9pkHX044kV8
2017-08-14 19:03:33 -07:00
Gregory Szorc a96f43060d Bug 1389715 - Remove the illusion we support running Mercurial with Python 2.6; r=ted
The comment removed by this commit invited the potential for badness.
Mercurial 4.3 drops support for Python 2.6 anyway. So let's remove
any indication we support running Mercurial with Python 2.6.

MozReview-Commit-ID: 40K10s95FLg
2017-08-14 19:02:06 -07:00
Gregory Szorc 6e5b339435 Bug 1389715 - Remove legacy Ubuntu 12.04 desktop-test image; r=jmaher
AFAICT there are no more in-tree references to this image. That
should mean we can nuke it. So do that.

MozReview-Commit-ID: 9LUGjt46ZCi
2017-08-14 16:04:18 -07:00
Wander Lairson Costa f1ea1f7075 Bug 1382280 part 2: Install debug information. r=ted
valgrind test will try to load debug information for the modules present
in a stack trace. If it fails to do it, we endup with a stack trace with
only memory addresses.

We install debuginfo for all installed packages and look for all libs
in the system common locations, and try to install the corresponding
debug information package.

These are acomplished with debuginfo-install yum utility script.

MozReview-Commit-ID: 76mHOUKKJud
2017-08-10 13:42:12 -03:00
Wes Kocher 46fa5ca2c2 Backed out changeset bdad4ba95b6d (bug 1384210) for android mda3 crashes in test_peerConnection_captureStream_canvas_webgl.html a=backout
MozReview-Commit-ID: 7ymXkiY0dvi
2017-07-27 18:44:06 -07:00
Tom Prince 475e546404 Bug 1384210 - Add comm-central checkout support to taskcluster's run-task; r=gps
MozReview-Commit-ID: LxjYLdzmNO3
2017-07-25 10:17:03 -06:00
Mike Hommey 187e7f6ebc Bug 1355731 - Move tooltool to mozbuild.action. r=gps 2017-02-22 17:20:41 +09:00
Gregory Szorc 14f8d04103 Bug 1355624 - Make Mercurial require TLS 1.2+ connections; r=dustin
Mercurial uses the latest version of TLS that is both supported by
Python and the server.

In automation, the servers we care about should all support TLS 1.2.

The Python side is trickier. Modern versions of Python (typically 2.7.9+)
support TLS 1.1 and 1.2. Mercurial will default to allowing TLS 1.1+ -
explicitly disallowing TLS 1.0. However, legacy versions of Python
don't support TLS 1.1+, so Mercurial will allow TLS 1.0+ rather than
prevent connections at all.

TLS 1.0 is borderline secure these days. I think it is a bug for TLS
1.0 to be used anywhere in the Firefox release process. This simple
patch changes our default Mercurial config in TaskCluster to require
TLS 1.2+ for all https:// communications. For modern Python versions,
this effectively prevents potential downgrade attacks to TLS 1.1
(connections before should have negotiated the use of TLS 1.2).

I expect this change to break things. Finding and fixing automation
that isn't capable of speaking TLS 1.1+ should be encouraged.

MozReview-Commit-ID: 876YpL5vB3T
2017-04-11 14:52:39 -07:00
Gregory Szorc d8df67efb8 Bug 1354224 - Upgrade to Mercurial 4.1.2; r=dustin
This is a pretty straightforward change. Just bumping package versions
and hashes. Behavior should be almost identical to the previous 4.1.1+
packages.

MozReview-Commit-ID: CaVjM0JHYKi
2017-04-06 11:28:02 -07:00
Gregory Szorc 8b026b720e Bug 1350437 - Install Mercurial 4.1.1+; r=dustin
We've been running Mercurial 3.9 in automation for a while. Mercurial
4.1 is out. It has the usual performance improvements and bug fixes,
making it an attractive upgrade. But what really makes it enticing
is support for zstandard compression over the wire protocol. This will
reduce server-side CPU load and make transfers between 4.1+ servers
faster.

So, let's upgrade to Mercurial 4.1.1.

The produced packages are built from the current tip of the
stable Mercurial branch, not exactly 4.1.1. Specifically, they
correspond to revision ed5b25874d99. I did this because there is
a patch in the stable branch that drastically improves performance
on repos with many heads. When 4.1.2 is released in a few days, we
can upgrade to it and do away with the one-off.

MozReview-Commit-ID: 6BPhVheHQXI
2017-03-29 09:17:56 -07:00
Dustin J. Mitchell 8257cadc71 Bug 1349208: temporary fix to get flashplayer out of the 16.04 image while we find a better fix; r=jmaher, a=testers-only
MozReview-Commit-ID: IR2PVFXHlEa
2017-03-21 18:19:26 +00:00
Ralph Giles 192455dcb9 Bug 1346897 - Indent tooltool manifests. r=mshal
Apply a 2-character indent to in-tree tooltool manifests to make
them easier to read, and to make the formatting more consistent
so automating updates is simpler.

Modern editors will maintain json indentation. The only long
lines we have are already over 80 characters, so the extra space
shouldn't create new long lines.

Also update mercurial installer script to generate json with
the same indentation, even though its output is temporary.

Tooltool itself was updated to generate manifests with this
indentation in Bug 1325225.

MozReview-Commit-ID: DKj6nL9OENv
2017-03-15 12:27:51 -07:00
Dustin J. Mitchell 4e0aee3873 Bug 1337903: add support for OS X in run-task; r=ahal
* add run.using = 'run-task' for native-engine
* modify run-task to run on OS X
  - not as root
  - without assuming /home/worker (using ~ and os.expanduser instead)
  - hg is in /usr/local/bin on OS X; trust the PATH
* add_build_dependency isn't docker-worker specific, so just rename
* support_vcs_checkout modified to omit caches on native-engine
* don't download fingerprints on OS X; these hosts are configured with
  the proper fingerprint via puppet

MozReview-Commit-ID: C83XClXtcn4
2017-03-03 22:49:23 +00:00
Botond Ballo b31a46f3c6 Bug 1334641 - Patch the version of libxcb used by the Ubuntu 12.04 testers. r=jmaher
The patch, taken from upstream libxcb version 1.11, and applied to the libxcb
1.8 version we use on the 12.04 testers, fixes the "xcb_conn.c:186: write_vec:
Assertion `!c->out.queue_len' failed" error that has been plaguing us in bug
1293474.

The Ubuntu 16.04 testers do not need to be patched becaused they are running
a newer version of libxcb that already has the upstream fix.

MozReview-Commit-ID: AoRNonpK0Dr
2017-01-27 17:35:57 -05:00
Mark Banner 64c50a9ef8 Bug 1331065 - Upgrade the Lint docker image to node v6.9.1. r=jmaher
MozReview-Commit-ID: KOdYXXERO8p
2017-01-20 10:57:47 +00:00
Geoff Brown 3412a05771 Bug 1331455 - Add net-tools to Ubuntu 16 docker image, for netstat; r=jmaher 2017-01-17 08:17:20 -07:00
Geoff Brown ec506723a0 Bug 1287099 - Update Ubuntu 16.04 docker image for linux32; r=jmaher 2017-01-09 12:01:11 -07:00
Geoff Brown 1388ee052b Bug 1287099 - Update Ubuntu 12.04 docker image for linux32; r=jmaher 2017-01-09 09:17:49 -07:00
Iris Hsiao 5c8180a84c Backed out changeset 5ddb2e58bb74 (bug 1287099) 2017-01-05 12:21:35 -05:00
Joel Maher 8705cdfe01 Bug 1287099 - Run linux32 tests in taskcluster; r=jmaher 2016-08-22 11:38:27 -04:00
Ehsan Akhgari 00152967c8 Bug 1324492 - Install CMake 3.7.1 in desktop-build images; r=dustin 2017-01-04 16:50:08 -05:00
Chris Manchester a8c1640c56 Bug 1323581 - Install Make 4.0 in the desktop build image to take advantage of parallelism during automation steps. r=gps
MozReview-Commit-ID: 3EHbQlrT2vf
2016-12-22 13:45:51 -08:00
Carsten "Tomcat" Book ef798f401e Merge mozilla-central to mozilla-inbound 2016-12-22 16:25:35 +01:00
Sebastian Hengst a30693c808 Backed out changeset fe7303de56be (bug 1302763) for failing webdriver tests on Linux x64 debug (geckodriver.manifest fetch failed). r=backout 2016-12-19 21:15:07 +01:00
CuriousLearner 5ad707be1b Bug 1302763 - Move docker images out of testing/docker into taskcluster/docker; r=CuriousLearner
MozReview-Commit-ID: 7v1uCDB5qoN
2016-10-20 18:25:34 +05:30
Wes Kocher 0e898f33dd Backed out changeset d15798b73b9e (bug 1302763) for taskcluster build issues a=backout CLOSED TREE 2016-10-20 15:59:47 -07:00
CuriousLearner 54ec174129 Bug 1302763 - Move docker images out of testing/docker into taskcluster/docker; r=dustin
MozReview-Commit-ID: 7v1uCDB5qoN
2016-10-20 18:25:34 +05:30
CuriousLearner f27a0ad144 Bug 1302763 - Move docker images out of testing/docker into taskcluster/docker; r=dustin r=CuriousLearner
MozReview-Commit-ID: 7v1uCDB5qoN
2016-10-20 18:25:34 +05:30