arcade-services icon indicating copy to clipboard operation
arcade-services copied to clipboard

Implement permanent fix for flowing into PR after opposite flow is merged

Open adamzip opened this issue 4 months ago • 0 comments

Type of problem

Incorrect contents in the PR

Description of the issue

In #5148 , we became aware of silently lost updates that can occur when flowing into an already existing PR after an opposite flow has already been merged.

We've implemented a temporary solution that simply blocks further updates into a PR after detecting an opposite flow. We have decided not to permanently keep the block on further flows, so we'll have to choose the best possible solution and implement it, even if it's not completely safe from lost updates.

Currently, the workbranch is opened from the last flow in the PR. There are two ways we can change it:

  1. Don't modify where the workbranch starts from, but merge the target branch into the PR branch before flowing into an existing PR. As pointed out in https://github.com/dotnet/arcade-services/issues/5148, this can lead to the introduction of duplicate diffs on each branch, but it will solve the outright reverting of commits from the target branch
  2. Start the workbranch from the last opposite flow on the target branch, and not from the last flow in the PR head branch

adamzip avatar Sep 02 '25 12:09 adamzip