Ask Your Question
0

How to develop for Openstack

asked 2015-01-29 11:13:33 -0500

affo gravatar image

updated 2015-01-30 03:43:00 -0500

Hi everybody! I am starting developing a feature for OpenStack Nova.
I have already opened a blueprint on launchpad.

I read developer's guide but I think I missed an important point mainly because I don't know Gerrit, I think.

I am in the case of a __long-lived topic branch__.
My issue is that I have to work on my branch in team with other people.
How can I push changes and make them visible to my team if I do not use a fork of nova (by my github organization, in my case) and I use a clone of the official nova from OpenStack?

Moreover, I have a testing environment built with DevStack. How can I make DevStack use the changes I made if they are not pushed?

Do I have to __fork__ nova?
In these case, how does the normal workflow of commit, reviewing, rebasing work?

Thank you in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
2

answered 2015-01-29 14:46:06 -0500

larsks gravatar image

updated 2015-02-01 07:50:01 -0500

The workflow for submitting changes for inclusion in OpenStack is documented in detail at:

https://wiki.openstack.org/wiki/Gerri...

This document walks you through almost all of the steps required to submit a change. If there are particular steps in that document that you're having problems with, you may want to update your question to highlight that so that we can give you a better answer.

Update

Thanks for updating your question. Yes, if you want to share development among your team members you will probably want to maintain a clone of the Nova source somewhere that you and your team can commit to it. The easiest way to do this is using the "fork" functionality on GitHub, and then clone that repository locally:

git clone git@github.com:myusername/nova

You will probably want to add the upstream Nova repository as an additional remote, so that you can pull in new changes later on:

git remote add upstream http://github.com/openstack/nova.git

This allows you to update your local master branch from the upstream master branch like this:

git checkout master
git pull upstream master

And then rebase your feature branch:

git checkout my_feature_branch
git rebase master

You and your team can use this repository for your development work. It will probably be easiest if you create a specific branch for your development, rather than working on master. You and your team can git push changes to your repository as necessary.

When you are ready to submit a change to gerrit, you follow the Gerrit workflow described in the above link. Note that each commit you make locally counts as a separate "change" in gerrit, so if your history looks like this:

$ git log --oneline
1f9829b I can't believe I misspelled my name
21e8e10 mostly documentation changes
1e7780d fixed some obvious syntax errors
4cb8b9c ugh, forgot to return from the function
6017597 oh geez that was a terrible idea starting over
e0697ef start working on nifty new feature

You will probably want to use git rebase to squash this into a single commit with a descriptive commit message. This process is described in the "Long Lived Topic Branches" section of the Gerrit workflow documentation. You may want to have an intermediate branch where you perform these changes, which would let you preserve your original change history. When everything is set, you run:

git review

Which will post the changes to Gerrit where they can be reviewed and accepted by the upstream developers.

edit flag offensive delete link more

Comments

thank you, I edited my question. I hope I made my issue clearer

affo gravatar imageaffo ( 2015-01-30 03:43:40 -0500 )edit

thank you so much

affo gravatar imageaffo ( 2015-02-02 04:12:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-01-29 11:13:33 -0500

Seen: 201 times

Last updated: Feb 01 '15