Backed out 3 changesets (bug 1385151, bug 1385097, bug 1384729) because more needed to be backed out
authorWes Kocher <wkocher@mozilla.com>
Fri, 28 Jul 2017 11:41:36 -0700
changeset 420394 c9091294f5af17a1468326f7ea03080570cd2243
parent 420393 078c33d6232712265e5f5361782142e4b5aa1479
child 420395 4569b855f3dd0682a449eb6d6ebf456188242d27
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1385151, 1385097, 1384729
milestone56.0a1
backs out078c33d6232712265e5f5361782142e4b5aa1479
499ff142be61dca9bcdb69ce7d071de5d8ae4ad8
c0e98ba118f16aee0d7101bd9a3ddb9945031b58
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
Backed out 3 changesets (bug 1385151, bug 1385097, bug 1384729) because more needed to be backed out Backed out changeset 078c33d62327 (bug 1384729) Backed out changeset 499ff142be61 (bug 1385097) Backed out changeset c0e98ba118f1 (bug 1385151) MozReview-Commit-ID: 5kOPUORK6hO
taskcluster/actions/__init__.py
taskcluster/actions/add-new-jobs.py
taskcluster/actions/hello-action.py
taskcluster/actions/registry.py
taskcluster/actions/retrigger.py
taskcluster/actions/run_missing_tests.py
taskcluster/actions/test-retrigger-action.py
taskcluster/actions/util.py
taskcluster/mach_commands.py
taskcluster/taskgraph/actions/__init__.py
taskcluster/taskgraph/actions/add-new-jobs.py
taskcluster/taskgraph/actions/registry.py
taskcluster/taskgraph/actions/retrigger.py
taskcluster/taskgraph/actions/run_missing_tests.py
taskcluster/taskgraph/actions/test-retrigger-action.py
taskcluster/taskgraph/actions/util.py
taskcluster/taskgraph/decision.py
deleted file mode 100644
--- a/taskcluster/actions/hello-action.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-from __future__ import absolute_import, print_function, unicode_literals
-
-from .registry import register_callback_action
-
-
-@register_callback_action(
-    name='hello',
-    title='Say Hello',
-    symbol='hw',
-    description="""
-    Simple **proof-of-concept** action that prints a hello action.
-    """,
-    order=10000,  # Put this at the very bottom/end of any menu (default)
-    context=[{}],  # Applies to any task
-    available=lambda parameters: True,  # available regardless decision parameters (default)
-    schema={
-        'type': 'string',
-        'maxLength': 255,
-        'default': 'World',
-        'title': 'Target Name',
-        'description': """
-A name wish to say hello to...
-This should normally be **your name**.
-
-But you can also use the default value `'World'`.
-        """.strip(),
-    },
-)
-def hello_world_action(parameters, input, task_group_id, task_id, task):
-    print("This message was triggered from context-menu of taskId: {}".format(task_id))
-    print("")
-    print("Hello {}".format(input))
-    print("--- Action is now executed")
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -289,28 +289,28 @@ class MachCommands(MachCommandBase):
             return taskgraph.action.add_talos(options['decision_task_id'], options['times'])
         except Exception:
             traceback.print_exc()
             sys.exit(1)
 
     @SubCommand('taskgraph', 'action-callback',
                 description='Run action callback used by action tasks')
     def action_callback(self, **options):
-        import actions
+        import taskgraph.actions
         try:
             self.setup_logging()
 
             task_group_id = os.environ.get('ACTION_TASK_GROUP_ID', None)
             task_id = json.loads(os.environ.get('ACTION_TASK_ID', 'null'))
             task = json.loads(os.environ.get('ACTION_TASK', 'null'))
             input = json.loads(os.environ.get('ACTION_INPUT', 'null'))
             callback = os.environ.get('ACTION_CALLBACK', None)
             parameters = json.loads(os.environ.get('ACTION_PARAMETERS', '{}'))
 
-            return actions.trigger_action_callback(
+            return taskgraph.actions.trigger_action_callback(
                     task_group_id=task_group_id,
                     task_id=task_id,
                     task=task,
                     input=input,
                     callback=callback,
                     parameters=parameters,
                     test=False)
         except Exception:
@@ -331,17 +331,17 @@ class MachCommands(MachCommandBase):
     @CommandArgument('--task', default=None,
                      help='Task definition (.yml or .json; if omitted, the task will be'
                           'fetched from the queue)')
     @CommandArgument('callback', default=None,
                      help='Action callback name (Python function name)')
     def test_action_callback(self, **options):
         import taskgraph.parameters
         from taskgraph.util.taskcluster import get_task_definition
-        import actions
+        import taskgraph.actions
         import yaml
 
         def load_data(filename):
             with open(filename) as f:
                 if filename.endswith('.yml'):
                     return yaml.safe_load(f)
                 elif filename.endswith('.json'):
                     return json.load(f)
@@ -361,17 +361,17 @@ class MachCommands(MachCommandBase):
             if options['input']:
                 input = load_data(options['input'])
             else:
                 input = None
 
             parameters = taskgraph.parameters.load_parameters_file(options['parameters'])
             parameters.check()
 
-            return actions.trigger_action_callback(
+            return taskgraph.actions.trigger_action_callback(
                     task_group_id=options['task_group_id'],
                     task_id=task_id,
                     task=task,
                     input=input,
                     callback=options['callback'],
                     parameters=parameters,
                     test=True)
         except Exception:
rename from taskcluster/actions/__init__.py
rename to taskcluster/taskgraph/actions/__init__.py
rename from taskcluster/actions/add-new-jobs.py
rename to taskcluster/taskgraph/actions/add-new-jobs.py
--- a/taskcluster/actions/add-new-jobs.py
+++ b/taskcluster/taskgraph/actions/add-new-jobs.py
@@ -1,12 +1,20 @@
+# -*- coding: utf-8 -*-
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
 from .registry import register_callback_action
 from slugid import nice as slugid
 
-from actions.util import create_task
+from .util import (create_task, find_decision_task)
 from taskgraph.util.taskcluster import get_artifact
 from taskgraph.util.parameterization import resolve_task_references
 from taskgraph.taskgraph import TaskGraph
 
 
 @register_callback_action(
     name='add-new-jobs',
     title='Add new jobs',
@@ -23,19 +31,21 @@ from taskgraph.taskgraph import TaskGrap
                 'items': {
                     'type': 'string'
                 }
             }
         }
     }
 )
 def add_new_jobs_action(parameters, input, task_group_id, task_id, task):
