Commit Graph

73 Commits

Author SHA1 Message Date
Mike Hommey
f6f42d4f18 Bug 1334401 - Prefer docker images from higher levels. r=jonasfj
Considering docker images contents depend very much on the moment they
were built, it is possible that two images with the same hash in the
taskcluster index (at different levels) have different contents. When
this happens, the build or test results could be significantly
different between e.g. try and mozilla-central, possibly leading to
misleading results at landing time.

So if for some reason multiple levels have images for the same hash, the
one used at the highest level should be prefered, such that try uses the
same as mozilla-central once mozilla-central generates the image for
that hash, even if there is an image previously generated for try.

--HG--
extra : rebase_source : 57f593a530da02f9f576872404915c26af544688
2017-01-27 16:18:02 +09:00
Dustin J. Mitchell
174aa73537 Bug 1332844: alias "Ubuntu" to test platform linux32, rather than linux; r=gbrown
MozReview-Commit-ID: GjY9tF5TxjL

--HG--
extra : rebase_source : abab2fd0e01127e95dabf085ce459cc3e7e525a4
2017-01-21 18:53:19 +00:00
Dustin J. Mitchell
ea8b4ebe23 Bug 1332570: better test for ridealongs; r=Callek
MozReview-Commit-ID: 1eUytk4cMcf

--HG--
extra : rebase_source : 7ab7e12d5bc581b7daa4d39da14e1b6cbf4f0fbd
2017-01-09 15:02:14 -05:00
Sebastian Hengst
7030cacc26 Backed out changeset d9da8599a99f (bug 1332570) for flake8 failure (unused itertools). r=backout 2017-01-23 18:14:23 +01:00
Dustin J. Mitchell
fb6f21fb9e Bug 1332570: better test for ridealongs; r=Callek
MozReview-Commit-ID: 1eUytk4cMcf

--HG--
extra : rebase_source : 4427ca0d73f9a1899338a6886edce8db1fdae37f
2017-01-09 15:02:14 -05:00
Nathan Froyd
a3e09b1dbf Bug 1302028 - part 3 - modify path for filtering out servo tasks; r=gps
We're adding a dummy servo/ports/geckoservo/ directory, which would make
the filtering logic for Taskcluster tasks think that we want to run
Servo tasks all the time.  But we don't have a complete installation of
Servo, so things will inevitably fall over if we did that.  To avoid
this situation, change the path that the filter checks for to something
a little more specific and less likely to cause conflicts.
2017-01-20 11:33:04 -05:00
Dustin J. Mitchell
b8d8f8a712 Bug 1252948: support for periodic taskgraphs; r=Callek,jonasfj,kmoir
This adds `.cron.yml` and a new mach command to interpret it.  While
functionality is limited to nightlies right now, there is room to expand to
more diverse periodic tasks.  Let your imagination run wild!

MozReview-Commit-ID: KxQkaUbsjQs

--HG--
extra : rebase_source : ddf0a1eadae5a1169c0ead7bcb7b9ce61b255fbf
2017-01-18 19:45:53 +00:00
Dustin J. Mitchell
47dccff324 Bug 1326547: require that regexps in by-* match entire string; r=Callek
MozReview-Commit-ID: GxVAGHtCrzf

--HG--
extra : rebase_source : 8f3e573be44478011931d2579a3df09a11eb6e97
2017-01-03 18:43:48 -05:00
Dustin J. Mitchell
bfbc5f350d Bug 1326547: replace get_keyed_by with resolve_keyed_by; r=Callek
MozReview-Commit-ID: FS1nbVyykXV

--HG--
extra : rebase_source : 6cddb3ecb188f2c9c6dafee98c3b0ed5bfdf1955
2017-01-05 13:42:14 -05:00
Jonas Finnemann Jensen
1af303239b Bug 1324414 - Reference prebuilt docker images by HASH. r=dustin
This adds a HASH file next to the VERSION file in the image
context folders for prebuilt docker images. And uses the
HASH for referencing the image in the tasks created by
the decision task.

