Release Management/Merge Documentation

From MozillaWiki
Jump to navigation Jump to search

NOTE: For the next merge, we need to check for interface changes that are unpaired to UUID changes

Archive of Past Merge Days

Release_Management/Merge_Days

What's missing here

This is a document in process, and will also be replaced by automation at some point. In the meantime it outlines the manual steps required on a 'Merge Day' when Mozilla-Aurora becomes Mozilla-Beta and Mozilla-Central becomes Mozilla-Aurora.

ATM there is nothing in here about:

  • synching all the L10N repos (current doc is here for repos: L10n:Migration, and dashboard process is coming)
    • There have been issues with missing l10n locales on first beta1 builds. In m-b --> m-r migration, RelEng run l10n-sync script to uplift beta locales to release, which ensures that all locales have content in release repo and are migrated correctly. However, this script currently doesn't get used for m-a --> m-b merge day (need to check with Axel on his process here).
  • Thunderbird/SeaMonkey merging, that doc is at Thunderbird/Release_Driving/Rapid_Release_Activities/Merge_Repositories

Mozilla-Beta -> Mozilla-Release Merge

  • Make sure that there isn't an l10n locales bug that needs to filed like: bug 826825

Close the Beta Tree

  • Use https://treestatus.mozilla.org/ to close mozilla-beta. No need to reopen till the next merge from Aurora->Beta (or a beta re-spin is necessary)
    • Please use the "Remember previous state" option, so you can easily restore the previous status messages when you are finished (there will be a restore button at the bottom of the page).
    • In order to change tree statuses, your browserID email needs to be added with sheriff permissions (ping edmorley/philor/catlee or ask in #developers).

Sync mozilla-beta to mozilla-release

Mercurial repositories used for final releases should be synced from mozilla-beta.

Tip of default on mozilla-release should be tagged and closed. mozilla-beta should be tagged and pulled. It creates new tip of default on mozilla-release. See Aurora specific sync mechanics for the details.

L10N repositories uses noop (dummy) merge if needed to simplify localizers life.


To handle this process use the following scripts.

Sync mozilla-beta to mozilla-release

Script available here (beta2release.sh) do not use as it doesn't update confvars.sh

Clobber mozilla-release builders

Go to https://secure.pub.build.mozilla.org/clobberer/?branch=mozilla-release and clobber the mozilla-release builders

Clone, Tag, update

NOTE THAT BELOW VERSION IS THE CURRENT FIREFOX VERSION ON M-R

  • If running for the first time save this shell script in the directory where you typically do the beta to release merge.

For eg : I typically have the script saved as /Users/bbajaj/Mozilla/beta2release/beta2release.sh

  • For every merge make sure you are have the latest release "VERSION" and you should be good to run it.
#!/bin/bash
# Adjust VERSION variable which stands for the current Firefox version in mozilla-release
VERSION=14.0.1
HG_USER="username <email@mozilla.com>"

# exit immediately on errors
set -e

hg clone http://hg.mozilla.org/releases/mozilla-release
hg clone http://hg.mozilla.org/releases/mozilla-beta

beta_rev=$(hg -R mozilla-beta id -i -r default)
release_rev=$(hg -R mozilla-release id -i -r default)

RELEASE_BASE_TAG="RELEASE_BASE_`date +%Y%m%d`"
RELEASE_TAG="FIREFOX_RELEASE_$VERSION"

hg -R mozilla-beta tag -r $beta_rev -u "$HG_USER" -m "Added tag $RELEASE_BASE_TAG for changeset $beta_rev. CLOSED TREE a=release DONTBUILD" $RELEASE_BASE_TAG
hg -R mozilla-beta push ssh://hg.mozilla.org/releases/mozilla-beta

hg -R mozilla-release tag -r $release_rev -u "$HG_USER" -m "Added tag $RELEASE_TAG for changeset $release_rev. CLOSED TREE a=release" $RELEASE_TAG
hg -R mozilla-release commit -u "$HG_USER" -m "Closing old head. CLOSED TREE a=release" --close-branch

hg -R mozilla-release pull mozilla-beta
hg -R mozilla-release up -C default

Edit desktop config

# edit mozilla-release/browser/locales/shipped-locales file if you need to remove some beta locales (eg mn, sw)
# edit mozilla-release/browser/confvars.sh:
-ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-beta,firefox-mozilla-release
+ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-release
-MAR_CHANNEL_ID=firefox-mozilla-beta
+MAR_CHANNEL_ID=firefox-mozilla-release

Edit mobile mozconfigs

Note: use 'official' for release mozconfigs, not 'release'

# edit mozconfigs: mozilla-release/mobile/android/config/mozconfigs/...
#                       android and android-armv6 ...
#                       release, nightly, l10n-release, and l10n-nightly
-ac_add_options --with-branding=mobile/android/branding/beta
+ac_add_options --with-branding=mobile/android/branding/official

Commit Changes

# commit the changes
hg -R mozilla-release commit -u "$HG_USER" -m "Updating configs CLOSED TREE a=release ba=release"
# push back
# hg -R mozilla-release push -f ssh://hg.mozilla.org/releases/mozilla-release

Now go watch results

https://tbpl.mozilla.org/?tree=Mozilla-Release

L10N sync

  • Note you need permission to be able to run this script successfully.File a server ops bug similar to bug 869654

Script available here (beta2release_l10n.sh)

Note for August 24th beta->release uplift, you'll want to incorporate Axel's merge script to deal with when release locale repos don't have anything committed to them yet.

Also note the merge part of this script does not work properly period, and doesn't push to repo

#!/bin/bash
set -x
set -e

HG_HOST=hg.mozilla.org
HG_USER=lsblakk@mozilla.com
repo=mozilla-release
release_repo_path=releases/l10n/mozilla-release
beta_repo_path=releases/l10n/mozilla-beta
wd=`pwd`/l10n

mkdir -p $wd
cd $wd

for l in `wget -q -O- http://$HG_HOST/releases/$repo/raw-file/default/browser/locales/shipped-locales | grep -v en-US | awk '{print $1}'`; do
    hg clone http://$HG_HOST/$release_repo_path/$l
    hg clone http://$HG_HOST/$beta_repo_path/$l $l.beta
    release_rev=`hg -R $l id -i -r default`
    beta_rev=`hg -R $l.beta id -i -r default`
    hg -R $l pull $l.beta
    hg -R $l up -C default
    heads=`hg -R $l heads --template '{rev}\n' default|wc -l|tr -d ' '`
    if [ "x$heads" != "x1" ]; then
        hg -R $l up -C -r $beta_rev
        HGMERGE=true hg -R $l merge -r $release_rev
        hg -R $l revert -a -y --no-backup -r $beta_rev
        hg -R $l commit -u $HG_USER -m "Merge from mozilla-beta. CLOSED TREE a=release"
    fi
    hg -R $l diff -r $beta_rev -r default
    hg -R $l push -f ssh://$HG_HOST/$release_repo_path/$l
done

Go Re-Open Beta Tree

  • Announce completion of merge in #release-drivers (ping Standard8 and Callek)

Merge Day (Central, Aurora, Beta)

Get all of the Repos

mkdir ~/Mozilla/
cd ~/Mozilla/
hg clone http://hg.mozilla.org/mozilla-central/ mozilla-central
hg clone http://hg.mozilla.org/releases/mozilla-aurora/ mozilla-aurora
hg clone http://hg.mozilla.org/releases/mozilla-beta/ mozilla-beta

Set each Repo up for Pushing

See https://developer.mozilla.org/en/Mercurial_FAQ#Required_configuration

Set up HG Extensions

Edit ~/.hgrc to include

[extensions]
transplant=
mq=
rebase=
graphlog=

Close the Trees

DO NOT CLOSE mozilla-central FOR MERGING

  • Use https://treestatus.mozilla.org/ to close the trees.
  • Please use the "Remember previous state" option, so you can easily restore the previous status messages when you are finished (there will be a restore button at the bottom of the page).
  • In order to change tree statuses, your browserID email needs to be added with sheriff permissions (ping edmorley/philor/catlee or ask in #developers).

Clone the Helper Script

git clone https://gist.github.com/lsblakk/5568843
ln -s 5568843/gistfile1.py merge_help.py
  • Open two terminal windows, be in the top dir of your cloned repos in both
  • In one of them run the helper script (in the other you can run the manual steps: tagging, pushing, etc):
python merge_help.py
# follow instructions in script combined with wiki commands

mozilla-central tag/bump from 129 to 130

Preparation and Tagging

  • Send note to dev-planning and #developers announcing that the merge is about to start
cd ~/Mozilla/mozilla-central
hg pull
hg up
hg tag FIREFOX_AURORA_129_BASE
  • Script will do version bumps

Verify & Commit Your Changes

# check the diffs to ensure nothing additional has been changed
hg diff 
hg commit -m "Merging in version bump NO BUG"
hg out
hg push
  • Announce to dev-planning and #developers that the m-c bump is completed

mozilla-aurora 54 to mozilla-beta uplift

Tag mozilla-aurora

cd ~/Mozilla/mozilla-aurora
hg tag -m "Tagging for mozilla-aurora->mozilla-beta uplift CLOSED TREE DONTBUILD" FIREFOX_BETA_54_BASE
hg out
# review
hg push

Tagging and closing old beta

cd ~/mozilla/mozilla-beta
hg tag -m "Tagging end of BETA128 CLOSED TREE" FIREFOX_BETA_128_END
hg commit --close-branch -m 'closing old head CLOSED TREE'
hg out
hg push

Pull from Aurora into Beta

hg pull -u -r FIREFOX_BETA_54_BASE http://hg.mozilla.org/releases/mozilla-aurora
  • Script does version bumps

Verify & Commit version bumps changes

hg commit -m "Merging in version bumps NO BUG CLOSED TREE ba=release"
hg out
  • Script does branding changes

Verify & Commit branding changes

hg commit -m "Merging in branding changes NO BUG CLOSED TREE ba=release"
hg out

L10n data changes

  • l10n-drivers can file bugs post-merge to enable new locales, we'll revert mobile & desktop for now in order to not pull up locales which are not ready for beta
#  Note: for FF23 aurora-> beta, do not revert the android multilocale - see bug 877837
hg revert -r FIREFOX_BETA_128_END browser/locales/all-locales
hg revert -r FIREFOX_BETA_128_END mobile/android/locales/*-locales

Commit l10n changes

hg commit -m "Merging in l10n changes NO BUG CLOSED TREE ba=release"
hg out

Clobber & push

  • Use the Regular Clobbers @ clobberer to clobber all beta builders and then...
# ping Standard8 in #r-d to warn about push
hg push -f

mozilla-central 129 to mozilla-aurora uplift

Don't forget to throttle the Aurora channel

  • Use this Bugzilla template to file a bug requesting the disabling of Aurora updates (eg: bug 700794) - until we have sign off from QA
    • Make sure QA is aware (an email to r-d is best)

Tagging and closing old aurora

cd ~/mozilla/mozilla-aurora
hg tag -m "Tagging for mozilla-central->mozilla-aurora uplift CLOSED TREE" FIREFOX_AURORA_54_END
hg commit --close-branch -m 'closing old head CLOSED TREE DONTBUILD'
hg out
hg push

Pull from m-c into Aurora

hg pull -u -r FIREFOX_AURORA_129_BASE http://hg.mozilla.org/mozilla-central
  • Script will do version bumps

Verify & Commit Version Bumps

# check the diffs to ensure nothing additional has been changed
hg diff 
hg commit -m "Merging in version bump NO BUG CLOSED TREE"
hg out
  • Script will do branding changes

Verify & Commit branding changes

hg commit -m "Merging in branding changes NO BUG CLOSED TREE ba=release"
hg out
  • Script will disable profiling changes

Verify & Commit profiling changes

hg diff
hg commit -m "Disable profiling on Aurora NO BUG CLOSED TREE ba=release"
hg out

Verify & Commit mozconfig dtrace & instruments changes

hg diff
hg commit -m "Remove dtrace & instruments in mozconfigs on Aurora as per bug 748669 CLOSED TREE ba=release"
hg out

L10n data changes

# revert to previous Aurora locales - l10n drivers can file post-merge bugs to add new locales
hg revert -r FIREFOX_AURORA_54_END browser/locales/*-locales
hg revert -r FIREFOX_AURORA_54_END mobile/android/locales/*-locales

Verify & Commit l10n changes

$ hg commit -m "Merging in l10n changes NO BUG CLOSED TREE ba=release"
$ hg out

Clobber & push

  • Use the Regular Clobbers @ clobberer to clobber all aurora builders and then...
# ping Standard8 (or TB driver) in #r-d to warn about push
hg push -f

Completing the Merge

  • Email dev.planning and let them know the merge is complete
  • Notify #developers
  • re-open Aurora, Beta trees
  • Update the merge docs as needed to keep them up to date for next merge day
  • Make sure you did file the bug on Aurora update throttling
  • New: remind Jorge that he needs to prevent an add-on compatibility bump for the hotfix add-ons
  • Initiate the process of uplifting sec bugs (up to what sec level needed?) for this release to b2g branch(es) [docs coming]

Change Template Version Numbers

Now that everything has been bumped edit the following so our Channel Notes and other wiki pages have the correct info and queries now (increment by 1)