Bug 1501759: [taskgraph] Remove `include_nightly` parameter; r=aki
authorTom Prince <mozilla@hocat.ca>
Wed, 24 Oct 2018 20:44:03 +0000
changeset 491215 4a209d2b46acc350cc061751172ffd0ed3174836
parent 491214 097e18992eba03edc88a757380d81b807735a30d
child 491216 ff0a31d4ba06c0368009b701dbc9acfa67989690
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
Bug 1501759: [taskgraph] Remove `include_nightly` parameter; r=aki We only use `include_nigthly` where we are also using `filter_beta_release_tasks`, so just change the later to include nightly. Differential Revision: https://phabricator.services.mozilla.com/D9687
--- a/taskcluster/docs/parameters.rst
+++ b/taskcluster/docs/parameters.rst
@@ -35,19 +35,16 @@ Push Information
    The revision to check out; this can be a short revision string
    For Mercurial repositories, this is the same as ``head_rev``.  For
    git repositories, which do not allow pulling explicit revisions, this gives
    the symbolic ref containing ``head_rev`` that should be pulled from
-   Include nightly builds and tests in the graph.
    Email address indicating the person who made the push.  Note that this
    value may be forged and *must not* be relied on for authentication.
    The commit message
@@ -110,19 +107,16 @@ syntax or reading a project-specific con
     List of filter functions (from ``taskcluster/taskgraph/filter_tasks.py``) to
     apply. This is usually defined internally, as filters are typically
     The method to use to determine the target task set.  This is the suffix of
     one of the functions in ``taskcluster/taskgraph/target_tasks.py``.
-    If true, then nightly tasks are eligible for optimization.
    History of recent releases by platform and locale, used when generating
    partial updates for nightly releases.
    Suitable contents can be generated with ``mach release-history``,
    which will print to the console by default.
