Commit Graph

47 Commits

Author SHA1 Message Date
Tom Prince
13af5de7ea Bug 1507360: Fix python3.5 support in fetching hg fingerprints; r=gps
Differential Revision: https://phabricator.services.mozilla.com/D13810

--HG--
extra : moz-landing-system : lando
2018-12-05 16:00:20 +00:00
Tom Prince
84412f33c4 Bug 1507360: Fetch HG fingerprint; r=gps
Differential Revision: https://phabricator.services.mozilla.com/D11966

--HG--
extra : moz-landing-system : lando
2018-12-05 16:19:22 +00:00
Ciure Andrei
6918b83537 Backed out changeset 38acabd3b5b8 (bug 1507360) for causing tasks that run in docker to fail CLOSED TREE 2018-12-05 04:39:31 +02:00
Tom Prince
e0beb89f1f Bug 1507360: Fetch HG fingerprint; r=gps
Differential Revision: https://phabricator.services.mozilla.com/D11966

--HG--
extra : moz-landing-system : lando
2018-11-15 17:12:08 +00:00
Gregory Szorc
d9345822b6 Bug 1497660 - Add new hg.mo fingerprint to run-task fallback; r=dustin
We duplicate the hg.mo fingerprints in run-task so we can fall
back to known good values in case secrets retrieval fails.

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

--HG--
extra : rebase_source : dd351633400d110fdc35c580ca4b9b907cda6db8
extra : intermediate-source : ce441b8a784c3c08fc575f5ff1632a303a244fa3
extra : source : fe2744d3413d28aafe9334c1bac1081ca5702cbd
2018-10-31 14:15:30 -07:00
Andreea Pavel
e3299fd2db 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
Andrew Halberstadt
1d4d313462 Bug 1436037 - [taskgraph] Support Windows generic-worker with run-task, r=gps
This enables Windows generic-worker based tasks to use the run-task script.

MozReview-Commit-ID: C07FANaYzf7

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

--HG--
extra : moz-landing-system : lando
2018-11-15 00:47:32 +00:00
Gregory Szorc
cbfc32534a Bug 1497660 - Add new hg.mo fingerprint to run-task fallback; r=dustin
We duplicate the hg.mo fingerprints in run-task so we can fall
back to known good values in case secrets retrieval fails.

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

--HG--
extra : source : fe2744d3413d28aafe9334c1bac1081ca5702cbd
extra : intermediate-source : 6fc2aad03a346ba27b63dff77e59e139a58889fc
2018-10-31 14:15:30 -07:00
shindli
6c83e0b3b0 Backed out changeset 6fc2aad03a34 (bug 1497660) for perma mochitest mda failures with failed: NotAllowedError: The request is not allowed by the user agent or the platform in the current context message CLOSED TREE 2018-11-01 04:11:10 +02:00
Gregory Szorc
1d3c3ee332 Bug 1497660 - Add new hg.mo fingerprint to run-task fallback; r=dustin
We duplicate the hg.mo fingerprints in run-task so we can fall
back to known good values in case secrets retrieval fails.

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

--HG--
extra : source : fe2744d3413d28aafe9334c1bac1081ca5702cbd
extra : amend_source : 5a3820ce0ebf3848c7eaa46fa6cb6a662be48c50
2018-10-31 14:15:30 -07:00
Ciure Andrei
e3bd3cf1ab Backed out changeset fe2744d3413d (bug 1497660) for docker build bustages CLOSED TREE 2018-10-30 20:37:40 +02:00
Gregory Szorc
c794241681 Bug 1497660 - Add new hg.mo fingerprint to run-task fallback; r=dustin
We duplicate the hg.mo fingerprints in run-task so we can fall
back to known good values in case secrets retrieval fails.

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

--HG--
extra : moz-landing-system : lando
2018-10-29 21:13:32 +00:00
Tom Prince
43c8cdcaae Bug 1484012: [fetch-content] Pass MOZ_FETCHES as json; r=gps,ahal
Rather than trying to parse strings, just pass a json blob. This will allow us
to easily do things like mark artifacts to be left unextracted.

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

