Bug 1529948: Switch default for actions from `task` to `hook`; r=Callek a=release
authorTom Prince <mozilla@hocat.ca>
Fri, 22 Feb 2019 18:05:02 +0000
changeset 516431 f3f3f82b2d8b
parent 516430 279b4aaefba2
child 516432 05166e768f3d
push id2005
push userasasaki@mozilla.com
push dateTue, 09 Apr 2019 20:24:11 +0000
treeherdermozilla-release@f3f3f82b2d8b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek, release
bugs1529948
milestone66.0.3
Bug 1529948: Switch default for actions from `task` to `hook`; r=Callek a=release Support for `kind='task'` is still around to support Thunderbird release promotion, which uses releaserunner3. Other actions shouldn't be using it. Differential Revision: https://phabricator.services.mozilla.com/D20842
taskcluster/taskgraph/actions/add_new_jobs.py
taskcluster/taskgraph/actions/add_talos.py
taskcluster/taskgraph/actions/backfill.py
taskcluster/taskgraph/actions/cancel.py
taskcluster/taskgraph/actions/cancel_all.py
taskcluster/taskgraph/actions/create_interactive.py
taskcluster/taskgraph/actions/gecko_profile.py
taskcluster/taskgraph/actions/purge_caches.py
taskcluster/taskgraph/actions/registry.py
taskcluster/taskgraph/actions/rerun.py
taskcluster/taskgraph/actions/retrigger.py
taskcluster/taskgraph/actions/retrigger_mochitest.py
taskcluster/taskgraph/actions/run_missing_tests.py
--- a/taskcluster/taskgraph/actions/add_new_jobs.py
+++ b/taskcluster/taskgraph/actions/add_new_jobs.py
@@ -13,17 +13,16 @@ from .util import (
     create_tasks,
     fetch_graph_and_labels,
 )
 
 
 @register_callback_action(
     name='add-new-jobs',
     title='Add new jobs',
-    kind='hook',
     generic=True,
     symbol='add-new',
     description="Add new jobs using task labels.",
     order=100,
     context=[],
     schema={
         'type': 'object',
         'properties': {
--- a/taskcluster/taskgraph/actions/add_talos.py
+++ b/taskcluster/taskgraph/actions/add_talos.py
@@ -12,17 +12,16 @@ from .registry import register_callback_
 from .util import create_tasks, fetch_graph_and_labels
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     name='run-all-talos',
     title='Run All Talos Tests',
-    kind='hook',
     generic=True,
     symbol='raT',
     description="Add all Talos tasks to a push.",
     order=150,
     context=[],
     schema={
         'type': 'object',
         'properties': {
--- a/taskcluster/taskgraph/actions/backfill.py
+++ b/taskcluster/taskgraph/actions/backfill.py
@@ -21,17 +21,16 @@ PUSHLOG_TMPL = '{}/json-pushes?version=2
 INDEX_TMPL = 'gecko.v2.{}.pushlog-id.{}.decision'
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     title='Backfill',
     name='backfill',
-    kind='hook',
     generic=True,
     symbol='Bk',
     description=('Take the label of the current task, '
                  'and trigger the task with that label '
                  'on previous pushes in the same project.'),
     order=200,
     context=[{}],  # This will be available for all tasks
     schema={
--- a/taskcluster/taskgraph/actions/cancel.py
+++ b/taskcluster/taskgraph/actions/cancel.py
@@ -9,17 +9,16 @@ from __future__ import absolute_import, 
 from taskgraph.util.taskcluster import cancel_task
 from .registry import register_callback_action
 
 
 @register_callback_action(
     title='Cancel Task',
     name='cancel',
     symbol='cx',
-    kind='hook',
     generic=True,
     description=(
         'Cancel the given task'
     ),
     order=350,
     context=[{}]
 )
 def cancel_action(parameters, graph_config, input, task_group_id, task_id, task):
--- a/taskcluster/taskgraph/actions/cancel_all.py
+++ b/taskcluster/taskgraph/actions/cancel_all.py
@@ -18,17 +18,16 @@ from taskgraph.util.taskcluster import (
 from .registry import register_callback_action
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     title='Cancel All',
     name='cancel-all',
-    kind='hook',
     generic=True,
     symbol='cAll',
     description=(
         'Cancel all running and pending tasks created by the decision task '
         'this action task is associated with.'
     ),
     order=400,
     context=[]
--- a/taskcluster/taskgraph/actions/create_interactive.py
+++ b/taskcluster/taskgraph/actions/create_interactive.py
@@ -71,17 +71,16 @@ def context(params):
     else:
         return [{'worker-implementation': 'docker-worker', 'kind': 'test'}]
 
 
 @register_callback_action(
     title='Create Interactive Task',
     name='create-interactive',
     symbol='create-inter',
-    kind='hook',
     generic=True,
     description=(
         'Create a a copy of the task that you can interact with'
     ),
     order=50,
     context=context,
     schema={
         'type': 'object',
--- a/taskcluster/taskgraph/actions/gecko_profile.py
+++ b/taskcluster/taskgraph/actions/gecko_profile.py
@@ -20,17 +20,16 @@ PUSHLOG_TMPL = '{}/json-pushes?version=2
 INDEX_TMPL = 'gecko.v2.{}.pushlog-id.{}.decision'
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     title='GeckoProfile',
     name='geckoprofile',
-    kind='hook',
     generic=True,
     symbol='Gp',
     description=('Take the label of the current task, '
                  'and trigger the task with that label '
                  'on previous pushes in the same project '
                  'while adding the --geckoProfile cmd arg.'),
     order=200,
     context=[{'test-type': 'talos'}, {'test-type': 'raptor'}],
--- a/taskcluster/taskgraph/actions/purge_caches.py
+++ b/taskcluster/taskgraph/actions/purge_caches.py
@@ -13,17 +13,16 @@ from .registry import register_callback_
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     title='Purge Worker Caches',
     name='purge-cache',
     symbol='purge-cache',
-    kind='hook',
     generic=True,
     description=(
         'Purge any caches associated with this task '
         'across all workers of the same workertype as the task.'
     ),
     order=450,
     context=[{'worker-implementation': 'docker-worker'}]
 )
--- a/taskcluster/taskgraph/actions/registry.py
+++ b/taskcluster/taskgraph/actions/registry.py
@@ -47,17 +47,17 @@ def hash_taskcluster_yml(filename):
     of the sha256 of the file's content, and is used by administrative scripts
     to create a hook based on this content.
     '''
     return hash.hash_path(filename)[:10]
 
 
 def register_callback_action(name, title, symbol, description, order=10000,
                              context=[], available=lambda parameters: True,
-                             schema=None, kind='task', generic=True, cb_name=None):
+                             schema=None, kind='hook', generic=True, cb_name=None):
     """
     Register an action callback that can be triggered from supporting
     user interfaces, such as Treeherder.
 
     This function is to be used as a decorator for a callback that takes
     parameters as follows:
 
     ``parameters``:
--- a/taskcluster/taskgraph/actions/rerun.py
+++ b/taskcluster/taskgraph/actions/rerun.py
@@ -19,17 +19,16 @@ from .util import fetch_graph_and_labels
 logger = logging.getLogger(__name__)
 
 RERUN_STATES = ('exception', 'failed')
 
 
 @register_callback_action(
     title='Rerun',
     name='rerun',
-    kind='hook',
     generic=True,
     symbol='rr',
     description=(
         'Rerun a task.\n\n'
         'This only works on failed or exception tasks in the original taskgraph,'
         ' and is CoT friendly.'
     ),
     order=300,
--- a/taskcluster/taskgraph/actions/retrigger.py
+++ b/taskcluster/taskgraph/actions/retrigger.py
@@ -21,17 +21,16 @@ from .registry import register_callback_
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     title='Retrigger',
     name='retrigger',
     symbol='rt',
-    kind='hook',
     cb_name='retrigger-decision',
     description=textwrap.dedent('''\
         Create a clone of the task (retriggering decision, action, and cron tasks requires
         special scopes).'''),
     order=11,
     context=[
         {'kind': 'decision-task'},
         {'kind': 'action-callback'},
@@ -48,17 +47,16 @@ def retrigger_decision_action(parameters
     task = relativize_datestamps(task)
     create_task_from_def(slugid(), task, parameters['level'])
 
 
 @register_callback_action(
     title='Retrigger',
     name='retrigger',
     symbol='rt',
-    kind='hook',
     generic=True,
     description=(
         'Create a clone of the task.'
     ),
     order=19,  # must be greater than other orders in this file, as this is the fallback version
     context=[{}],
     schema={
         'type': 'object',
--- a/taskcluster/taskgraph/actions/retrigger_mochitest.py
+++ b/taskcluster/taskgraph/actions/retrigger_mochitest.py
@@ -19,17 +19,16 @@ from .registry import register_callback_
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     name='retrigger-mochitest',
     title='Retrigger Mochitest/Reftest with Debugging',
     symbol='rt',
-    kind='hook',
     generic=True,
     description="Retriggers the specified mochitest/reftest job with additional options",
     context=[{'test-type': 'mochitest'},
              {'test-type': 'reftest'}],
     order=10,
     schema={
         'type': 'object',
         'properties': {
--- a/taskcluster/taskgraph/actions/run_missing_tests.py
+++ b/taskcluster/taskgraph/actions/run_missing_tests.py
@@ -13,17 +13,16 @@ from .util import create_tasks, fetch_gr
 from taskgraph.util.taskcluster import get_artifact
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
     name='run-missing-tests',
     title='Run Missing Tests',
-    kind='hook',
     generic=True,
     symbol='rmt',
     description=(
         "Run tests in the selected push that were optimized away, usually by SETA."
         "\n"
         "This action is for use on pushes that will be merged into another branch,"
         "to check that optimization hasn't hidden any failures."
     ),