Created by: Maria Abrahms Modified Date: Classification: How to get it done Contributing to OpenStack
Get a Launchpad account Join the OpenStack foundation Install Git Set up Git Config Install Git Review 2 How do I get Started with OpenStack?
Getting Set up for OpenStack 3
Go to https: bugs.launchpad.net – : Installation, administration, configuration, and user guideshttps://bugs.launchpad.net/openstack-manuals – : API Quick Start Guides and API referencehttps://bugs.launchpad.net/openstack-api-site For a comprehensive list of OpenStack content, see Finding an OpenStack bug 4
Finding a bug 5
1.Locate the source file. In most cases, the bug should say which source file is affected by the change request. 2.Ensure that you have the appropriate GitHub repo cloned to your computer, if not, clone it to your local computer. 3.Install the Git commit message hook. This ensures that the Git Commit change- id automatically gets inserted into your commit message. 4.Open the file (.xml extension) in Oxygen and make the changes. Steps to fix a bug 6
Let’s take a look at a bug 7
Cloning the GitHub repo 8
Check the git status by typing git status in a terminal window, in the appropriate git directory (the repo you cloned). The file you modified will appear. Add the file that was modified by typing git add Commit the change by typing: commit –a “commit message”. If you have the Git commit message hook installed, the change-id will automatically be added to your commit message. Submitting your changes to Gerrit 9
10
If you need to make changes to your commit or if you don’t have the commit message hook installed, amend the existing commit message by typing: git commit --amend Save the commit message and exit the text editor by hitting esc and typing :wq Type git review. If you have done everything right, this command will push your changes to Gerrit and create a new code review number (CR) for review.openstack.org. Write down the code review number that is returned so you can check the progress of your CR. Submitting your changes – part
First, read the following article: Here are the rules: Commit title can be no more than 50 characters No periods are allowed in commit titles. There must be an extra line between the commit title and commit message. Any lines in the commit message must break at 72 characters. Add the number of the bug you’re resolving in the commit message. The change-id must be at the very end of the commit message. Tips for a successful commit message 12
This is what your CR looks like in Gerrit 13
Your CR fails to pass the gateway tests Your code (content) contains extra whitespace or tabs Your commit message fails to pass the gateway tests Etc…… Things that can go wrong 14
No whitespace allowed 15
TOX is there to help you 16 TOX helps identify build verification errors before you submit your content.
Who will review my content? 17 Use the Add Reviewer option to add reviewers Any reviewers you add will be notified by .
After you have submitted your CR, you may not immediately get traction. Here are some tips and tricks on how you can get your CR reviewed: Get on the IRC channel for your project and spread the news about your CR being available. For more information, see Programs.Programs Attend weekly team meetings for your OpenStack project. Manually add a reviewer through the Gerrit UI. Offer to do OpenStack reviews yourself. Tips to get your CR reviewed 18
19
Reviewers often leave comments Respond to comments when addressing reviewer feedback Make sure to publish comments so reviewers see them Dealing with comments 20
Publishing comments 21
If the master repository has changed since you started your work, you should rebase your changes to the current state. To rebase, type the following commands git checkout master git pull origin master git checkout TOPIC-BRANCH git rebase -i master When he commit history in your branch looks correct, run git review to submit your changes to Gerrit. Rebasing your CR 22
Managing multiple dependent CRs 23 When you want to start new work that is based on the commit under the review, you can add the commit as a dependency.
Gerrit supports an edit mode which lets you edit multiple dependent CRs then push them up for review all at once. Using the edit mode is the easiest way to update multiple CRs at the same time. Updating multiple dependent CRs 24
Abandoning a CR 25 There may be situations where you need to abandon a CR. Review.openstack.org lets you abandon a change through the UI: Go to review.openstack.org/. Expand the latest patch set for your CR. Click Abandon Change. Under Abandon Message, type a reason for why are abandoning this CR. Click Abandon Change. Gerrit will archive abandoned changes so you can access them in the future.
And in the end… 26
This is what you want… 27
THANK YOU RACKSPACE® | 1 FANATICAL PLACE, CITY OF WINDCREST | SAN ANTONIO, TX US SALES: | US SUPPORT: | © RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | RACKSPACE® | 5 MILLINGTON ROAD | HAYES, UNITED KINGDOM UB3 4AZ UK SALES: +44 (0) | UK SUPPORT: |