This way docker will validate the image hash when pulling it
in production. Thus, attackers won't be able to inject code
by compromising the remote docker registries we use to store
prebuilt images. Further more, this makes validation of the
Chain-Of-Trust artifacts easier as this eliminates the need
for whitelists and hash validation.

MozReview-Commit-ID: FD3B9MyeU9Q

--HG--
extra : rebase_source : e01cdbd0db06b36ba95dec3da936ee307a23aae7
2016-12-19 11:31:56 +01:00
Hammad Akhtar
079365ac41 Bug 1322193 - Verify taskgraph implementations against documentation, with proper regex. Updated doc verification for fake values of kinds, parameters etc., regex optimized r=Callek
MozReview-Commit-ID: 56ZEJECbtK5

--HG--
extra : rebase_source : ad1efed52363e95040a9907c6387b4cd57bdaa49
2016-12-06 12:03:36 +05:30
Andrew Halberstadt
541a302cee Bug 1318438 - [taskcluster] "job" tasks should have ability to run on multiple platforms, r=dustin
This adds an optional "platforms" key to the job description. It can be used in conjunction with
"by-platform" like so:

platforms:
    - linux
    - windows
worker-type:
    by-platform:
        linux: ...
        windows: ...
worker:
    by-platform:
        linux: ...
        windows: ...

MozReview-Commit-ID: JwL1NAR4bnY

--HG--
extra : rebase_source : 637dd777912e256d82092ba3e0edd6937cbb03c6
2016-11-18 15:07:56 -05:00
Gregory Szorc
743fc9a44c Bug 1318200 - Filter Stylo platforms when Servo isn't available; r=dustin
Stylo automation doesn't work unless Servo is present in the source
directory. This commit introduces a "check_servo" filter that prunes
tasks requiring Servo. Currently, this is implemented as a test against
platforms that are unique to Servo.

The use of relative path checking to find the topsrcdir is a bit
unfortunate. But we use this pattern elsewhere in this code.

MozReview-Commit-ID: IRtd53tudJW

--HG--
extra : rebase_source : 8c4742c13878d762fe7970eedfa5937fdaebe8c4
2016-11-17 17:10:01 -08:00
Gregory Szorc
bd86442e13 Bug 1318200 - Obtain target tasks method from parameters; r=dustin
Previously, all callers outside of tests that passed
"target_tasks_method" to TaskGraphGenerator all used the same pattern
of looking for a key in the parameters and calling a function in
the target_tasks module.

Future commits will refactor how target tasks graph work. To
make the transition easier, we move the logic for obtaining the
target tasks method into TaskGraphGenerator.

MozReview-Commit-ID: 3QU09iGhoXh

--HG--
extra : rebase_source : fbcc31d705c4b0e148aa3709ddcb18ad99953231
2016-11-17 16:29:51 -08:00
Jonas Finnemann Jensen
2cd49e189e Bug 1316183 - Compress docker images with zstd. r=dustin
* Compress docker images with zstd
 * Removed need for context.tar from decision task
 * Index images by level rather than project

MozReview-Commit-ID: 4RL4QXNWmpd

--HG--
extra : rebase_source : 677d8030a15af3288866a70fc648a10b22c396a3
2016-11-07 11:26:27 -08:00
Wander Lairson Costa
9caaae3ed3 Bug 1274980 part 1: Add support for test platform regex match. r=dustin
Often we need to setup a test configuration for different platforms, but
not for different platform builds (opt/debug). This leads to cumbersome
configuration duplicates. This patch adds support for platform regular
expression matching. For example, if you want to configure the chunk
size for linux64 platform both for opt and debug, originally you would
do this:

chunks:
    by-test-platform:
        linux64/opt: 4
        linux64/debug: 4
        default: 8

With regular expression matching, you only need:

chunks:
    by-test-platform:
        linux64/.*: 4
        default: 8

This patch was originally written by Geoffrey Brown for Windows support.

MozReview-Commit-ID: KbMHV7UkTLe

