Thunderbird/Release Driving/Rapid Release Activities/Merge Repositories

From MozillaWiki
Jump to: navigation, search

Setting up

Warning signWarning: The merge scripts download the comm-* repository bundles and create clones from those, and update them. These may use a large amount of data bandwidth to complete. This is done to ensure clean repositories.
Warning signWarning: You MUST disable the firefoxtree tree Mercurial extension before running any of these commands. The names interfere with the repository names used in the scripts.

You'll need access to:

  • Mercurial (level 3)
  • treestatus (one of the existing Thunderbird folks should be able to ask the Sheriffs to give you access).

Clone the drivertools repo

hg clone http://hg.mozilla.org/users/bugzilla_standard8.plus.com/drivertools/
cd drivertools/comm-merges

Merges Overview

When merges happen

Merges should be done in the order:

  • comm-beta -> comm-release (used by SeaMonkey)
  • comm-release -> comm-esrXX (only once, when the ESR is first created)
  • comm-central -> comm-beta

The comm-beta -> comm-release merge is typically done a few days before the main merges. Normally the SeaMonkey folks determine when. At the latest it is done on Merge day.

The other two merges happen on Merge Day. This can be determined by looking at the release calendar.

On Merge Day, hook up with RelEng (mergeduty) to check when the mozilla-* repositories are being merged. These typically happen sometime in the morning Pacific Time - we aim to do the comm-* repositories after the mozilla-* ones, so that we don't have broken builds on the branches.

How to close the Trees

Use treestatus for closing trees. Set the "state" to CLOSED with a reason of "for merges" with the "Planned closure" tick box selected.

For each merge ensure the relevant trees are closed, e.g. for comm-beta -> comm-release, ensure:

  • comm-beta-thunderbird
  • comm-beta-seamonkey
  • comm-release-thunderbird
  • comm-release-seamonkey

Reopening the Trees

Reopening trees is only done when:

  • For central: after the merges are completed and the version numbers have been bumped.
  • For beta: This remains closed after a comm-beta -> comm-release merge until after the comm-central -> comm-beta merge has been completed and the builds have been completed.
  • For release: This remains closed as developers shouldn't be pushing to it.

When re-opening the tree, ensure you set it to the state that it was previously (generally "approval-required" for beta and "open" for central). There's a history on the page where you can check.

Doing the actual merges

These assume you've read the previous detail.

The scripts are run from the drivertools/comm-merges directory.

comm-beta -> comm-release

  • Close the relevant trees
  • Reset the repos (this removes any previous repository & creates a fresh clone)
 ./resetreleaserepos.sh
  • Run the script
 ./merge-beta-2-release.sh &> beta2release.log
 less beta2release.log
  • Check the log for:
    • Any errors
    • Outgoing tag to comm-beta
    • The diff of changes committed to comm-release looks OK
      • Updating MOZILLA_REPO to point to the mozilla-release
      • Updating the ACCEPTED_MAR_CHANNEL_IDS and MAR_CHANNEL_ID to be just thunderbird-comm-release
    • The outgoing changes to comm-release look ok, including closing of the old head, and tagging at the start and end of the list.
  • Now push the beta tag (this doesn't cause any builds, as it doesn't change anything)
 hg -R beta push
  • and the release changes (we generally haven't clobbered these as SeaMonkey's clobberer hasn't been up and running)
 hg -R release push -f
  • Remember, comm-beta stays closed until after the comm-central -> comm-beta merges have completed on Merge day (and its built).

comm-release -> comm-esrXXX

Warning signWarning: This is only necessary ONCE per ESR (when the release base version goes into ESR). If you're not sure, you likely want to skip this section.
  • Modify the ESR variable in resetesrrepos.sh and merge-release-2-esr.sh to point to the current ESR version.
  • Close the relevant trees
  • Reset the repos (this removes any previous repository & creates a fresh clone)
 ./resetesrrepos.sh
  • Run the script
 ./merge-release-2-esr.sh &> release2esr.log
 less release2esr.log
  • Check the log for:
    • Any errors
    • Outgoing tag to comm-beta
    • The diff of changes committed to comm-esr looks OK
    • The outgoing changes to comm-esr look ok, including tagging at the start and end of the list.
    • Note that the number of outgoing changesets and heads might be large (1000s of commits, 100s of heads) because the comm-esrXXX repository is initially created as a clone of ONLY the default branch of comm-beta. When pushing we'll be pushing all the other release branches, etc.
  • Now push the esr changes
 hg -R esr push -f
  • comm-esrXXX can now go to approval-needed.

comm-central -> comm-beta merge

  • Close the relevant trees
  • Reset the repos (this removes any previous repository & creates a fresh clone)
 ./resetmainrepos.sh
  • Run the script
 ./merge-central-2-beta.sh &> central2beta.log
 less central2beta.log
  • Check the log for:
    • Any errors
    • Outgoing tag to comm-central
    • The diff of changes committed to comm-beta looks OK
    • The outgoing changes to comm-beta look ok, including closing of the old head, and tagging at the start and end of the list.
  • Now push the central tag (this doesn't cause any builds, as it doesn't change anything)
 hg -R central push
  • Clobber the beta builds via clobberer
  • and then push the beta changes
 hg -R beta push -f
  • For comm-central, the version bumps now need to happen.:
 ./bump-versions-central.sh
  • Check the log for:
    • Any errors
    • The diff of changes committed to comm-central looks OK
    • The outgoing changes to comm-central look ok, including the changes in version number.
  • Now push central changes
  • Push the result.
 hg -R central push
  • comm-central can be reset to it's previous status (generally opened)
  • comm-beta doesn't get set back to approval required until after builds are completed

Update ship-it

Mozilla's ship-it tool must be updated with the updated version numbers. These live in kickoff/config.py of that repository as the variables LATEST_THUNDERBIRD_NIGHTLY_VERSION and LATEST_THUNDERBIRD_ALPHA_VERSION. They should be updated to the newest versions of comm-central and comm-aurora, respectively. An example pull request with the changes (for when comm-central went to 55.0a2) is available to view.

File a bug for Bugzilla Flag updates

File a bug in bugzilla.mozilla.org:: Administration, this should be similar to bug 1401797 but for Thunderbird & SeaMonkey.

Post-Merge tidy

Please commit and push any changes to the drivertools repo, for history purposes.