You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/0180-Github-cancel-previous-tasks.md
+10-3Lines changed: 10 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
# Summary
6
6
7
-
Allow to automatically cancel previous pipelines for github `push` and `pull_request` events.
7
+
Allow to automatically cancel previous pipelines for github ~~`push`~~ and `pull_request` events.
8
8
9
9
## Motivation
10
10
@@ -23,7 +23,7 @@ to allow all pushes to the default branch to have their own builds.
23
23
To be flexible and allow some projects to still run checks for all events, we could add new key to the `.taskcluster.yml` configuration.
24
24
We can introduce top-level configuration option `autoCancelPreviousChecks: true` (having `true` by default) to control if this behaviour is desired.
25
25
26
-
Github's webhook handler upon receiving `push` event would check if there are other task groups existing for given branch, that are not HEAD.
26
+
~~Github's webhook handler upon receiving `push` event would check if there are other task groups existing for given branch, that are not HEAD.~~
27
27
If `autoCancelPreviousChecks` is set to `true` it will cancel them.
28
28
29
29
Cancellation will happen for all the non-resolved tasks within the same `taskGroupId`. However, due to the fact that tasks can create their own sub-tasks, there might be cases where running tasks would still manage to create some tasks that might not be cancelled.
@@ -32,7 +32,14 @@ Cancellation will happen for all the non-resolved tasks within the same `taskGro
32
32
33
33
To make it easier for developers to cancel running builds associated with some specific branch we can expose new API endpoint. `github.cancelBuilds({ organization, repository, branch })` would be able to find all task groups associated with this branch, find all non-resolved tasks within those groups and cancel those.
34
34
35
-
36
35
# Implementation
37
36
38
37
* Original request issue [#5621](https://github.com/taskcluster/taskcluster/issues/5621)
38
+
39
+
## Changes to the original proposal
40
+
41
+
Due to the bug [#6616](https://github.com/taskcluster/taskcluster/issues/6616) it was decided that `push` events would not be handled.
42
+
Only `pull_request` events to cancel builds for the same pull request.
43
+
44
+
This is because same commit may belong to different branches like `main`, `production`, `staging`, etc.
45
+
And to keep configuration simple we decided to only handle `pull_request` events.
0 commit comments