Skip to content

Build failures can be reverted if GitHub sends multiple webhooks #150

@rudymatela

Description

@rudymatela

... 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 with BuildStarted if another build is started on a different branch:

  1. Hoff comments: rebased as abc1234. waiting for CI...;
  2. Hoff comments: Build started, URL: ...;
  3. Hoff comments: Build failed, URL: ...;
  4. [so far so good];
  5. Someone creates a new branch with the head pointing to abc1234 and pushes;
  6. Hoff comments: 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.

Metadata

Metadata

Assignees

Labels

OKRObjectives and Key ResultsbugSomething isn't workingtrainInvolves Merge Trains

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions