Bug 1471905: [taskgraph] Don't calculate docker context hashes if asked for a fast taskgraph; r=dustin
authorTom Prince <mozilla@hocat.ca>
Sat, 17 Nov 2018 03:41:06 +0000
changeset 504979 aa145dd45f48ccc1989e0265897fcc1e99074072
parent 504978 8953bab8246cf93cae049279a380a70f0de87264
child 504980 8c72e35255c51ce9a67d9767c5d68ed91f3afa1b
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1471905
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1471905: [taskgraph] Don't calculate docker context hashes if asked for a fast taskgraph; r=dustin Differential Revision: https://phabricator.services.mozilla.com/D12064
taskcluster/taskgraph/transforms/docker_image.py
--- a/taskcluster/taskgraph/transforms/docker_image.py
+++ b/taskcluster/taskgraph/transforms/docker_image.py
@@ -3,16 +3,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import os
 import re
 
 from collections import deque
+import taskgraph
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.transforms.task import _run_task_suffix
 from .. import GECKO
 from taskgraph.util.docker import (
     generate_context_hash,
 )
 from taskgraph.util.cached_tasks import add_optimization
 from taskgraph.util.schema import (
@@ -107,19 +108,22 @@ def fill_template(config, tasks):
         # task-reference value, see further below). We add the package routes
         # containing a hash to get the overall docker image hash, so changes
         # to packages will be reflected in the docker image hash.
         args['DOCKER_IMAGE_PACKAGES'] = ' '.join('<{}>'.format(p)
                                                  for p in packages)
         if parent:
             args['DOCKER_IMAGE_PARENT'] = '{}:{}'.format(parent, context_hashes[parent])
 
-        context_path = os.path.join('taskcluster', 'docker', definition)
-        context_hash = generate_context_hash(
-            GECKO, context_path, image_name, args)
+        if not taskgraph.fast:
+            context_path = os.path.join('taskcluster', 'docker', definition)
+            context_hash = generate_context_hash(
+                GECKO, context_path, image_name, args)
+        else:
+            context_hash = '0'*40
         digest_data = [context_hash]
         context_hashes[image_name] = context_hash
 
         if parent:
             digest_data += [image_digests[parent]]
 
         description = 'Build the docker image {} for use by dependent tasks'.format(
             image_name)