allow for a new revision in trigger_action.py

RESOLVED FIXED

Status

enhancement
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: aki, Assigned: aki)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

a year ago
Right now, trigger_action.py gets `head_rev` from the previous action task, which is generally what we want. However, when we land a push or ship fix on a new revision, we want to get `head_rev` from the decision task we specify.

So:

- add --decision-task-id to be able to specify the decision task id
- if it's specified, get the parameters.yml from the decision task, so we use its `head_rev`
- if not, get the decision task info + parameters.yml from the action task
- either way, if the `decision_task_id` isn't in the `previous_graph_ids`, prepend it.

This needs testing.
(Assignee)

Updated

a year ago
Blocks: 1397773
(Assignee)

Updated

a year ago
Attachment #8937521 - Flags: review?(rail)
Comment on attachment 8937521 [details] [diff] [review]
trigger_decision_id.diff

Review of attachment 8937521 [details] [diff] [review]:
-----------------------------------------------------------------

::: buildfarm/release/trigger_action.py
@@ +7,5 @@
>  import copy
> +from urllib import unquote
> +import requests
> +from requests.adapters import HTTPAdapter
> +from requests.packages.urllib3.util.retry import Retry

TIL! :)
Attachment #8937521 - Flags: review?(rail) → review+
(Assignee)

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
I had to land a bustage fix for this because it broke trigger_action.py when no previous graph ids are specified on the command line: https://hg.mozilla.org/build/tools/rev/1cbc9891a6d38de1c12df7ce38beefd0f4be4b5b
On IRC, aki told me that ordering is important here - so we shouldn't use sets. This should be equivalent, but maintains ordering.
Attachment #8938066 - Flags: review?(rail)
Comment on attachment 8938066 [details] [diff] [review]
non-set version of bustage fix

Review of attachment 8938066 [details] [diff] [review]:
-----------------------------------------------------------------

::: buildfarm/release/trigger_action.py
@@ +114,4 @@
>      if args.previous_graph_ids:
> +        previous_graph_ids.extend(args.previous_graph_ids.split(','))
> +    if decision_task_id not in previous_graph_ids:
> +        previous_graph_ids.append(decision_task_id)

IIRC the order of the task ids is important (in-tree scheduling logic uses it to find the corresponding tasks) and this patch changes it.

r+ with the following change:

previous_graph_ids.insert(0, decision_task_id)
Attachment #8938066 - Flags: review?(rail) → review+
Comment on attachment 8938066 [details] [diff] [review]
non-set version of bustage fix

Landed, and updated releaserunner3
Attachment #8938066 - Flags: checked-in+
You need to log in before you can comment on or make changes to this bug.