1.9 KiB
Making a change
Development Workflow
Broadly the workflow for making a change to a charm is:
git clone http://github.com/openstack/charm-cinder
cd charm-cinder
git checkout -b bug/XXXXXX master
Make the changes you need within the charm, and then run unit and pep8 tests using tox:
tox
resolve any problems this throws up, and then commit your changes:
git add .
git commit
Commit messages should have an appropriate title, and more detail in the body; they can also refer to bugs:
Closes-Bug: #######
Partial-Bug: #######
Related-Bug: #######
Gerrit will automatically link your proposal to the bug reports on launchpad and mark them fix commited when changes are merged.
Execute pep8 and unit tests:
tox
Finally, submit your change for review (if they pass pep8 and unit tests!):
git review
This will push your proposed changes to Gerrit and provide you with a URL for the review board on http://review.openstack.org/.
To make amendments to your proposed change, update your local branch and then:
git commit --amend
git review
Stable charm updates
Any update to a stable charm must first be applied into the master branch; it should then be cherry-picked in a review for the stable branch corresponding to your target release (ensuring that any interim releases have the fix landed):
git checkout -b stable/bug/XXXX stable/YYYY
git cherry-pick -x <hash of master branch commit>
git review
Where XXXX is the launchpad bug ID corresponding to the fix you want to backport and YYYY is the release name you are targeting e.g. 16.04
Note
when cherry-picking a commit and/or modifying the commit message, always ensure that the original Change-Id is left intact.