HOWTO resolve issues that are Pending Backport » History » Version 6
Loïc Dachary, 05/07/2015 11:58 AM
1 | 1 | Loïc Dachary | Issues in the state *Pending Backport* can be updated to *Resolved* as follows: |
---|---|---|---|
2 | |||
3 | 4 | Loïc Dachary | * Visit the list of issues [[marked for the release|http://tracker.ceph.com/projects/ceph-releases/wiki/HOWTO#Overview-of-the-backports-in-progress]] |
4 | 6 | Loïc Dachary | * git clone http://github.com/ceph/ceph ; cd ceph |
5 | 4 | Loïc Dachary | * Find one commit hash that needs backporting (select the most relevant one if there are more than one) and run |
6 | <pre> |
||
7 | $ cat > ../verify-backport.sh <<EOF |
||
8 | commit=$1 |
||
9 | 5 | Loïc Dachary | remote=${2:-origin} |
10 | 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 |
||
11 | 4 | Loïc Dachary | EOF |
12 | $ commit=5ba9b8f21f8010c59dd84a0ef2acfec99e4b048f ; bash ../verify-backport.sh $commit |
||
13 | 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), |
||
14 | </pre> |
||
15 | * 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): |
||
16 | <pre> |
||
17 | $ cat > ../resolve-backport.sh <<EOF |
||
18 | issue=$1 |
||
19 | 1 | Loïc Dachary | commit=$2 |
20 | redmine_key=$3 |
||
21 | 5 | Loïc Dachary | remote=$4 |
22 | backported=$(bash ../verify-backport.sh $commit $remote) |
||
23 | 4 | Loïc Dachary | curl --verbose -X PUT --header 'Content-type: application/json' --data-binary '{"issue":{"notes":"'"$backported"'"}}' 'http://tracker.ceph.com/issues/'$issue.json?key=$redmine_key |
24 | resolved_id=$(curl --silent http://tracker.ceph.com/issue_statuses.json | jq '.issue_statuses[] | select(.name=="Resolved") | .id') |
||
25 | 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 |
||
26 | firefox http://tracker.ceph.com/issues/$issue |
||
27 | EOF |
||
28 | $ bash ../resolve-backport.sh 8797 $commit $redmine_key |
||
29 | </pre> |