--HG--
extra : rebase_source : 79a4344c7e3e978bb6b93713c6e6e4114ba5d5b8
2016-11-08 12:11:15 -02:00
Dustin J. Mitchell
aaabbac964 Bug 1296842: check parameters; r=jmaher
MozReview-Commit-ID: 1JCpufowNHD

--HG--
extra : rebase_source : 3409f417070751615d799cbda3f99d8e9029dda3
2016-11-07 19:13:40 +00:00
Dustin J. Mitchell
51aa1fc9fb Bug 1296842: make target-task related parameters a fixed set; r=jmaher
The `from_parameters` method was never used, and let do confusion over the role
of these parameters.  Now there are only two, and they are always required.

MozReview-Commit-ID: AbPqijXucu5

--HG--
extra : rebase_source : 85affd063a543c549afaaa36ce7ee31ed1f943d5
2016-11-07 19:13:34 +00:00
Sebastian Hengst
c663cd7c34 Backed out changeset b8760b0b11ac (bug 1274980) on suspicion of breaking marionette tests in taskcluster. r=backout on a CLOSED TREE 2016-11-07 18:57:58 +01:00
Wander Lairson Costa
4e8662ab83 Bug 1274980 part 1: Add support for test platform regex match. r=dustin
Often we need to setup a test configuration for different platforms, but
not for different platform builds (opt/debug). This leads to cumbersome
configuration duplicates. This patch adds support for platform regular
expression matching. For example, if you want to configure the chunk
size for linux64 platform both for opt and debug, originally you would
do this:

chunks:
    by-test-platform:
        linux64/opt: 4
        linux64/debug: 4
        default: 8

With regular expression matching, you only need:

chunks:
    by-test-platform:
        linux64/.*: 4
        default: 8

This patch was originally written by Geoffrey Brown for Windows support.

MozReview-Commit-ID: HFP52N9Ef0k

--HG--
extra : rebase_source : d2a5129b7459fc7f71f59da76d45526cef028e44
2016-11-07 09:20:50 -02:00
Joel Maher
974f731a59 Bug 1300074 - adjust taskcluster task names to match buildbot. r=dustin.
MozReview-Commit-ID: BV9stGRhhZG

--HG--
extra : rebase_source : 39b630a75acd571555a983c3d6f9dcbf1170d96d
2016-10-05 08:57:50 -04:00
Phil Ringnalda
18e0fd86a6 Bug 1307043 - Make [Ubuntu] in try syntax include ASan tests, r=dustin
If you want to run tests on Linux32 and Linux64, you use trychooser syntax like
"-u all[Ubuntu]" which taskcluster supports, but if you also built ASan, and
want tests on ASan, there's no supported documented way to get them. That sounds
like an edge-case, except that to get tests to run on WinXP or Win8 you have to
explicitly list them, so to get tests on every platform you build you have to
list all of them, and if ASan is one of them you have to somehow know to dig
around in the .yml and to know that linux64-asan is the thing to dig out.

MozReview-Commit-ID: 2REf0cUWmK8

--HG--
extra : rebase_source : cb77ff3e016939c94ac05964a6db809fe10aaa1a
2016-10-02 23:20:02 -07:00
Brian Stack
92ede5330c Bug 1275774 - Add tests for new taskcluster try flag parsing r=dustin
MozReview-Commit-ID: 1QKnLZE0hzU

--HG--
extra : rebase_source : 7301c162bb21e41dcc858ff0d94b456e695166fc
2016-09-28 09:34:42 -07:00
Brian Stack
e6e4f7b548 Bug 1275774 - Add notify routes to taskcluster tasks for certain try flags r=dustin
MozReview-Commit-ID: 4ugUjv0NCZK

--HG--
extra : rebase_source : d552a45a25cdcfbde9eb012b4c77a6f4b8770444
2016-09-26 10:57:14 -07:00
Iris Hsiao
767e1e9b11 merge mozilla-inbound to mozilla-central a=merge 2016-09-26 18:34:20 +08:00
Dustin J. Mitchell
1045a329b8 Bug 1302227: set the taskGroupId to match the decision task; r=garndt
In this case, the tasks must have the same schedulerId as the existing task,
so this is calculated using parameters['level'].

