Rebase merge train refs when adding a car after skip-merge
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
When an immediate non-interrupting merge occurs to a project with a long-running merge train, the train ref starts to diverge from the target branch.
- A long running merge train can permanently diverge from the target branch, accumulating changes that make the merge train pipelines non-representative of what would run on the target branch.
Technical Proposal
- When adding a car to a train, if the predecessor is a skip-merge, then use
previous_ref = rebase(previous_non_skip_merge.train_ref, target_ref)(pseudocode) when creating the train ref for the new car.
Edited by 🤖 GitLab Bot 🤖