--HG--
extra : rebase_source : 4e762c65d1c9f13361d5bae2e4608ba09bb39a91
2018-08-17 10:37:21 -06:00
Andrew Halberstadt
321a8788f2 Bug 1484790 - [fetches] Overwrite without prompting when unzipping an artifact with fetch-content, r=gps
This also moves the call to 'fetch_artifacts' in run-task down inside the
try/finally block. This way if something goes wrong, we'll still cleanup
MOZ_FETCHES_DIR.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 16:04:59 +00:00
Andrew Halberstadt
15c53b6d46 Bug 1468812 - [ci] Support MOZ_FETCHES and fetch-content in run-task r=gps
This removes the 'use-artifacts' mechanism in favour of fetches. There are a
few pieces here that need to land atomically:

1. Remove use-artifact related code
2. Call 'fetch-content' from the run-task script
3. Convert existing tasks on top of fetches (jsshell, python unittest)
4. Stop calling 'fetch-content' from toolchain setup tasks (as this now gets handled in run-task)

Depends on D2166.

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

--HG--
extra : moz-landing-system : lando
2018-07-26 17:13:39 +00:00
Sebastian Hengst
943a6cf31a Backed out changeset 61f33f8c8750 (bug 1468812) for Linux ccov mass failures (bug 1478211). a=backout 2018-07-25 18:05:09 +03:00
Andrew Halberstadt
a3174ac509 Bug 1468812 - [ci] Support MOZ_FETCHES and fetch-content in run-task r=gps
This removes the 'use-artifacts' mechanism in favour of fetches. There are a
few pieces here that need to land atomically:

1. Remove use-artifact related code
2. Call 'fetch-content' from the run-task script
3. Convert existing tasks on top of fetches (jsshell, python unittest)
4. Stop calling 'fetch-content' from toolchain setup tasks (as this now gets handled in run-task)

Depends on D2166.

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

--HG--
extra : moz-landing-system : lando
2018-07-24 13:11:25 +00:00
Andrew Halberstadt
cedce1ff81 Bug 1466660 - Remove use-artifact directory from run-task workers after task has finished r=jmaher
Right now artifacts from previous tasks are left lying around. We should clean these up
in case a task accidentally uses an artifact from the wrong dependency.

Ideally we'd cache these properly based on the taskId they came from, but that can be
follow-up fodder.

MozReview-Commit-ID: HUgvNlqyFav

