Closed Bug 1405740 Opened 2 years ago Closed 2 years ago

Port remaining mozilla-taskcluster actions to actions.json

Categories

(Firefox Build System :: Task Configuration, task)

task
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla58

People

(Reporter: bstack, Assigned: bstack)

References

Details

Attachments

(1 file)

This is going to be

1. writing a cancel_all task
2. wiring cancel_all and retrigger into the treeherder ui buttons that perform those actions currently.
Attachment #8915739 - Flags: review?(jopsen)
Duplicate of this bug: 1386315
Comment on attachment 8915739 [details]
Bug 1405740 - Add a cancel-all action task

https://reviewboard.mozilla.org/r/186942/#review192010

::: taskcluster/taskgraph/actions/cancel_all.py:47
(Diff revision 1)
> +def cancel_all_action(parameters, input, task_group_id, task_id, task):
> +    session = get_session()
> +    own_task_id = os.environ.get('TASK_ID', '')
> +    for task in list_group(task_group_id, session):
> +        if task != own_task_id:
> +            cancel_task(task, use_proxy=True)

To make this fast I would suggest adding some concurrency like in:
https://dxr.mozilla.org/mozilla-central/rev/c97190c389c4cfef20fe55b4bacade95a36ae6ef/taskcluster/taskgraph/create.py#67-104

Something like:
```py
with futures.ThreadPoolExecutor(CONCURRENCY) as e:
  cancels_jobs = [
    e.submit(cancel_task, task_id, use_proxy=True)
    for task_id in list_group(task_group_id, session) if task_id != own_task_id
  ]
  for job in cancels_jobs:
    job.result()
```
Attachment #8915739 - Flags: review?(jopsen) → review+
Keywords: checkin-needed
This doesn't meet the review requirements needed for Autoland to push it.
http://mozilla-version-control-tools.readthedocs.io/en/latest/mozreview/autoland.html#landing-commits
Keywords: checkin-needed
Attachment #8915739 - Flags: review?(garndt)
Comment on attachment 8915739 [details]
Bug 1405740 - Add a cancel-all action task

https://reviewboard.mozilla.org/r/186942/#review192384
Attachment #8915739 - Flags: review?(garndt) → review+
Pushed by garndt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfcdeca9c054
Add a cancel-all action task r=garndt,jonasfj
https://hg.mozilla.org/mozilla-central/rev/bfcdeca9c054
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: TaskCluster → Firefox Build System
You need to log in before you can comment on or make changes to this bug.