Commit Graph

7 Commits

Author SHA1 Message Date
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
Andrew Halberstadt
e35ca8cc00 Bug 1336559 - Add ability to depend on build artifacts to 'run_task' based tasks, r=dustin
Currently 'run_task' tasks have no easy way to depend on a build task. For example, some
python unittests need a Firefox binary for their tests, like the mozrunner tests and future
test harness selftests (like mochitest tests).

This patch allows kinds to add a new key to the kind config which maps test platforms to
build-labels. Then 'run_task' jobs can add a 'requires-build': true field to get a build
dependency automatically added. The build artifact url will also be stored in the
$GECKO_INSTALLER_URL environment variable on the test host.

MozReview-Commit-ID: Jqyhbj7nC6z
2017-02-24 09:04:22 -05:00
Gregory Szorc
d8c36bdacc Bug 1312475 - Add a version parameter to checkouts cache; r=dustin
ff5a4bab0813 (bug 1311791) and 332a08725ed0 (bug 1292071) changed
behavior of the VCS caches. First, the store cache / path was merged
into the checkouts cache. Then the path of the Mercurial shared store
was moved within the cache to always be rooted at the cache root.

Caches are shared across tasks. Tasks can execute on any revision
configured to use a cache. So, when interacting with caches, it is
important to consider how every revision configured to use that
cache will interact with it.

Take this scenario for example.

A worker executes a task where the hg shared store is rooted at
/home/worker/checkouts/src/hg-shared. Then the worker executes a
task where the hg shared store is rooted at
/home/worker/checkouts/hg-store. `hg robustcheckout` will see the
checkout from the first task. But then it sees that the store
it is pointing to is at an unexpected location
(checkouts/src/hg-shared instead of checkouts/hg-store). `hg
robustcheckout` aggressively normalizes state to ensure
consistency. So when it sees this mismatch, it blows away the
checkout and creates one from checkouts/hg-store to replace it.
That's a lot of overhead. And this cycle can repeat itself if
the right combination of revisions run on the worker!

A solution to this problem is to create a clean break from caches
when cache semantics change. In TaskCluster, that means using a
different cache.

This commit introduces a "version" component to the checkouts
cache name. By doing so, we create a clean break from all previous
caches, ensuring all revisions this point forward won't encounter
an hg shared store at an unexpected location. This also paves the
road for easily making additional clean breaks in the future.

MozReview-Commit-ID: JT8yuULKpch
2016-10-24 09:58:01 -07:00
Gregory Szorc
ca434f80a4 Bug 1311791 - Explicitly declare path to shared hg store; r=dustin
332a08725ed0 changed the store path logic in a quick and crude manner.
The code could lead to multiple shared stores existing on a cache
if checkouts were in different parent directories.

This commit refactors the code to explicitly declare a path to the
shared hg store. This restores the behavior of ensuring there is only
a single shared store per cache.

MozReview-Commit-ID: 19Aa1QVrVQ8
2016-10-20 12:56:43 -07:00
Gregory Szorc
af5fb4af80 Bug 1292071 - Put Mercurial store on same cache as checkout; r=dustin
We were seeing issues with the Mercurial working directory not being
pristine. While I can't reproduce this, I have a hunch it is due to
mixing and matching stores and checkouts in TaskCluster. For example,
if a worker supports running concurrent tasks and 2 tasks arrive at
the same time, the caches for the store and checkout may look like:

  (store0, checkout0)
  (store1, checkout1)

However, the next task may get:

  (store1, checkout0)

This may confuse Mercurial.

This commit eliminates the "hg-shared" cache and places the shared
stores as a sibling directory of the checkout.

MozReview-Commit-ID: 8SzyS6wWf9C
2016-10-18 09:46:55 -07:00
Gregory Szorc
d85649478b Bug 1296397 - Move VCS task setup functionality to standalone function; r=dustin
Tasks that aren't using run-task may want to configure a task for
optimal VCS setup. Also, having all the code in the same place makes
it easier to keep track of.

MozReview-Commit-ID: GkB2YEUIQiX
2016-09-13 13:56:46 -07:00
Dustin J. Mitchell
5a2e6a001c Bug 1286075: add a build kind, modify tests to use it; r=jlund
MozReview-Commit-ID: DkpkkSRxVB9
2016-09-12 18:34:06 +00:00