Bug 1365350: make uploader task a dependency of tests. r=dustin
For some reason, tests sometimes start before uploader task is finished,
we then make it a dependency to avoid the bug.
MozReview-Commit-ID: JlA471DUYPN
--- a/taskcluster/taskgraph/morph.py
+++ b/taskcluster/taskgraph/morph.py
@@ -185,29 +185,27 @@ def make_s3_uploader_task(parent_task):
dependencies = {}
task = Task(kind='misc', label=label, attributes={}, task=task_def,
dependencies=dependencies)
task.task_id = parent_task.task['payload']['properties']['upload_to_task_id']
return task
def update_test_tasks(taskid, build_taskid, taskgraph):
- """Tests task must download artifacts from uploader task.
-
- Notice they don't need to depend on uploader task because it finishes
- before the build task.
- """
+ """Tests task must download artifacts from uploader task."""
# Notice we handle buildbot-bridge, native, and generic-worker payloads
# We can do better here in terms of graph searching
# We could do post order search and stop as soon as we
# reach the build task. Not worring about it because this is
# (supposed to be) a temporary solution.
for task in taskgraph.tasks.itervalues():
if build_taskid in task.task.get('dependencies', []):
payload = task.task['payload']
+ task.task['dependencies'].append(taskid)
+ taskgraph.graph.edges.add((task.task_id, taskid, 'uploader'))
if 'command' in payload:
try:
payload['command'] = [
cmd.replace(build_taskid, taskid) for cmd in payload['command']
]
except AttributeError:
# generic-worker command attribute is an list of lists
payload['command'] = [