--HG--
extra : rebase_source : fb9c6723598223619993c2695fb588ead3325edb
2018-06-04 16:36:28 -04:00
Andrew Halberstadt
8320b86def Bug 1465181 - [run-task] Remove requirement to run as root on POSIX systems, r=gps
There is a superficial check in the run-task script which requires root. Simply
removing this check allows a native-engine task (which isn't running as root)
to proceed.

MozReview-Commit-ID: 44XavXAwxxn

--HG--
extra : rebase_source : bd1f01ce1c2feb4029838e07314493d449a4f46e
2018-05-29 15:58:07 -04:00
Andrew Halberstadt
38e69c76b1 Bug 1465181 - [taskgraph] Stop hardcoding the workdir to /builds/worker in 'job' tasks, r=gps
This adds an optional 'workdir' key to all job schemas. It still defaults to
/builds/worker, but can be overriden by individual tasks or schema
implementations.

MozReview-Commit-ID: LY20xfBhbCP

--HG--
extra : rebase_source : 7ac76ebf55d33d30c2aad73484421c6b4002cd33
2018-05-29 16:05:35 -04:00
Andrew Halberstadt
dbbfae76db Bug 1461980 - [taskgraph] Add ability to download artifacts from dependencies in run-task script, r=dustin
This adds a 'use-artifacts' key to the run_task schema. Tasks can specify artifacts to download like this:

run:
    using: run-task
    use_artifacts:
        build:
            - target.tar.bz2
            - target.common.tests.zip
            - target.mochitest.tests.zip

This will cause the run-task script to download those three artifacts from the task's 'build' dependency.
If the task doesn't have a 'build' dependency, taskgraph generation will error. The artifacts will be
downloaded into $USE_ARTIFACT_PATH. It is up to the task to do whatever extracting/setup may be required.
E.g this setup could go in the task's command.

At this time, only 'run-task' tasks using docker-worker are supported.

MozReview-Commit-ID: 3f02oCys62i

--HG--
extra : rebase_source : e8a85040e45042b537d4119334c4a8b7280b295c
2018-05-17 10:04:23 -04:00
Gregory Szorc
fdb1c18e80 Bug 1460470 - Make run-task Python 3.5+ only; r=mshal
A try push converting run-task to Python 3 seemed to complete without
error.

Since it is annoying writing code that needs to work on both Python
2 and 3, let's require Python 3 and remove code for supporting Python 2.

We implement a version check enforcing Python 3.5+. This is because
we're supposed to be standardizing on 3.5+ everywhere. I want to
prevent accidental usage of older Python 3 versions.

MozReview-Commit-ID: 4vATLZ6Si2e

--HG--
extra : source : 94a9641c5a018cfe729ebe748e75a7c4373e4322
2018-05-11 10:19:53 -07:00
Gregory Szorc
d10cd93f47 Bug 1460470 - Change run-task to use Python 3 by default; r=mshal
Python 3 is the future.

MozReview-Commit-ID: APuu4Q3mimj

--HG--
extra : source : 33fe8423f88cb8158559bc736d89b4849b57d315
2018-05-09 17:26:40 -07:00
Gregory Szorc
f661f06851 Bug 1460470 - More run-task Python 3 porting; r=mshal
Mostly normalization of str and bytes. Python 3 is annoying for
systems level code where most things are bytes.

MozReview-Commit-ID: KpvZGegBkYn

--HG--
extra : source : 4902cab3ce5dab2d1756cf0cd5c95f40603c0a0e
2018-05-09 21:15:36 -07:00
Gregory Szorc
64d4b487a4 Bug 1460470 - Make run-task somewhat usable on Python 3; r=mshal
This required a lot of attention to bytes versus strings.

The hacks around handling process output are somewhat gross. Apparently
readline() doesn't work on bytes streams in Python 3?! So we install a
custom stream decoder so we can have nice things.

There are still some failures in run-task on Python 3. But we're a big
step closer.

MozReview-Commit-ID: 4FJlTn3q9Ai

--HG--
extra : source : 19fe5702cf6d018b743108b35e86d1750f205a76
2018-05-16 11:06:36 -07:00
Gregory Szorc
526949a0ad Bug 1460470 - Make run-task compile on Python 3; r=mshal
The file failed to compile due to octal syntax and missing imports.
After this change, we get a run-time error, which is strictly better.

MozReview-Commit-ID: nY9A13Pt3E

--HG--
extra : source : ef477a048b575958be74287a2273830813b385f1
2018-05-16 13:57:08 -07:00
Ciure Andrei
5c13bf1ff4 Backed out 5 changesets (bug 1460470) for toolchains bustages a=backout CLOSED TREE
Backed out changeset 94a9641c5a01 (bug 1460470)
Backed out changeset 33fe8423f88c (bug 1460470)
Backed out changeset 4902cab3ce5d (bug 1460470)
Backed out changeset 19fe5702cf6d (bug 1460470)
Backed out changeset ef477a048b57 (bug 1460470)
2018-05-17 01:04:29 +03:00
Gregory Szorc
0023204ad1 Bug 1460470 - Make run-task Python 3.5+ only; r=mshal
A try push converting run-task to Python 3 seemed to complete without
error.

Since it is annoying writing code that needs to work on both Python
2 and 3, let's require Python 3 and remove code for supporting Python 2.

We implement a version check enforcing Python 3.5+. This is because
we're supposed to be standardizing on 3.5+ everywhere. I want to
prevent accidental usage of older Python 3 versions.

MozReview-Commit-ID: 4vATLZ6Si2e

--HG--
extra : rebase_source : d1450979e636387a5fdbd80ba19a92ec4fd31088
extra : histedit_source : 62910e29cc2fff0a1db0e9521cc58b200406d393
2018-05-11 10:19:53 -07:00
Gregory Szorc
9b265e41ee Bug 1460470 - Change run-task to use Python 3 by default; r=mshal
Python 3 is the future.

MozReview-Commit-ID: APuu4Q3mimj

--HG--
extra : rebase_source : 79839dc7f3ec130e467f1d0aa268bf3912cc1c8f
extra : histedit_source : 4be41658b5debaa6165228f60f09a9d1bf53ddbb
2018-05-09 17:26:40 -07:00
Gregory Szorc
84b3320347 Bug 1460470 - More run-task Python 3 porting; r=mshal
Mostly normalization of str and bytes. Python 3 is annoying for
systems level code where most things are bytes.

MozReview-Commit-ID: KpvZGegBkYn

--HG--
extra : rebase_source : aa50a6cd1337fe604015131b053234a2db642e57
extra : histedit_source : 8481b23bde4f408a59c623b8be43ee0611492afd
2018-05-09 21:15:36 -07:00
Gregory Szorc
b300a4a11d Bug 1460470 - Make run-task somewhat usable on Python 3; r=mshal
This required a lot of attention to bytes versus strings.

The hacks around handling process output are somewhat gross. Apparently
readline() doesn't work on bytes streams in Python 3?! So we install a
custom stream decoder so we can have nice things.

There are still some failures in run-task on Python 3. But we're a big
step closer.

MozReview-Commit-ID: 4FJlTn3q9Ai

--HG--
extra : rebase_source : 1a45b158fb625c7fd86701736b16da8df122218d
extra : histedit_source : f66fb22e86caf9b6b3cb301bedeab0b709685ef3
2018-05-16 11:06:36 -07:00
Gregory Szorc
247b0d8be5 Bug 1460470 - Make run-task compile on Python 3; r=mshal
The file failed to compile due to octal syntax and missing imports.
After this change, we get a run-time error, which is strictly better.

MozReview-Commit-ID: nY9A13Pt3E

--HG--
extra : rebase_source : 074cbf7daaed820bd330b6850d28acd766b3801a
extra : histedit_source : e10c0a14f55148dd3e57a194d262ded41c038ee5
2018-05-16 13:57:08 -07:00
Ciure Andrei
e2adc25ccb Backed out 5 changesets (bug 1460470) for gps: image build failures a=backout CLOSED TREE
Backed out changeset 07a3e76abc8c (bug 1460470)
Backed out changeset 94c3b68ccc48 (bug 1460470)
Backed out changeset 88324086394e (bug 1460470)
Backed out changeset 16d15b4b97fa (bug 1460470)
Backed out changeset ebd569c9d870 (bug 1460470)
2018-05-16 22:29:17 +03:00
Gregory Szorc
b3529e86ca Bug 1460470 - Make run-task Python 3.5+ only; r=mshal
A try push converting run-task to Python 3 seemed to complete without
error.

Since it is annoying writing code that needs to work on both Python
2 and 3, let's require Python 3 and remove code for supporting Python 2.

We implement a version check enforcing Python 3.5+. This is because
we're supposed to be standardizing on 3.5+ everywhere. I want to
prevent accidental usage of older Python 3 versions.

MozReview-Commit-ID: 4vATLZ6Si2e

--HG--
extra : rebase_source : bbf3a0bd6cc881002d38c58eef64636c5efa6712
2018-05-11 10:19:53 -07:00
Gregory Szorc
abb76d95f9 Bug 1460470 - Change run-task to use Python 3 by default; r=mshal
Python 3 is the future.

MozReview-Commit-ID: APuu4Q3mimj

--HG--
extra : rebase_source : f204a712466f10149b35e125d9ceb181e0f420b7
2018-05-09 17:26:40 -07:00
Gregory Szorc
836b5bdad3 Bug 1460470 - More run-task Python 3 porting; r=mshal
Mostly normalization of str and bytes. Python 3 is annoying for
systems level code where most things are bytes.

MozReview-Commit-ID: KpvZGegBkYn

--HG--
extra : rebase_source : 6bda98911cf32ce1bc3d651805b473aff18bf1f9
2018-05-09 21:15:36 -07:00
Gregory Szorc
dd1809c1fd Bug 1460470 - Make run-task somewhat usable on Python 3; r=mshal
This required a lot of attention to bytes versus strings.

The hacks around handling process output are somewhat gross. Apparently
readline() doesn't work on bytes streams in Python 3?! So we install a
custom stream decoder so we can have nice things.

There are still some failures in run-task on Python 3. But we're a big
step closer.

MozReview-Commit-ID: 4FJlTn3q9Ai

--HG--
extra : rebase_source : 38d5626574d924c25e3fb4eecf29d379c2678e0d
2018-05-16 11:06:36 -07:00
Gregory Szorc
65a310206f Bug 1460470 - Make run-task compile on Python 3; r=mshal
The file failed to compile due to octal syntax and missing imports.
After this change, we get a run-time error, which is strictly better.

MozReview-Commit-ID: nY9A13Pt3E

--HG--
extra : rebase_source : b13d859ffaa2d10795312ff5a0f3ebbd5ca06835
2018-05-09 16:14:28 -07:00
Geoff Brown
bd4f5cfdbf Bug 1460411 - Add kvm to desktop1604-test image; r=jmaher
Our normal ubuntu 16.04 test image is suitable for hosting an Android x86
emulator with these minor updates: Install kvm and make sure /dev/kvm
rw permissions are open for everyone. Note that /dev/kvm is generally
only visible when running docker with --privileged; its permissions
cannot be modified in the Dockerfile, only at run-time: run-task is the
first opportunity.
2018-05-15 09:57:27 -06:00
Gregory Szorc
f1f60ea6e5 Bug 1459737 - Assert that volumes aren't used on Windows; r=dustin
Volumes are a docker-worker concept. They shouldn't be encountered on
Windows, which uses generic-worker.

MozReview-Commit-ID: KUdSxVHVJQ

--HG--
extra : rebase_source : ff54131d471ae2ae2465b11ca5ba6e787f5d11de
2018-05-04 18:02:54 -07:00
Gregory Szorc
d427f004f7 Bug 1459737 - Move volume configuration to standalone function; r=dustin
Do to volumes what we did to caches.

MozReview-Commit-ID: 7s4nYPC27nk

--HG--
extra : rebase_source : 8c71459a4854a9de0f74469eb3655d8293554cfd
2018-05-04 18:00:44 -07:00
Gregory Szorc
b21421f3de Bug 1459737 - Move cache configuration to standalone function; r=dustin
main() is quite long. And the control flow will become more complicated
as we support Windows.

Let's move the bulk of the cache configuration code into a standalone
function so main() is less cluttered.

MozReview-Commit-ID: xredCubr1E

--HG--
extra : rebase_source : 385fe6fe9e083cf585edc922b1fa26355d580c02
2018-05-04 17:54:07 -07:00
Gregory Szorc
389a573533 Bug 1459737 - Require to run on root on POSIX platforms; r=dustin
The code for cache and volume normalization makes assumptions that uid
and gid are defined. They are not defined if not running as root and
Python would crash in these code paths.

So, presumably this means that all tasks using run-task are running as
root. Let's codify that requirement.

This requirement is arbitrary. But let's not scope bloat run-task to
support scenarios until we need them.

MozReview-Commit-ID: 2uW4OSovzWi

--HG--
extra : rebase_source : 56ced8ecbd0eef3a55dc68413f4eab7601756cc0
2018-05-04 17:47:09 -07:00
Gregory Szorc
d4ef29a704 Bug 1459737 - Move closure to module-level function; r=dustin
MozReview-Commit-ID: 2Z2qL8LaEno

--HG--
extra : rebase_source : 84dbe9f1dce931e856c6aa84d305523034aa2ae9
2018-05-04 17:41:45 -07:00
Gregory Szorc
faf43ccbf6 Bug 1459737 - Teach run-task where to find Mercurial on Windows; r=dustin
Because we can't rely on it being in %PATH%.

MozReview-Commit-ID: H6sMdX7XO5Q

--HG--
extra : rebase_source : 7d97a0eae39e92ef95f6367ef673dd72359f516c
2018-05-04 17:33:19 -07:00
Gregory Szorc
69823158e7 Bug 1459737 - Make run-task more runnable on non-POSIX platforms; r=dustin
I want to make run-task work on Windows. The script is currently very
POSIX oriented, as it assumes the existence of the grp and pwd modules,
that user IDs are numeric, and that system calls like setresgid() and
setresuid() are available, etc.

This commit starts to make some of the POSIX-centric code conditional
on running on POSIX.

Code for uid/gid extraction has been moved to its own function. Some
error messages were tweaked slightly as part of the move. Otherwise,
the changes should be pretty straightforward.

There are still other parts of this file that won't work on e.g.
Windows. But this gets us a big step closer.

MozReview-Commit-ID: HNyytKcBbBo

--HG--
extra : rebase_source : 01d653c801865e36e562a8de4c9e6d6962498f19
2018-05-04 17:11:53 -07:00
Gregory Szorc
5d87fc997f Bug 1459737 - Move run-task into taskcluster/scripts; r=dustin
In preparation for making it usable on Windows, after which point
having it in a directory with "docker" in it doesn't make much sense.

MozReview-Commit-ID: Hgu0buFyJwF

--HG--
rename : taskcluster/docker/recipes/run-task => taskcluster/scripts/run-task
extra : rebase_source : 3c0b502d28b5aad54bd04069efbfda88e25bbb20
2018-05-04 17:23:31 -07:00