MozReview-Commit-ID: G8EE2kvFstT

--HG--
extra : rebase_source : 214885da9b58520727d5f80b9a31bb8a206f9279
2016-09-22 21:30:56 +00:00
Dustin J. Mitchell
1261f3fd1c Bug 1277579: fix taskgraph tests after code change; r=philor
MozReview-Commit-ID: 7wJWFhcnA5s
2016-09-17 00:54:39 +00:00
Dustin J. Mitchell
bfea831cd8 Bug 1286075: delete the legacy kind; r=mshal
MozReview-Commit-ID: F99tUGUWj6d

--HG--
rename : taskcluster/ci/legacy/routes.json => testing/mozharness/configs/routes.json
extra : rebase_source : a437dd30dac1add3f439a98a8d910d2bdbcc843f
2016-09-08 00:31:35 +00:00
Dustin J. Mitchell
2fb0796e2b Bug 1286075: add support for optimizing based on files changed in the push; r=gps
MozReview-Commit-ID: 5di7TuL9X2P

--HG--
extra : rebase_source : 30b078178b028b22c0cd7b3d893aa12fd195cf26
2016-09-12 18:40:12 +00:00
Dustin J. Mitchell
6db7f5787e Bug 1286075: fix target task generation, including try; r=Callek
This uses the run_on_projects attribute introduced earlier for most branches,
adjusts the `ash` method to handle that branch as the legacy implementation
did, and updates try syntax to match builds as well as tests.

In the process, this enables optimizing target tasks, meaning that tasks
specifically requested in the try syntax might be optimized.  While this is
probably not ideal, it matches the existing behavior of try (where `-j all` is
the default but all jobs are set to run only when certain files have been
modified).  This change can be reverted later, in a more advanced version of
try.

MozReview-Commit-ID: 5FYeUTAsafr

--HG--
extra : rebase_source : b358e0e7cd8a401c50009e63dd55c59489c9b75b
2016-09-12 18:41:58 +00:00
Dustin J. Mitchell
7fa48ca716 Bug 1286075: factor load_yaml into a util module; r=gps
MozReview-Commit-ID: DPWZWslcphy

--HG--
extra : rebase_source : 003971b8caf20565f03a800ae5712fe775366e92
2016-09-06 18:01:27 +00:00
Dustin J. Mitchell
d5b3c6a83c Bug 1286075: allow optimization of tasks whose dependencies have not been optimized; r=armenzg
MikeLing initially did this in bug 1287018.  The intent of this conditional was
to make optimization faster by not even checking most tasks, based on the
assumption that if the prerequisite to a task has changed (for example, a
docker image or a build), then naturally we will want to execute that task.
However, as we have developed actual optimization methods, this has proven not
to be the case: we might want to optimize a test out if its inputs have not
changed, even if a new installer has been built.  Similarly, SETA may optimize
tasks out even if their inputs have changed.

MozReview-Commit-ID: LgHET3Z84GB

--HG--
extra : rebase_source : efd297d37bd49dbe655266380641abc258dda725
2016-09-07 00:10:51 +00:00
Dustin J. Mitchell
23bf4c2928 Bug 1286075: improve dict merging support; r=gps
MozReview-Commit-ID: D3691sf2LqZ

--HG--
extra : rebase_source : 7ee2444782b1354d5a4edcfc55c3044b292fcc46
2016-08-19 18:12:40 +00:00
Justin Wood
7be2611be7 Bug 1293789 - Single Locale in TC - Add task def for try. r=rail
MozReview-Commit-ID: 7n2NqqHj9wL

--HG--
rename : testing/mozharness/configs/single_locale/tc_android_api_15.py => testing/mozharness/configs/single_locale/tc_android-api-15.py
extra : rebase_source : 4a575d04ea6fac7078d483f00f169cfdb9ac5194
2016-09-03 10:32:22 -04:00
Geoff Brown
defab7007f Bug 1274578 - Do not use alias when specific try -u test requested; r=dustin 2016-08-16 14:56:45 -06:00
Dustin J. Mitchell
e91ee0ef70 Bug 1293397: fix fake to make tests pass? r=armenzg
MozReview-Commit-ID: AuQBk2w8Ka1
2016-08-08 21:03:38 +00:00
Gregory Szorc
2377b59bfe Bug 1290611 - Normalize mode of created file in tests; r=dustin
Without this, current umask may influence test results. That was
causing differences between automation and local runs.

