-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failures can be reverted if GitHub sends multiple webhooks #150
Comments
The fix should be fairly straightforward, in Lines 545 to 558 in faf04c9
|
I am marking this as one of the requisites of #77 as:
|
When solving this issue, one shouldn't forget to start with a failing ❌ automated test that exposes this issue. |
Done! 571901c |
... and these status shouldn't be reversible.
As noted in #147, GitHub may send multiple webhooks for the same commit hash whenever there are multiple branches pointing to it.
In general this means that when there two builds running in parallel for the same hash, Hoff will merge at the point of the first BuildSuccess on either of the branches. I believe this has always been the case even on early Hoff versions, and is a reasonable course of action.
However, after the changes introduced in #131 (and #141), GitHub is now able to override
BuildFailures
withBuildStarted
if another build is started on a different branch:rebased as abc1234. waiting for CI...
;Build started, URL: ...
;Build failed, URL: ...
;abc1234
and pushes;Build started, URL: ...
, the build status has been overridden here and shouldn't!The issue is easy to replicate, but should be uncommon in practice. When Hoff rebases with a merge commit, there shouldn't be problems. When the PR is a single commit, then the issue may arise: if one pushes a branch with a single commit on top of master and is quick enough with the
@hoffbot merge
comment, then it may appear. It nevertheless should be fixed.The text was updated successfully, but these errors were encountered: