Redundant builds are canceled on the default branch

According to the documentation in the project settings

Auto-cancel redundant builds

With the exception of your default branch, we will automatically cancel any queued or running builds on a branch when a newer build is triggered on that same branch. Scheduled workflows and re-runs are not auto-canceled.

However, CircleCI is currently canceling builds on our default branch (next): https://app.circleci.com/pipelines/github/mui-org/material-ui/23467/workflows/163f944b-f66e-41db-8939-ac8dcc05667a

Does CircleCI have a separate setting for the default branch or did something go wrong when syncing the default branch from GitHub?

We have pipelines enabled. Our CircleCI config when that build was canceled: https://github.com/mui-org/material-ui/blob/5440c77d668de773192978ec6f60609848d39a8c/.circleci/config.yml

Hello @eps1lon! Thanks for providing a build link so I could take a closer look. In viewing the canceled build, I can confirm I see the trigger was for the branch next, which you noted is your default branch in GitHub. However in checking the default branch for mui-org/material-ui/ via the API (https://circleci.com/api/v1.1/project/github/mui-org/material-ui/info) I see default_branch: master, leading me to believe CircleCI did not catch next as the default branch.

Was the default branch recently changed? In cases where this webhook gets missed or dropped, we suggest following the steps in this Support Article: VCS Default Branch isn’t Reflected on CircleCI.

Could you try out these steps and let us know if it works for you?

1 Like

We decided to keep it as is in case “disconnecting” everything first makes it worse. That doesn’t sound safe to me at all.

Hi @eps1lon thanks for keeping us in the loop. Manually removing and adding webhooks should be safe and will not remove any data, but is definitely not an ideal experience.

Turns out we can also refresh this information on our end, which I’ve ran on mui-org/material-ui and now see the API reflects the default branch as next as expected. Do let us know if you encounter any issues moving forward.

We’ve added this information to our Support Article here: VCS Branch Isn’t Reflected on CircleCI.

Let us know if there’s anything further we can help out with.