--- a/taskcluster/taskgraph/decision.py
+++ b/taskcluster/taskgraph/decision.py
@@ -26,102 +26,82 @@ logger = logging.getLogger(__name__)
 ARTIFACTS_DIR = 'artifacts'
 # For each project, this gives a set of parameters specific to the project.
 # See `taskcluster/docs/parameters.rst` for information on parameters.
     'try': {
         'target_tasks_method': 'try_tasks',
-        # By default, the `try_option_syntax` `target_task_method` ignores this
-        # parameter, and enables/disables nightlies depending whether
-        # `--include-nightly` is specified in the commit message.
-        # We're setting the `include_nightly` parameter to True here for when
-        # we submit decision tasks against Try that use other
-        # `target_task_method`s, like `nightly_fennec` or `mozilla_beta_tasks`,
-        # which reference the `include_nightly` parameter.
-        'include_nightly': True,
     'try-comm-central': {
         'target_tasks_method': 'try_tasks',
-        'include_nightly': True,
     'ash': {
         'target_tasks_method': 'ash_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': False,
     'cedar': {
         'target_tasks_method': 'cedar_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': False,
     'graphics': {
         'target_tasks_method': 'graphics_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': False,
     'mozilla-central': {
         'target_tasks_method': 'default',
         'optimize_target_tasks': True,
-        'include_nightly': False,
         'release_type': 'nightly',
     'mozilla-beta': {
         'target_tasks_method': 'mozilla_beta_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': True,
         'release_type': 'beta',
     'mozilla-release': {
         'target_tasks_method': 'mozilla_release_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': True,
         'release_type': 'release',
     'mozilla-esr60': {
         'target_tasks_method': 'mozilla_esr60_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': True,
         'release_type': 'esr60',
     'comm-beta': {
         'target_tasks_method': 'mozilla_beta_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': True,
         'release_type': 'beta',
     'comm-esr60': {
         'target_tasks_method': 'mozilla_esr60_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': True,
         'release_type': 'release',
     'pine': {
         'target_tasks_method': 'pine_tasks',
         'optimize_target_tasks': True,
-        'include_nightly': False,
     # the default parameters are used for projects that do not match above.
     'default': {
         'target_tasks_method': 'default',
         'optimize_target_tasks': True,
-        'include_nightly': False,
 def full_task_graph_to_runnable_jobs(full_task_json):
     runnable_jobs = {}
     for label, node in full_task_json.iteritems():
         if not ('extra' in node['task'] and 'treeherder' in node['task']['extra']):
--- a/taskcluster/taskgraph/parameters.py
+++ b/taskcluster/taskgraph/parameters.py
@@ -54,17 +54,16 @@ PARAMETERS = {
     'build_date': lambda: int(time.time()),
     'build_number': 1,
     'do_not_optimize': [],
     'existing_tasks': {},
     'filters': ['check_servo', 'target_tasks_method'],
     'head_ref': get_head_ref,
     'head_repository': 'https://hg.mozilla.org/mozilla-central',
     'head_rev': get_head_ref,
-    'include_nightly': False,
     'level': '3',
     'message': '',
     'moz_build_date': lambda: datetime.now().strftime("%Y%m%d%H%M%S"),
     'next_version': None,
     'optimize_target_tasks': True,
     'owner': 'nobody@mozilla.com',
     'project': 'mozilla-central',
     'pushdate': lambda: int(time.time()),
--- a/taskcluster/taskgraph/target_tasks.py
+++ b/taskcluster/taskgraph/target_tasks.py
@@ -20,17 +20,17 @@ def _target_task(name):
 def get_method(method):
     """Get a target_task_method to pass to a TaskGraphGenerator."""
     return _target_task_methods[method]
 def filter_out_nightly(task, parameters):
-    return not task.attributes.get('nightly') or parameters.get('include_nightly')
+    return not task.attributes.get('nightly')
 def filter_out_cron(task, parameters):
     Filter out tasks that run via cron.
     return not task.attributes.get('cron')
@@ -93,17 +93,17 @@ def filter_beta_release_tasks(task, para
         return False
     return True
 def standard_filter(task, parameters):
     return all(
         filter_func(task, parameters) for filter_func in
-        (filter_out_nightly, filter_out_cron, filter_for_project)
+        (filter_out_cron, filter_for_project)
 def _try_task_config(full_task_graph, parameters, graph_config):
     requested_tasks = parameters['try_task_config']['tasks']
     return list(set(requested_tasks) & full_task_graph.graph.nodes)
@@ -173,17 +173,18 @@ def target_tasks_try(full_task_graph, pa
         return []
 def target_tasks_default(full_task_graph, parameters, graph_config):
     """Target the tasks which have indicated they should be run on this project
     via the `run_on_projects` attributes."""
     return [l for l, t in full_task_graph.tasks.iteritems()
-            if standard_filter(t, parameters)]
+            if standard_filter(t, parameters)
+            or filter_out_nightly(t, parameters)]
 def target_tasks_ash(full_task_graph, parameters, graph_config):
     """Target tasks that only run on the ash branch."""
     def filter(task):
         platform = task.attributes.get('build_platform')
         # Early return if platform is None
@@ -438,17 +439,17 @@ def target_tasks_pine(full_task_graph, p
         platform = task.attributes.get('build_platform')
         # disable mobile jobs
         if str(platform).startswith('android'):
             return False
         # disable asan
         if platform == 'linux64-asan':
             return False
         # disable non-pine and nightly tasks
-        if standard_filter(task, parameters):
+        if standard_filter(task, parameters) or filter_out_nightly(task, parameters):
             return True
     return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
 def target_tasks_nightly_fennec(full_task_graph, parameters, graph_config):
     """Select the set of tasks required for a nightly build of fennec. The
     nightly build process involves a pipeline of builds, signing,
--- a/tools/tryselect/selectors/release.py
+++ b/tools/tryselect/selectors/release.py
@@ -63,17 +63,16 @@ def run_try_release(
         raise Exception(
             "Can't do staging release for version: {} type: {}".format(
                 version, version.version_type))
     task_config = {
         'version': 2,
         'parameters': {
             'target_tasks_method': 'staging_release_builds',
             'optimize_target_tasks': True,
-            'include_nightly': True,
             'release_type': release_type,
     for migration in migrations:
         migration_path = os.path.join(