The operations/puppet in Gerrit is configured to require changes to be fast forward in order to be merged by Gerrit. Hence people have to manually rebase a change before Gerrit let it be submitted and ultimately merged. When two or three people are willing to merge their changes, they will race for the rebase and submit. As soon as one change merged, the other changes all have to be rebased: rebase hell.
Most changes in the Gerrit interface ends up being flagged as being in merge conflict.
The reason lies in the repository configuration at https://gerrit.wikimedia.org/r/#/admin/projects/operations/puppet which is:
|Submit Type||Fast Forward Only|
|Allow content merges||False||note: does not apply to ff type|
A while ago we had a discussion about it at T166888#3311916 and I have proposed to change the strategy to Rebase if necessary and allowing content merges. The git history will stay linear since Gerrit will automatically rebase non fast forward changes.
A gotcha is that the test results at the time the patch got uploaded might no more be valid since the target branch might have evolved between.
- change A change a linting rule. Test passes at the time. Change has verified +2
- the production branch has more code adhering to the old linting rule
- someone submit change A. Gerrit rebase it and since there is no conflict merge the change. No tests have been run despite the branch receiving changes in between
- tests no more pass
We can adjust that by adjusting the workflow. When previously one would:
- wait for test to complete and CI to vote Verified+2
- vote CR+2 and submit
- Gerrit merge
We would switch the Gerrit submit type to Rebase if necessary and let CI handles the merge. The workflow then becomes:
- Code-Review +2
- CI test the change against the tip of production catching up with all changes that happened between
- CI vote Verified +2 and submit
- Gerrit merge
One advantage is that people no more race on each other. Changes can just all be voted Code-Review +2 and CI will serialize them in the Queue and get them merged as tests are passing.
Culpirt: that brings submit right to the CI jenkins-bot and hence to CI operators (which has more members than the Gerrit Administrators group).