MozReview-Commit-ID: 1eu613aBpKB

--HG--
extra : rebase_source : 41c92b9ea795217e715dfa949d3444534aafb7c7
2016-08-02 08:36:19 -07:00
Dustin J. Mitchell
ac4f355abc Bug 1290611: make test_p_expands_ridealongs resilient; r=gps
Use the source RIDEALONG_BUILDS value in the module under test so that changes
to that variable do not cause the test to fail.

MozReview-Commit-ID: EfHQ7baBziB

--HG--
extra : rebase_source : 1c52bf62709236db14a3ce318495891a2eb274f4
2016-07-29 23:01:04 +00:00
Dustin J. Mitchell
25cdf853c0 Bug 1290611: fix test_generate_context_hash; r=gps
The existing hash was for an empty tarfile.  Oops!

MozReview-Commit-ID: 1KOZxnDmoOH

--HG--
extra : rebase_source : 5d4db299dba80f98ba0383e88a1f4cfcb1dbcc70
2016-07-29 22:54:18 +00:00
Gregory Szorc
260d3ee7ed Bug 1288567 - Inline create_context_tar; r=dustin
The function was only used once and was providing little to no value.

A test of this function has been removed. Tests for the lower-level
context creation function are sufficient.

MozReview-Commit-ID: D9EhmZQlqG5

--HG--
extra : rebase_source : 4b3faa0fc5f085c1c77fe5636744946a6d442b05
2016-07-25 11:48:20 -07:00
Gregory Szorc
fc3f70b542 Bug 1288567 - Add special Dockerfile syntax to add arbitrary files to context; r=dustin
A limitation of traditional docker build context generation is it
only includes files from the same directory as the Dockerfile. When
repositories have multiple, related Dockerfiles, this limitation
results file duplication or putting all Dockerfiles in the same
directory (which isn't feasible for mozilla-central since they would
need to be in the root directory).

This commit enhances Dockerfiles to allow *any* file from the
repository checkout to be ADDed to the docker build context.

Using the syntax "# %include <path>" you are able to include paths
or directories (relative from the top source directory root) in the
generated context archive. Files add this way are available under the
"topsrcdir/" path and can be ADDed to Docker images.

Since context archive generation is deterministic and the hash of
the resulting archive is used to determine when images need to be
rebuilt, any extra included file that changes will change the hash
of the context archive and force image regeneration.

Basic tests for the new feature have been added.

MozReview-Commit-ID: 4hPZesJuGQV

--HG--
extra : rebase_source : 99fae9fe82102126fbee879c134981047bb4a601
2016-07-21 16:51:30 -07:00
Gregory Szorc
0c32f4dd33 Bug 1288567 - Use create_context_tar in generate_context_hash; r=dustin
This restores order to only having a single hash for a context
directory.

Using a tempfile here is a bit unfortunate. It can be optimized later,
if needed.

MozReview-Commit-ID: LMNsvt3fDYx

--HG--
extra : rebase_source : 8c2b70164aed6d744a71d170d0324797e755cbaf
2016-07-22 12:46:06 -07:00
Gregory Szorc
b1bf2c70e8 Bug 1288567 - Add basic test for context tar creation; r=dustin
Now that the context tar creation function is standalone and doesn't
rely on external state, we can start unit testing it easier.

We establish a basic unit test that verifies the function works as
advertised and that output is deterministic.

MozReview-Commit-ID: H4MY28PiHSN

--HG--
extra : rebase_source : 692a5e3d5af6edd14b3d4ceb7c90cd1e0344052f
2016-07-22 10:57:27 -07:00
Dustin J. Mitchell
ffca84ff7d Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.

