Project

General

Profile

HOWTO resolve issues that are Pending Backport » History » Revision 6

Revision 5 (Loïc Dachary, 05/07/2015 11:57 AM) → Revision 6/8 (Loïc Dachary, 05/07/2015 11:58 AM)

Issues in the state *Pending Backport* can be updated to *Resolved* as follows: 

 * Visit the list of issues [[marked for the release|http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO#Overview-of-the-backports-in-progress]] 
 * git clone http://github.com/ceph/ceph ; cd ceph 
 * Find one commit hash that needs backporting (select the most relevant one if there are more than one) and run 
 <pre> 
 $ cat > ../verify-backport.sh <<EOF 
 commit=$1 
 remote=${2:-origin} 
 git log --oneline --all --grep "cherry picked from commit $commit" | sed -e 's/"/ /g' | while read h message ; do echo -n "commit:$h $message (in" ; git branch --all --contains $h | grep -E '^\s+(remotes/'$remote'/dumpling|remotes/'$remote'/firefly|remotes/'$remote'/giant|remotes/'$remote'/hammer)$' | perl -pe 's:remotes/'$remote'/::; s/\n//;' ; echo -n '), ' ; done    ; echo 
 EOF 
 $ commit=5ba9b8f21f8010c59dd84a0ef2acfec99e4b048f ; bash ../verify-backport.sh $commit 
 commit:e00270b rados.py: remove Rados.__del__(); it just causes problems (in    firefly), commit:ed8c9af rados.py: remove Rados.__del__(); it just causes problems (in    giant),  
 </pre> 
 * If the list of branches in which commits cherry-picking the commit from master matches the list of branches in the *Backport* field, the issue can be marked as *Resolved* with the following (where redmine_key is the API key found in the user page of the redmine account used for backporting): 
 <pre> 
 $ cat > ../resolve-backport.sh <<EOF 
 issue=$1 
 commit=$2 
 redmine_key=$3 
 remote=$4 
 backported=$(bash ../verify-backport.sh $commit $remote) 
 curl --verbose -X PUT --header 'Content-type: application/json' --data-binary '{"issue":{"notes":"'"$backported"'"}}' 'http://tracker.ceph.com/issues/'$issue.json?key=$redmine_key 
 resolved_id=$(curl --silent http://tracker.ceph.com/issue_statuses.json | jq '.issue_statuses[] | select(.name=="Resolved") | .id') 
 curl --verbose -X PUT --header 'Content-type: application/json' --data-binary '{"issue":{"status_id":"'$resolved_id'"}}' 'http://tracker.ceph.com/issues/'$issue.json?key=$redmine_key 
 firefox http://tracker.ceph.com/issues/$issue 
 EOF 
 $ bash ../resolve-backport.sh 8797 $commit $redmine_key 
 </pre>