Page MenuHomePhabricator

Modify wmf/next branching process to avoid leaving an incomplete branch on failure
Open, Needs TriagePublicBUG REPORT

Description

@dduvall There's a hazard in the way that the MediaWiki branch and publish WMF single-version image job handles the wmf/next branches. It deletes the branches first, then creates fresh branches in the relevant repos. Then it creates a commit to set up .gitmodules, etc and pushes it to Gerrit and it waits for CI to finish. If CI fails (which happens about 10% of the time), we're left with an unusable wmf/next branch until the next run. If scap prep next runs before MediaWiki branch and publish WMF single-version image runs again, it will fail like so:

dancy@deploy1003:/srv/mediawiki-staging$ scap prep next
21:56:24 Started scap prep next
21:56:24 Copying patches from /srv/patches/1.45.0-wmf.9 to /srv/patches/next
21:56:24 Clone https://gerrit.wikimedia.org/r/mediawiki/core (wmf/next branch) in /srv/mediawiki-staging/php-next
21:56:41 https://gerrit.wikimedia.org/r/mediawiki/core checked out at commit a9e4ca532000bcf0f190da549db728e71b1c943c
21:56:41 Finished scap prep next (duration: 00m 16s)
/srv/mediawiki-staging/php-next/.gitmodules does not exist. Did the train branch commit get merged?

@dduvall I'd like to see MediaWiki branch and publish WMF single-version image changed so that instead of destroying and recreating the wmf/next branch each time it runs, it updates wmf/next if it already exists. This means being able to handle added/dropped extensions.

Wouldn't that still require an update to the .gitmodules in mediawiki/core? Meaning a new change submitted to Gerrit and a CI run (and potential failure).

Yes, but in the meantime scap prep next would continue to work correctly (assuming at least one prior successful branch cut was merged). As it stands, if MediaWiki branch and publish WMF single-version image fails, a subsequent scap prep next will fail.

Yes, but in the meantime scap prep next would continue to work correctly (assuming at least one prior successful branch cut was merged). As it stands, if`MediaWiki branch and publish WMF single-version image` fails, a subsequent scap prep next will fail.

That makes sense. I was thinking more about the root cause, but making scap prep next more tolerant of failure seems just as important.