Gerrit/Cross-repo dependencies

Cross-repo dependencies are commits to other repositories which a commit requires for functioning correctly. For example, you want to add new functionality to an extension, but there is no hook for it, so you submit a core patch adding a new hook, and a patch to the extension adding a handler for that hook. Declaring the core patch as a dependency of the extension patch ensures that the extension path is not tested and not merged without the core patch.

Cross-repo dependencies can be declared with a  tag in the commit message, a syntax similar to that of connecting patches to Phabricator tasks: in the commit message, you write something like

where I123456abc... is the 40-character gerrit ID of the other commit (which is in the  line of the commit message of that commit).

This has two effects:
 * Zuul (the gatekeeper of the MediaWiki continuous integration system) will refuse to merge the patch until all dependencies are merged.
 * whenever the CI system builds a test environment, all dependencies are cherry-picked on top of the master branches of their respective repositories; thus, even if your extensions tests depend on the new core functionality, the tests will work correctly.

If one of the dependencies cannot be merged (typically, because it has a merge conflict and needs rebase) the CI system will refuse to run tests, and jenkins-bot will report an error like  instead.

More information

 * Documentation
 * Zuul documentation
 * Email announcement (thread)