There was a weird case on our build server.
A single commit triggered a commit build and a PR build, which kicked off at the same time. They both show the same commit hash on the UI.
However the commit build passed, the PR build failed, because the changes of this commit did not reflect in the PR build yet. After manually restarting the PR build, it succeeded.
I digged a bit in how Drone does the clone step:
- commit builds do a “git reset --hard” on the git hash, so no room for error
- while PR builds just go on the merge HEAD:
* branch refs/pull/361/merge -> FETCH_HEAD git checkout -qf FETCH_HEAD
My explanation on the described behavior, that if this merge HEAD lags behind, we get inconsistent builds.
Does anyone seen similar before?