|
|
(10 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
| {{Release Engineering How To|Land Buildbot Master Changes}}
| |
| This page is intended to aid you in understanding the repositories related to Mozilla Corporation Buildbot Masters and how to successfully apply patches to them.
| |
|
| |
|
| = Repositories =
| |
| * [http://hg.mozilla.org/build/buildbot buildbot] - This repository is our local copy of the upstream Buildbot code. It contains imports of upstream releases and often patches that have not made it into an official Buildbot release. Our Buildbot masters and slaves use an installed version of the code from this repository.
| |
| * [http://hg.mozilla.org/build/buildbotcustom buildbotcustom] - This repository contains many custom Factorys, Steps, Schedulers, and other non-upstreamable Buildbot code. It generally contains code that is or can be shared between Buildbot masters.
| |
| * [http://hg.mozilla.org/build/tools tools] - Our Buildbot masters also use some library functions from the build/tools Python library. Generally, this is code that is used by both Buildbot Masters as well as client-side scripts or other, non-Buildbot tools.
| |
| * [http://hg.mozilla.org/build/buildbot-configs buildbot-configs] - This repository contains Buildbot master configuration, including most branch specific things, mozconfigs, and other configuration details.
| |
|
| |
| = Branches =
| |
| Some of the aforementioned repositories are managed with different in-repo, named branches. The table below should serve as a guide to understanding them:
| |
| {| class="wikitable"
| |
| |-
| |
| ! Repository
| |
| ! Branch
| |
| ! Description
| |
| |-
| |
| | valign="middle" rowspan="4" | buildbot<br/>buildbotcustom
| |
| | default
| |
| | This branch is the first point of landing for any Buildbot changes targeting the 0.8.x masters.
| |
| |-
| |
| | production-0.8
| |
| | 0.8.x Buildbot masters track this branch. Changes should not be merged to it until you are about to update the affected masters.
| |
| |-
| |
| | buildbot-0.7
| |
| | This branch is the first point of landing for any Buildbot changes targeting the 0.7.x masters.
| |
| |-
| |
| | production-0.7
| |
| | 0.7.x Buildbot masters track this branch. Changes should not be merged to it until you are about to update the affected masters.
| |
| |-
| |
| | valign="middle" rowspan="2" | buildbot-configs
| |
| | default
| |
| | This branch is the first point of landing for any Buildbot changes targeting any masters.
| |
| |-
| |
| | production
| |
| | All Buildbot masters (regardless of Buildbot version) track this branch. Changes shuold not be merged to it until you are about to update all affected masters.
| |
| |-
| |
| | tools
| |
| | default
| |
| | Currently, this is the only used branch of the tools repository. It should be treated like the "production" branches of other repositories.
| |
| |}
| |
|
| |
| = How to Land Things, Normally =
| |
| This section works on the assumption that you have one or more reviewed and tested patches. When you do, the following procedure should be used to land them:
| |
| == Land your patches ==
| |
| <p>Land your patches on the appropriate "default" branch. For 0.8 masters this is always 'default'. For 0.7 masters it may be 'buildbot-0.7'.</p>
| |
| <p>This can be done at any time. It does not require you to touch production Buildbot masters.</p>
| |
| == Watch for errors in Preproduction. ==
| |
| <p>Our [[ReleaseEngineering/Preproduction|Preproduction systems]] run a variety of tests on landings to the default branches. They will send e-mail if any errors occur. Watch for these and backout or fix your patches appropriately.</p>
| |
|
| |
| == Merge your changes to the production branch ==
| |
| <p>When you are satisfied with the preproduction results and ready to land (ie: do the master reconfigs) you should '''merge''' your changes to the appropriate production branch. When doing so, you should be prepared to take any other tested changes from the default branch, too. See below for some helpful tips on merging.</p>
| |
|
| |
| == Update the Masters ==
| |
| The masters are already set-up to track the production branches of the repositories. After you've pushed your changes to HG you can update the checkouts and reconfig/restart as normal. All masters which track the production branch you've merged must be updated. See [[ReleaseEngineering/Managing_Buildbot_with_Fabric]] for one technique to make this easier.
| |
|
| |
| == Update the Maintenance Page ==
| |
| The [[ReleaseEngineering:Maintenance| Maintenance page]] should be updated with the details of your landings.
| |
|
| |
| == Merging Tips ==
| |
| === Previewing a Merge ===
| |
| To see which changesets will be merged without affecting your local repository, update to the production branch you plan to update, and run "hg merge -P". For example, to preview a merge from the 0.8 default branch in buildbotcustom, do the following:
| |
| hg up -r production-0.8
| |
| hg merge -P default
| |
|
| |
| To preview a merge in the same repository, but on 0.7, do the following:
| |
| hg up -r production-0.7
| |
| hg merge -P buildbot-0.7
| |
|
| |
| === Merging ===
| |
| To perform the merge, use the same merge command as above, without "-P". For example:
| |
| hg up -r production-0.8
| |
| echo "Merging from default\n" > preview_changes.txt
| |
| hg merge -P default >> preview_changes.txt #for documentation purposes
| |
| hg merge default
| |
| hg commit -l preview_changes.txt
| |
|
| |
| === Pushing ===
| |
| When pushing, be sure that you're pushing the correct branches. When working with multiple branches it's good to check 'hg out' to ensure you're only pushing what you intend to. If you have changes on other branches you do not want to push you can use "-b" to restrict which branches are pushed. For example, to only push changes on the default branch of buildbotcustom, use the following:
| |
| hg push -b default ssh://hg.mozilla.org/build/buildbotcustom
| |
|
| |
| You can also use "-b" as an argument to "hg out".
| |
|
| |
| = How to Land High Priority Things =
| |
| Sometimes we don't have time to wait for preproduction or don't wish to pull in everything else on the default branch. If you're in a situation like this you can use the following procedure to jump the queue:
| |
| * Commit your patch to the production branch '''and the default branch'''.
| |
| * Push
| |
| * Update the masters
| |
|
| |
| <p>This way, you've landed only your own patch, but still kept 'default' up to date.</p>
| |
| <p>Situations that call for this should be very rare.</p>
| |