Bug - Github Plugin links commit to the wrong build

We noticed a bug in the github plugin where it links to the wrong build if a developer pushes a new branch with no new commits. For example, DeveloperA merges and pushes Commit1 into main which kicks off BuildA. DeveloperB pulls the latest main (Commit1) then creates and pushes a new branch without making a commit which kicks BuildB. Now when DeveloperA looks at Commit1 in github, the buildkite status check incorrectly links Commit1 to BuildB instead of BuildA. This is likely caused because there are two builds running with the same commit sha.

This has caused a fair amount of confusion as developers are being linked to the wrong build. Any help to fix this would be greatly appreciated.

Hi @dylanhandshake

First of all welcome to Buildkite community and reaching out with your question.

To make sure I understand the flow of events here, you had DeveloperA create a pull request with commit1 and merged it to main branch. When merge is done, build BuildA got triggered and you saw the commit1 buildkite status check pointed to BuildA on main branch with commit1.

Now DeveloperB created new branch from main branch which triggered a build BuildB. Now when you check commit1 buildkite status check in new branch you observe BuildB.

If this is correct, please can you share your Github Settings for the pipeline to see what settings or filters you have enabled for the build to be triggered when a code push happens to Github.

Thanks,
Suma

Thanks @suma, that’s correct!

Below is the Github Settings for the pipeline.

Hi @dylanhandshake

Please can you send the pipeline and build url to support@buildkite.com so we can check the webhook events that occurred and the build status events that buildkite sent back to github.