openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
124 stars 81 forks source link

Cancel out of date runs #1661

Open lcarva opened 2 months ago

lcarva commented 2 months ago

In a pull request workflow, it is common for the author to modify the changes in the pull request, e.g. push a new commit. When this happens, any previously triggered run is no longer applicable. If any of those are still running, they are mostly wasting resources since their result is thrown out. It would be great if such runs were automatically canceled by PAC.

NOTE: This really only applies to runs from pull request events. Runs from push events, on the other hand, should not be automatically cancelled under the same conditions.

lcarva commented 2 months ago

Somewhat related to https://github.com/openshift-pipelines/pipelines-as-code/issues/957