Bug 1415868 - fix test-action-callback after rev e2931d904975, r?dustin draft
authorNick Thomas <nthomas@mozilla.com>
Thu, 21 Jun 2018 16:15:46 +1200
changeset 808976 b48776a2572544ac9ce56b3dcd25bc11a7dc835c
parent 808974 b37931e5b0101134ee1aaeb452cb8926be1cc46c
push id113537
push usernthomas@mozilla.com
push dateThu, 21 Jun 2018 04:50:28 +0000
reviewersdustin
bugs1415868
milestone62.0
Bug 1415868 - fix test-action-callback after rev e2931d904975, r?dustin MozReview-Commit-ID: LlUQHanvVng
taskcluster/mach_commands.py
--- a/taskcluster/mach_commands.py
+++ b/taskcluster/mach_commands.py
@@ -260,19 +260,16 @@ class MachCommands(MachCommandBase):
                      help='parameters file (.yml or .json; see '
                           '`taskcluster/docs/parameters.rst`)`')
     @CommandArgument('--task-id', default=None,
                      help='TaskId to which the action applies')
     @CommandArgument('--task-group-id', default=None,
                      help='TaskGroupId to which the action applies')
     @CommandArgument('--input', default=None,
                      help='Action input (.yml or .json)')
-    @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 taskgraph.actions
         import yaml
 
@@ -283,37 +280,30 @@ class MachCommands(MachCommandBase):
                 elif filename.endswith('.json'):
                     return json.load(f)
                 else:
                     raise Exception("unknown filename {}".format(filename))
 
         try:
             self.setup_logging()
             task_id = options['task_id']
-            if options['task']:
-                task = load_data(options['task'])
-            elif task_id:
-                task = get_task_definition(task_id)
-            else:
-                task = None
 
             if options['input']:
                 input = load_data(options['input'])
             else:
                 input = None
 
             parameters = taskgraph.parameters.load_parameters_file(options['parameters'])
             parameters.check()
 
             root = options['root']
 
             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,
                     root=root,
                     test=True)
         except Exception:
             traceback.print_exc()
             sys.exit(1)