Bug 1410512 - Include release history on nightly builds. r=darktrojan
authorRob Lemley <rob@thunderbird.net>
Tue, 04 Feb 2020 14:09:30 -0500
changeset 37209 010e3872fa134f50cde10c951741e8a5e6fed842
parent 37208 fbdc28c1011c17b2ac6791e1b536cf24ceb984b8
child 37210 b7cf1a257c23df9eeeb720694215b7bbcc30886c
push id2552
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:24:16 +0000
treeherdercomm-beta@f95a6f4408a3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Bug 1410512 - Include release history on nightly builds. r=darktrojan The decision task for nightly builds needs to query Balrog for a recent release history in order to set up the partial mar generation tasks.
--- a/taskcluster/ci/config.yml
+++ b/taskcluster/ci/config.yml
@@ -75,16 +75,17 @@ task-priority:
         'comm-esr68': 'very-high'
         'comm-beta': 'high'
         'comm-central': 'medium'
         'default': 'low'
     register: comm_taskgraph:register
+    decision-parameters: 'comm_taskgraph:get_decision_parameters'
             provisioner: 'comm-{level}'
             implementation: docker-worker
             os: linux
             worker-type: '{alias}'
--- a/taskcluster/comm_taskgraph/__init__.py
+++ b/taskcluster/comm_taskgraph/__init__.py
@@ -4,26 +4,41 @@
 from __future__ import absolute_import, print_function, unicode_literals
 import os
 import logging
 from importlib import import_module
 from taskgraph import GECKO
+from taskgraph.util.partials import populate_release_history
 logger = logging.getLogger(__name__)
 COMM = os.path.join(GECKO, 'comm')
+BALROG_PRODUCT = 'Thunderbird'
 def register(graph_config):
     Import all modules that are siblings of this one, triggering decorators in
     the process.
     logger.info("{} path registered".format(__name__))
 def _import_modules(modules):
     for module in modules:
         import_module(".{}".format(module), package=__name__)
+def get_decision_parameters(graph_config, parameters):
+    logger.info("{}.get_decision_parameters called".format(__name__))
+    # If the target method is nightly, we should build partials. This means
+    # knowing what has been released previously.
+    # An empty release_history is fine, it just means no partials will be built
+    project = parameters['project']
+    parameters.setdefault('release_history', dict())
+    if 'nightly' in parameters.get('target_tasks_method', ''):
+        parameters['release_history'] = populate_release_history(BALROG_PRODUCT, project)