HOWTO merge commits from the integration branch » History » Version 15

Nathan Cutler, 07/24/2015 07:05 PM

1 2 Loic Dachary
After the [[HOWTO run integration and upgrade tests|tests successfully]] run on the [[HOWTO populate the integration branch|integration branch]]:
2 2 Loic Dachary
3 12 Loic Dachary
h3. Get approval on a backport
4 1 Loic Dachary
5 12 Loic 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 Loic Dachary
7 6 Loic Dachary
* List the pull requests that have been merged in the integration branch with something like:
8 6 Loic Dachary
9 1 Loic Dachary
$ git log --oneline --merges ceph/giant..ceph/giant-backports
10 1 Loic Dachary
538d012 Merge 4214: osd/ 456: FAILED assert(m_seed < old_pg_num)
11 1 Loic Dachary
12 12 Loic Dachary
* For each commit in each pull request, lookup the person who merged the backported commit in master
13 12 Loic Dachary
** follow the link on the commit hash of the *cherry-pick from* part of the commit message of the backport
14 12 Loic Dachary
** follow the link to the pull request that included this commit
15 12 Loic Dachary
** the person who merged the pull request was responsible for merging this commit in master
16 12 Loic 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)
17 12 Loic Dachary
* Ask the person responsible for merging the commits, via a comment in the pull request:
18 12 Loic Dachary
19 12 Loic Dachary
@person this backport passed the XXX suite (URL to the pulpito page for the suite), do you think it can be merged ?
20 12 Loic Dachary
21 15 Nathan Cutler
** Keep in mind that if the responsible person is Josh Durgin, his position is as follows:
22 15 Nathan Cutler
23 15 Nathan Cutler
Generally you can assume that for trivial backports, or ones with just trivial conflicts, I'm fine with merging them after an rbd suite run.
24 15 Nathan Cutler
25 12 Loic Dachary
* The person can either merge the pull request (her|him)self or add a comment like LGTM.
26 14 Loic Dachary
* If the person is unresponsive, the lead can be ping'ed instead.
27 2 Loic Dachary
28 9 Loic Dachary
h3. Merge a pull request
29 1 Loic Dachary
30 9 Loic 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:
31 9 Loic Dachary
32 9 Loic Dachary
* the backport was done by the original developer of the commit
33 13 Loic Dachary
* the backport was approved by the developer or the lead (see above)
34 9 Loic Dachary
35 9 Loic Dachary
Merging the pull requests goes like this:
36 9 Loic Dachary
37 1 Loic Dachary
* for each pull request merged in the integration branch
38 1 Loic Dachary
* go to the github web interface
39 1 Loic Dachary
* click on the "Merge button"
40 8 Loic Dachary
* add the "Reviewed-by:" field to the input box
41 11 Loic 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).
42 1 Loic 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)
43 1 Loic Dachary
44 9 Loic Dachary
h3. Resolving the matching issue
45 9 Loic Dachary
46 9 Loic Dachary
For each pull request that is merged:
47 9 Loic Dachary
48 9 Loic Dachary
* go to the corresponding issue that should be listed as a link in the pull request comment
49 9 Loic Dachary
* change the status of the issue to *Resolved*
50 9 Loic Dachary
51 9 Loic 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.