The high-level view is this:

 - some configuration files are used to determine which test suites to run
   for each test platform, and against which build platforms

 - each test suite is then represented by a dictionary, and modified by a
   sequence of transforms, duplicating as necessary (e.g., chunks), until
   it becomes a task definition

The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).

As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:

  - extra.treeherder.groupName -- this was not consistent in the YAML
  - extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
  - mozharness command argument order
  - boolean True values for environment variables are now the string "true"
  - metadata -- this is now much more consistent, with task name being the label

Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):

  - autoland
  - ash (*)
  - willow
  - mozilla-inbound
  - mozilla-central
  - try:
    -b do -p all -t all -u all
    -b d -p linux64,linux64-asan -u reftest -t none
    -b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]

(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.

IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)

MozReview-Commit-ID: G34dg9f17Hq

--HG--
rename : taskcluster/taskgraph/kind/base.py => taskcluster/taskgraph/task/base.py
rename : taskcluster/taskgraph/kind/docker_image.py => taskcluster/taskgraph/task/docker_image.py
rename : taskcluster/taskgraph/kind/legacy.py => taskcluster/taskgraph/task/legacy.py
extra : rebase_source : 03e70902c2d3a297eb9e3ce852f8737c2550d5a6
extra : histedit_source : d4d9f4b192605af21f41d83495fc3c923759c3cb
2016-07-11 23:27:14 +00:00
Kalpesh Krishna
7eccb69c1c Bug 1281062 - Create Action Tasks to schedule new jobs. r=dustin
MozReview-Commit-ID: 5MvqLfGrlLC

--HG--
extra : rebase_source : dd954acce8ef9ed2f3b9aa7c5c2cbd916a82f1f1
2016-07-11 22:43:58 +05:30
Kalpesh Krishna
e5474c6adb Bug 1285755 - Adding a from_json function to TaskGraph and each Task subclass. r=dustin
MozReview-Commit-ID: 8fmALSP8nDs

--HG--
extra : rebase_source : 52729a77206498ca32e716ae3774e21f6329f805
2016-07-11 22:39:04 +05:30
Dustin J. Mitchell
647b6edf55 Bug 1281004: factor out searching for python objects by path; r=gps
MozReview-Commit-ID: 4ioEqPA7BQk

--HG--
extra : source : bc47aed3745de266164932e1eb1c7ad244e5f9cb
2016-06-29 22:12:09 +00:00
Dustin J. Mitchell
c6a548be78 Bug 1280231: rename types.py to taskgraph.py; r=Callek
MozReview-Commit-ID: Jf6CVyFCGMI

--HG--
rename : taskcluster/taskgraph/types.py => taskcluster/taskgraph/taskgraph.py
extra : rebase_source : 12e30313eb1fd4062c0be9d869460644ae949019
extra : intermediate-source : 4b1d94901b4d09c13031982c28eec6a48f938c71
extra : source : e85765be39d61d7c0df9831e16930328effad554
2016-06-20 19:11:52 +00:00
Dustin J. Mitchell
77ad76d2ad Bug 1280231: Load kinds in order by dependencies; r=jonasfj
This enables kinds that generate tasks based on those output by another kind.
For example, the test kind might generate a set of test tasks for each build
task.

MozReview-Commit-ID: K7ha9OmJ6gd

--HG--
extra : rebase_source : 36fc7e2d9c5987a4bb8b3779cf1a9308f5561828
extra : intermediate-source : 7898d1ab1afc08f78445165d0c94566b0682a2f7
extra : source : 0852b38cd86c42ebba0f9e74d7470a263969b784
2016-06-27 22:31:06 +00:00
Dustin J. Mitchell
49f6131a63 Bug 1280231: refactor task kinds to task classes; r=jonasfj
MozReview-Commit-ID: 1cNukxBgfey

--HG--
extra : rebase_source : 4f0fcce2bcea0fb78ba70e7c052638ca2c5b8a3d
extra : intermediate-source : ba5cbf4e06a550993e5216f816dcf0ccd3938b2e
extra : source : f744bd2fbcd3ae9b90851dcd12307c15d04f8bea
2016-06-27 22:57:44 +00:00