Bug 1492639: Only run cron bouncer checks on mozilla-beta; r=sfraser,mtabara
authorTom Prince <mozilla@hocat.ca>
Thu, 18 Oct 2018 13:21:36 -0600
changeset 500697 2b175e8c52636117d0e635c4cf9d14d16fcefbea
parent 500696 214e786d1ca04c076de2d8f90086fcdbc151ee89
child 500698 cb2f928fff562ff38b66f474ab8acd628535d985
child 500717 9e9ca4e2ef17b85d0e49979049b227f3bd9915b1
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfraser, mtabara
bugs1492639
milestone64.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 1492639: Only run cron bouncer checks on mozilla-beta; r=sfraser,mtabara Differential Revision: https://phabricator.services.mozilla.com/D9137
taskcluster/ci/cron-bouncer-check/kind.yml
taskcluster/docs/attributes.rst
taskcluster/taskgraph/target_tasks.py
--- a/taskcluster/ci/cron-bouncer-check/kind.yml
+++ b/taskcluster/ci/cron-bouncer-check/kind.yml
@@ -7,38 +7,39 @@ loader: taskgraph.loader.transform:loade
 transforms:
     - taskgraph.transforms.bouncer_check:transforms
     - taskgraph.transforms.job:transforms
     - taskgraph.transforms.task:transforms
 
 job-defaults:
     name: bouncer-check
     description: bouncer check
-    run-on-projects: []  # to make sure this never runs as part of CI
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 1200
         docker-image: {in-tree: "update-verify"}
     run:
         using: run-task
         sparse-profile: mozharness
     attributes:
         build_platform: linux64
         build_type: opt
+        cron: true
     treeherder:
         symbol: Rel(ckbouncer)
         kind: test
         tier: 1
 
 jobs:
     firefox:
         shipping-product: firefox
         index:
             product: firefox
             job-name: firefox-bouncer-check
+        run-on-projects: [release]
         run:
             config:
                 by-project:
                     mozilla-beta:
                         - releases/bouncer_firefox_beta.py
                     mozilla-release:
                         - releases/bouncer_firefox_release.py
                     mozilla-esr60:
@@ -54,16 +55,17 @@ jobs:
                     mozilla-esr60: FIREFOX_ESR
                     default: LATEST_FIREFOX_DEVEL_VERSION
             products-url: https://product-details.mozilla.org/1.0/firefox_versions.json
         treeherder:
             platform: firefox-release/opt
 
     devedition:
         shipping-product: devedition
+        run-on-projects: [mozilla-beta]
         index:
             product: devedition
             job-name: devedition-bouncer-check
         run:
             config:
                 by-project:
                     mozilla-beta:
                         - releases/bouncer_firefox_devedition.py
--- a/taskcluster/docs/attributes.rst
+++ b/taskcluster/docs/attributes.rst
@@ -233,8 +233,13 @@ lot of places. To support private artifa
 overrideable per-task.
 
 enable-full-crashsymbols
 ========================
 In automation, full crashsymbol package generation is normally disabled.  For
 build kinds where the full crashsymbols should be enabled, set this attribute
 to True. The full symbol packages will then be generated and uploaded on
 release branches and on try.
+
+cron
+====
+Indicates that a task is meant to be run via cron tasks, and should not be run
+on push.
--- a/taskcluster/taskgraph/target_tasks.py
+++ b/taskcluster/taskgraph/target_tasks.py
@@ -23,16 +23,23 @@ 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')
 
 
+def filter_out_cron(task, parameters):
+    """
+    Filter out tasks that run via cron.
+    """
+    return not task.attributes.get('cron')
+
+
 def filter_for_project(task, parameters):
     """Filter tasks by project.  Optionally enable nightlies."""
     run_on_projects = set(task.attributes.get('run_on_projects', []))
     return match_run_on_projects(parameters['project'], run_on_projects)
 
 
 def filter_on_platforms(task, platforms):
     """Filter tasks on the given platform"""
@@ -86,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_for_project)
+        (filter_out_nightly, 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)
 
 
@@ -563,16 +570,18 @@ def target_tasks_file_update(full_task_g
     return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
 
 
 @_target_task('cron_bouncer_check')
 def target_tasks_bouncer_check(full_task_graph, parameters, graph_config):
     """Select the set of tasks required to perform bouncer version verification.
     """
     def filter(task):
+        if not filter_for_project(task, parameters):
+            return False
         # For now any task in the repo-update kind is ok
         return task.kind in ['cron-bouncer-check']
     return [l for l, t in full_task_graph.tasks.iteritems() if filter(t)]
 
 
 @_target_task('staging_release_builds')
 def target_tasks_staging_release(full_task_graph, parameters, graph_config):
     """