Page MenuHomePhabricator

Train: automatic-branch-cut does not account for changes between branching and adding submodules
Closed, ResolvedPublic

Description

We have a job that automatically cuts the train branch each week.

The script that starts this process is: https://gitlab.wikimedia.org/repos/releng/release/-/blob/main/make-release/automatic-branch-cut

What it does:

  • For all branched extensions, skins, and core it makes a new branch named wmf/<version>
  • It checks out mediawiki/core
    • git branch -B wmf/<version>
    • Removes existing submodules (git submodule deinit && git rm)
    • Modifies extensions/.gitignore to remove the * line
    • Does git submodule add --branch <wmf/<version> for all branched extensions/skins
    • Removes vendor from .gitignore
    • Updates the version in includes/Defines.php
    • Pushes this as a new change to the branch (example)

There's a problem here.

If the HEAD of mediawiki/core changes between when the branch is created and when it's cloned, this process will fail with Implicit merge (see T373425)

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
branch.py: Always check out the remote wmf/<branch>repos/releng/release!115dancymain-I00bd8c5596ebae6192cf2e853fd07f4d775d0c2bmain
gerrit: project.config: Add [receive] sectionrepos/releng/train-dev!88dancymain-Ieb738b13d6d860f7d73caa749cd30e3eb769ee67main
Customize query in GitLab