HOWTO merge commits from the integration branch » History » Version 20
Loïc Dachary, 11/17/2015 12:32 PM
1 | 2 | Loïc Dachary | After the [[HOWTO run integration and upgrade tests|tests successfully]] run on the [[HOWTO populate the integration branch|integration branch]]: |
---|---|---|---|
2 | 2 | Loïc Dachary | |
3 | 12 | Loïc Dachary | h3. Get approval on a backport |
4 | 1 | Loïc Dachary | |
5 | 12 | Loïc Dachary | The backports that were done by someone in the *stable releases* team need to be approved by a developer or a lead, even after successfully passing the relevant teuthology suite. Although a discussion with the developer or the lead could be engaged before testing, it is less work for a busy developer or lead to review a backport that is known to pass integration tests. |
6 | 12 | Loïc Dachary | |
7 | 20 | Loïc Dachary | The upgrade suite must always pass before asking for approval because it may reveal problems related to rados, CephFS, rgw or rbd. |
8 | 20 | Loïc Dachary | |
9 | 6 | Loïc Dachary | * List the pull requests that have been merged in the integration branch with something like: |
10 | 6 | Loïc Dachary | <pre> |
11 | 1 | Loïc Dachary | $ git log --oneline --merges ceph/giant..ceph/giant-backports |
12 | 1 | Loïc Dachary | 538d012 Merge 4214: osd/osd_types.cc: 456: FAILED assert(m_seed < old_pg_num) |
13 | 1 | Loïc Dachary | </pre> |
14 | 12 | Loïc Dachary | * For each commit in each pull request, lookup the person who merged the backported commit in master |
15 | 12 | Loïc Dachary | ** follow the link on the commit hash of the *cherry-pick from* part of the commit message of the backport |
16 | 12 | Loïc Dachary | ** follow the link to the pull request that included this commit |
17 | 12 | Loïc Dachary | ** the person who merged the pull request was responsible for merging this commit in master |
18 | 12 | Loïc Dachary | * If there are more than one person responsible for merging the commits of a given pull request, pick one (at random if there does not seem to be a reason to chose one rather than the other) |
19 | 12 | Loïc Dachary | * Ask the person responsible for merging the commits, via a comment in the pull request: |
20 | 12 | Loïc Dachary | <pre> |
21 | 12 | Loïc Dachary | @person this backport passed the XXX suite (URL to the pulpito page for the suite), do you think it can be merged ? |
22 | 12 | Loïc Dachary | </pre> |
23 | 15 | Nathan Cutler | ** Keep in mind that if the responsible person is Josh Durgin, his position is as follows: |
24 | 15 | Nathan Cutler | <pre> |
25 | 16 | Nathan Cutler | Generally you can assume that for trivial backports, or ones with |
26 | 16 | Nathan Cutler | just trivial conflicts, I'm fine with merging them after an rbd |
27 | 16 | Nathan Cutler | suite run. |
28 | 15 | Nathan Cutler | </pre> |
29 | 12 | Loïc Dachary | * The person can either merge the pull request (her|him)self or add a comment like LGTM. |
30 | 18 | Loïc Dachary | * Assign the pull request to the person so that it shows up in (her|his) list of assigned pull requests. |
31 | 14 | Loïc Dachary | * If the person is unresponsive, the lead can be ping'ed instead. |
32 | 2 | Loïc Dachary | |
33 | 9 | Loïc Dachary | h3. Merge a pull request |
34 | 1 | Loïc Dachary | |
35 | 9 | Loïc Dachary | The backports from the integration branch can be merged (via github so that the pull requests are properly tagged as being merged) into the release branch if: |
36 | 9 | Loïc Dachary | |
37 | 9 | Loïc Dachary | * the backport was done by the original developer of the commit |
38 | 13 | Loïc Dachary | * the backport was approved by the developer or the lead (see above) |
39 | 9 | Loïc Dachary | |
40 | 9 | Loïc Dachary | Merging the pull requests goes like this: |
41 | 9 | Loïc Dachary | |
42 | 1 | Loïc Dachary | * for each pull request merged in the integration branch |
43 | 1 | Loïc Dachary | * go to the github web interface |
44 | 1 | Loïc Dachary | * click on the "Merge button" |
45 | 8 | Loïc Dachary | * add the "Reviewed-by:" field to the input box |
46 | 11 | Loïc Dachary | * when all pull requests are merged **git log --format='%H %s' --graph ceph/$release..ceph/$release-backports** must not show any commit (i.e. the integration branch must have nothing left because all cherry-picked commits are now found in the $release branch). |
47 | 1 | Loïc Dachary | * the $release-backports branch is reset to the $release branch to make it clear that it has been merged (git reset --hard ceph/$release) |
48 | 1 | Loïc Dachary | |
49 | 9 | Loïc Dachary | h3. Resolving the matching issue |
50 | 9 | Loïc Dachary | |
51 | 19 | Loïc Dachary | "ceph-workbench":http://ceph-workbench.readthedocs.org/ <code>backport-set-release --git-remote ceph --git-directory $HOME/software/ceph/ceph --github-repo ceph/ceph --github-token $github_token --redmine-url http://tracker.ceph.com --redmine-user loic --redmine-password $redmine_password</code> |
52 | 9 | Loïc Dachary | |
53 | 9 | Loïc Dachary | Note: Since the merge is not from the integration branch, the commit that has been tested won't match the SHA. This is inconvenient when trying to figure out if a mistake has been done. The content of the integration branch should be merged with a script instead of manually via the github web interface to avoid mistakes. |