Skip to content

Commit

Permalink
unintegrate the rest of the train on failed pushes
Browse files Browse the repository at this point in the history
When a promotion (push to master) fails,
we should not only reintegrate the head PR,
but also unintegrate the rest of the train.
  • Loading branch information
rudymatela committed Aug 23, 2022
1 parent d3433a7 commit 95a4ac9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Logic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,10 @@ pushCandidate (pullRequestId, pullRequest) newHead state =
$ Pr.setIntegrationStatus pullRequestId Promoted state
-- If something was pushed to the target branch while the candidate was
-- being tested, try to integrate again and hope that next time the push
-- succeeds.
PushRejected _why -> tryIntegratePullRequest pullRequestId state
-- succeeds. We also cancel integrations in the merge train.
-- These should be automatically restarted when we 'proceed'.
PushRejected _why -> tryIntegratePullRequest pullRequestId
$ unintegrateAfter pullRequestId state

-- | When a pull request has been promoted to master this means that any
-- conflicts (failed rebases) built on top of it are not speculative anymore:
Expand Down

0 comments on commit 95a4ac9

Please sign in to comment.