Auto-cancel redundant builds for specific branches
M
Manuel Baesler
Same reason as Sam. We want to have all builds on the main branch as well as release branches, but on private branches we only care about the latest commit. Our solution was to disable auto-cancel globally and implement the cancel logic directly in the pipeline using the CircleCI API: https://github.com/arangodb/arangodb/blob/6b8774968fc59ce9d704f5c19c8a53e306022161/.circleci/config.yml#L99-L135
Minjun Seong
Hi folks, I'm a product manager at CircleCI. Would really appreciate if you can elaborate on why you wanted to disable auto-cancel redundant builds for specific branches? Was it for the same reason as mentioned by Sam or something else?
Sam Kemp
This is desperately needed. For private feature branches it absolutely makes sense to cancel redundant builds but if there's a public branch such as a trunk where multiple devs push to it then cancelling the build leads to massive frustration. We have a workflow that takes 20 minutes to complete but if any dev pushes to the branch during that 20 minutes then the first dev has to wait another 20 minutes before their change is deployed. Turning it off though would result in so many redundant pipelines running in private branches.