Skip to content

Commit 990f947

Browse files
authored
Update RFC 0180 (#186)
1 parent 9f04cfe commit 990f947

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

rfcs/0180-Github-cancel-previous-tasks.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Summary
66

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.
88

99
## Motivation
1010

@@ -23,7 +23,7 @@ to allow all pushes to the default branch to have their own builds.
2323
To be flexible and allow some projects to still run checks for all events, we could add new key to the `.taskcluster.yml` configuration.
2424
We can introduce top-level configuration option `autoCancelPreviousChecks: true` (having `true` by default) to control if this behaviour is desired.
2525

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.~~
2727
If `autoCancelPreviousChecks` is set to `true` it will cancel them.
2828

2929
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
3232

3333
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.
3434

35-
3635
# Implementation
3736

3837
* 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

Comments
 (0)