Bug 1469610: [releaserunner3] Pass the decision task id as `taskGroupId` to actions; r=aki
authorTom Prince <mozilla@hocat.ca>
Tue, 26 Jun 2018 19:02:35 +0000
changeset 8431 5fba3faa8f74
parent 8430 42b7018cb0d7
child 8432 61c5335d64e2
push id6156
push usermozilla@hocat.ca
push dateTue, 26 Jun 2018 19:03:19 +0000
Bug 1469610: [releaserunner3] Pass the decision task id as `taskGroupId` to actions; r=aki This is what what the specification[1] for actions indicates should be passed. The comment about `ACTION_TASK_GROUP_ID` was incorrect, as the release promotion action always used the task id of the action task for the new group, and ignored that environment variable. [1] https://docs.taskcluster.net/docs/manual/using/actions/spec#json-e-context Differential Revision: https://phabricator.services.mozilla.com/D1709
--- a/lib/python/kickoff/actions.py
+++ b/lib/python/kickoff/actions.py
@@ -39,21 +39,19 @@ def generate_action_task(decision_task_i
     relpro = find_action("release-promotion", actions)
     context = copy.deepcopy(actions["variables"])  # parameters
     action_task_id = slugid.nice()
         "input": action_task_input,
         "ownTaskId": action_task_id,
         "taskId": None,
         "task": None,
-        "taskGroupId": action_task_id,
+        "taskGroupId": decision_task_id,
     action_task = jsone.render(relpro["task"], context)
-    # override ACTION_TASK_GROUP_ID, so we know the new ID in advance
-    action_task["payload"]["env"]["ACTION_TASK_GROUP_ID"] = action_task_id
     return action_task_id, action_task
 def submit_action_task(queue, action_task_id, action_task):
     result = queue.createTask(action_task_id, action_task)
     log.info("Submitted action task %s", action_task_id)
     log.info("Action task:\n%s", json.dumps(action_task, sort_keys=True, indent=2))
     log.info("Result:\n%s", result)