-    full_task_graph = get_artifact(task_id, "public/full-task-graph.json")
+    decision_task_id = find_decision_task(parameters)
+
+    full_task_graph = get_artifact(decision_task_id, "public/full-task-graph.json")
     _, full_task_graph = TaskGraph.from_json(full_task_graph)
-    label_to_taskid = get_artifact(task_id, "public/label-to-taskid.json")
+    label_to_taskid = get_artifact(decision_task_id, "public/label-to-taskid.json")
 
     for elem in input['tasks']:
         if elem in full_task_graph.tasks:
             task = full_task_graph.tasks[elem]
 
             # fix up the task's dependencies, similar to how optimization would
             # have done in the decision
             dependencies = {name: label_to_taskid[label]
rename from taskcluster/actions/registry.py
rename to taskcluster/taskgraph/actions/registry.py
--- a/taskcluster/actions/registry.py
+++ b/taskcluster/taskgraph/actions/registry.py
@@ -10,17 +10,17 @@ import json
 import os
 import inspect
 import re
 from mozbuild.util import memoize
 from types import FunctionType
 from collections import namedtuple
 from taskgraph.util.docker import docker_image
 from taskgraph.parameters import Parameters
-from actions import util
+from . import util
 
 
 GECKO = os.path.realpath(os.path.join(__file__, '..', '..', '..'))
 
 actions = []
 callbacks = {}
 
 Action = namedtuple('Action', [
@@ -314,18 +314,18 @@ def trigger_action_callback(task_group_i
     cb(Parameters(**parameters), input, task_group_id, task_id, task)
 
 
 @memoize
 def _load():
     # Load all modules from this folder, relying on the side-effects of register_
     # functions to populate the action registry.
     for f in os.listdir(os.path.dirname(__file__)):
-        if f.endswith('.py') and f not in ('__init__.py', 'registry.py'):
-            __import__('actions.' + f[:-3])
+        if f.endswith('.py') and f not in ('__init__.py', 'registry.py', 'util.py'):
+            __import__('taskgraph.actions.' + f[:-3])
     return callbacks, actions
 
 
 def get_callbacks():
     return _load()[0]
 
 
 def get_actions():
rename from taskcluster/actions/retrigger.py
rename to taskcluster/taskgraph/actions/retrigger.py
--- a/taskcluster/actions/retrigger.py
+++ b/taskcluster/taskgraph/actions/retrigger.py
@@ -1,9 +1,17 @@
-from registry import register_task_action
+# -*- coding: utf-8 -*-
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+from .registry import register_task_action
 
 
 @register_task_action(
     title='Retrigger',
     name='retrigger',
     description='Create a clone of the task',
     order=1,
     context=[{}],
rename from taskcluster/actions/run_missing_tests.py
rename to taskcluster/taskgraph/actions/run_missing_tests.py
--- a/taskcluster/actions/run_missing_tests.py
+++ b/taskcluster/taskgraph/actions/run_missing_tests.py
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import logging
 from slugid import nice as slugid
 
 from .registry import register_callback_action
-from actions.util import create_task, find_decision_task
+from .util import create_task, find_decision_task
 from taskgraph.util.taskcluster import get_artifact
 from taskgraph.util.parameterization import resolve_task_references
 from taskgraph.taskgraph import TaskGraph
 
 logger = logging.getLogger(__name__)
 
 
 @register_callback_action(
rename from taskcluster/actions/test-retrigger-action.py
rename to taskcluster/taskgraph/actions/test-retrigger-action.py
--- a/taskcluster/actions/test-retrigger-action.py
+++ b/taskcluster/taskgraph/actions/test-retrigger-action.py
@@ -1,8 +1,16 @@
+# -*- coding: utf-8 -*-
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
 import copy
 import json
 import logging
 
 import requests
 from slugid import nice as slugid
 
 from .registry import register_callback_action
rename from taskcluster/actions/util.py
rename to taskcluster/taskgraph/actions/util.py
--- a/taskcluster/actions/util.py
+++ b/taskcluster/taskgraph/actions/util.py
@@ -1,8 +1,10 @@
+# -*- coding: utf-8 -*-
+
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from __future__ import absolute_import, print_function, unicode_literals
 
 import json
 import sys
--- a/taskcluster/taskgraph/decision.py
+++ b/taskcluster/taskgraph/decision.py
@@ -12,17 +12,17 @@ import re
 
 import time
 import yaml
 
 from .generator import TaskGraphGenerator
 from .create import create_tasks
 from .parameters import Parameters
 from .taskgraph import TaskGraph
-from actions import render_actions_json
+from .actions import render_actions_json
 from . import GECKO
 
 from taskgraph.util.templates import Templates
 from taskgraph.util.time import (
     json_time_from_now,
     current_json_time,
 )