Project

General

Profile

Actions

HOWTO populate the integration branch » History » Revision 10

« Previous | Revision 10/31 (diff) | Next »
Loïc Dachary, 04/10/2015 09:13 AM


Before a backported commit can be merged into the release branch, it must be tested in an integration branch. It serves two purposes:

  • Detect trivial problems that would break the upgrade tests run on the release branch (they are run at the tip of the branch, not at the latest point release)
  • Do not pollute the release branch with reverted commits (because it cannot be rebased)
  • create a giant-backport branch if it does not already exists
  • reset it to ceph/giant
  • fetch all pull requests from github
  • git merge all pull requests
  • modify the pull requests individually to fix merge conflicts (i.e. they must merge cleanly, which may involving aggregating two pull requests into a single one designed to properly resolve the conflict)
  • compile with ./autogen.sh ; ./configure ; make -j4
  • modify the pull requests individually to fix compilation errors

The following snippet can help

release=hammer
PRS="3963 4185" 
reviewer='Loic Dachary <ldachary@redhat.com>'
git checkout -b $release-backport ceph/$release
git reset --hard ceph/$release
git fetch --force ceph $(for ref in $PRS ; do echo +refs/pull/$ref/head:refs/remotes/ceph/pull/$ref/head ; echo +refs/pull/$ref/merge:refs/remotes/ceph/pull/$ref/merge ; done)
for pr in $PRS ; do eval title=$(curl --silent https://api.github.com/repos/ceph/ceph/pulls/$pr | jq .title) ; echo $title ; git --no-pager log --oneline ceph/pull/$pr/merge^1..ceph/pull/$pr/merge^2 ; git merge --no-ff -m "$(echo -e "Merge $pr: $title\n\nReviewed-by: $reviewer")" ceph/pull/$pr/head ; done
git push --force ceph $release-backports

Updated by Loïc Dachary about 9 years ago · 10 revisions