For wmf/1.43.0-wmf.20 (T366965), the automatic branch cut Jenkins job fail to push the branches that got cut. The reason was an authentication issue (T373441).
I then reran the job manually which reuses the existing workspace, that leads to message such as:
11:03:21 Branching mediawiki/core to wmf/1.43.0-wmf.20 from HEAD 11:03:21 Warning: Branch wmf/1.43.0-wmf.20 already exists in repository mediawiki/core
The branches already got created in Gerrit and were fast forwarded in the local repository. When pushing the "new" branches, Gerrit complains with:
Exception: Command failed: ('/usr/bin/git', 'push', 'origin', 'HEAD:refs/for/wmf/1.43.0-wmf.20', '--push-option=l=Code-Review+2') Output: remote: remote: Processing changes: refs: 1 remote: Processing changes: refs: 1, done remote: ERROR: Implicit Merge of cde00b5 auth: Add AuthManagerFilterProviders hook remote: ERROR: Implicit Merge of e3cea8e auth: Add AuthManagerVerifyAuthentication hook remote: ERROR: Implicit Merge of 8cf23d3 Merge "auth: Add AuthManagerFilterProviders hook" remote: ERROR: Implicit Merge of 3abfedb Merge "auth: Add AuthManagerVerifyAuthentication hook" remote: ERROR: Implicit Merge of be9bb3e Add Nupe (nup) namespace translations remote: ERROR: Implicit Merge of ef87455 Localisation updates from https://translatewiki.net. To https://gerrit.wikimedia.org/r/mediawiki/core ! [remote rejected] HEAD -> refs/for/wmf/1.43.0-wmf.20 (implicit merges detected) error: failed to push some refs to 'https://gerrit.wikimedia.org/r/mediawiki/core'
In Gerrit that is the setting receive.rejectImplicitMerges):
*receive.rejectImplicitMerges*
Controls whether a check for implicit merges will be performed when changes are pushed for review. An implicit merge is a case where merging an open change would implicitly merge another branch into the target branch. Typically, this happens when a change is done on master and, by mistake, pushed to a stable branch for review. When submitting such change, master would be implicitly merged into stable without anyone noticing that. When this option is set to 'true' Gerrit will reject the push if an implicit merge is detected.
This check is only done for non-merge commits, merge commits are not subject of the implicit merge check.
Default is INHERIT, which means that this property is inherited from the parent project.
That is set to True in our root project All-Projects and that is the right thing to do.
We should teach make-release/automatic-branch-cut to not reuse use a branch when it has already been cut. At least when cutting the WMF branches.
@jnuche mentioned the branch cut pretest uses the same code and does rely on fast forwarding the ever lasting branch_cut_pretest branch.