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)
  • Access to modify treestatus
    • You can check if you have status by looking for the "assume:mozilla-group:vpn_treestatus" permission at https://tools.taskcluster.net/credentials
    • If necessary, 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

Although the mozilla-beta -> mozilla-release merge is typically done about a week before the mozilla-central -> mozilla-beta merge, the comm merges are done all at once (after the mozilla-central -> mozilla-beta merge). You can see a calendar of when each merge day occurs on 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.

There's also a tool you can use in the drivertools repo that prints out the current mozilla-* and comm-* versions:

 ./get-versions.sh

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. It is easiest to tick "Remember this change to undo later" since we'll undo these fairly quickly. It is easiest to close these in pairs (e.g. the comm-beta-* together).

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

  • comm-beta
  • comm-release

It is generally easier to close all of the comm-* trees and leave them closed for the duration of the merges.

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 approval needed 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/release and "open" for central). If "Remember this change to undo later" was ticked while closing the trees you can just click the "Undo" button to set it back to the previous status.

Communication about merges

The morning of merge day, email the Thunderbird drivers mailing list with a message reminding them know of the plan for the day. Reply to this email in order to keep people up-to-date with what is happening.

Hello!

I'll be doing the merges this evening (Eastern time). The mozilla-* merges have <not yet been occurred or already happened>.

comm-central is going to version <new c-c version>, comm-beta to <new c-b version>, and comm-release to <new c-r version>.

I'll be following the steps I always do (available at [1], this includes updating ship-it/release-services and filing a bug for updating tracking flags). I'll be closing the trees before starting this.

I'll keep people up to date by replying to this email:

  • Email before merges begin
  • Close the trees
  • Perform the merges
  • Re-open c-c
  • Email after the merges
  • Wait for c-b builds to complete
  • Set c-b back to approval needed
  • Email once the builds are complete

Please let me know if you have any questions or comments.

Thanks, <your name>

[1] https://wiki.mozilla.org/Thunderbird/Release_Driving/Rapid_Release_Activities/Merge_Repositories

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 (comm-beta-* and comm-release-*)
  • 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
 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 (comm-central-* and comm-beta-*)
  • 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
  • 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 &> bumpcentral.log
 less bumpcentral.log
  • 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

Trigger comm-beta builds

Taskcluster won't build off a push with multiple heads, so the comm-beta build will not start building automatically. Perform the following on the beta repository to get a build going:

  • Pin .gecko_rev.yml to the Firefox tag and revision from their first beta build (go to https://hg.mozilla.org/releases/mozilla-beta and look at the tags, it should be something like FIREFOX_77_0b1_BUILD1). Clicking on this will bring you to the revision which also has the revision hash to use.
 GECKO_BASE_REPOSITORY: https://hg.mozilla.org/mozilla-unified
 GECKO_HEAD_REPOSITORY: https://hg.mozilla.org/releases/mozilla-beta
 GECKO_HEAD_REV: eae58b7bc5654f7cac80985dd647c7558bb88895
 GECKO_HEAD_REF: FIREFOX_77_0b1_BUILD2
  • Commit and push that change with DONTBUILD and CLOSED TREE, e.g.:
 No bug - Pin mozilla-beta (<the ref from above here>). r=me DONTBUILD CLOSED TREE
  • Next, we need to run the "l10n-bump-10n-bumper-beta" task which will update the l10n pinnings and do another push to trigger a build.
    • Go to the comm-beta repository in Treeherder (https://treeherder.mozilla.org/#/jobs?repo=comm-beta).
    • Click the arrow in the top right corner (below "Filter platforms & jobs") and select "Add new jobs (Search)".
    • Type "l10n-bump" into the search box.
    • Select "l10n-bump-10n-bumper-beta". (Note that "-beta" at the end, that variant is set up to work on a closed tree.)
    • Click "Add selected".
    • At the bottom of the screen click "Trigger (1) Selected Jobs".

Once the build is complete, comm-beta can be set back to approval needed.

Update Ship It (previously part of release-services, and before that known as ship-it-v1)

Mozilla's Ship It tool must be updated with the updated version number. Ship It is once again its own repository.

shipit changes

  • Modify the api/src/shipit_api/common/config.py file to update the LATEST_THUNDERBIRD_NIGHTLY_VERSION variable to be the newest version of comm-central.
  • Create a pull request with the changes.

An example pull request with the changes (for when comm-central went to 79.0a1) is available to view.

Post-Merge tidy

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