Project

General

Profile

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

Revision 3 (Loïc Dachary, 03/26/2015 12:08 PM) → Revision 4/8 (Loïc Dachary, 03/26/2015 05:05 PM)

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

 * Visit Open the list of issues [[marked inventory for each release in the release|http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO#Overview-of-the-backports-in-progress]] *Backport* field. 
 * git clone ceph 
 * Find one commit hash that needs backporting (select Remove the most relevant one if there are more than one) end of the inventory page (for instance by selecting and run 
 <pre> 
 $ cat > ../verify-backport.sh <<EOF 
 commit=$1 
 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 --contains $h | grep -E '^\s+(dumpling|firefly|giant|hammer)$' | perl -pe 's/\n//' ; echo -n '), ' ; done    ; echo 
 EOF 
 $ commit=5ba9b8f21f8010c59dd84a0ef2acfec99e4b048f ; bash ../verify-backport.sh $commit 
 commit:e00270b rados.py: remove Rados.__del__(); cutting with the Firefox ScrapBook extension) or simply by saving the HTML and editing it just causes problems (in    firefly), commit:ed8c9af rados.py: remove Rados.__del__(); it just causes problems (in    giant),  
 </pre> manually. 
 * If Look for the list of branches issue in which commits cherry-picking the commit from master matches the list inventory of branches in each release. 
 * If a backport is *merged* for all releases, update the *Backport* field, the issue can be marked as status to *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 
 backported=$(bash ../verify-backport.sh $commit) 
 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>