created by: maria abrahms modified date: classification: how to get it done contributing to...
TRANSCRIPT
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
www.rackspace.com 2
How do I get Started with OpenStack?
• Go to https: bugs.launchpad.net– https://bugs.launchpad.net/openstack-manuals : Installation,
administration, configuration, and user guides
– https://bugs.launchpad.net/openstack-api-site : API Quick Start Guides and API reference
• For a comprehensive list of OpenStack content, see https://wiki.openstack.org/wiki/Documentation
Finding an OpenStack bug
www.rackspace.com 4
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
www.rackspace.com 6
• 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 <filepath/filename>
• 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
www.rackspace.com 9
• 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 2
www.rackspace.com 11
• First, read the following article:
https://wiki.openstack.org/wiki/GitCommitMessages
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
www.rackspace.com 12
• 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
www.rackspace.com 14
TOX is there to help you
16www.rackspace.com
TOX helps identify build verification errors before you submit your content.
Who will review my content?
17www.rackspace.com
• Use the Add Reviewer option to add reviewers
• Any reviewers you add will be notified by email.
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.
• 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
www.rackspace.com 18
• Reviewers often leave comments
• Respond to comments when addressing reviewer feedback
• Make sure to publish comments so reviewers see them
Dealing with comments
www.rackspace.com 20
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
www.rackspace.com 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
www.rackspace.com 24
Abandoning a CR
25www.rackspace.com
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/<CR number>.
• 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.
THANK YOU
RACKSPACE® | 1 FANATICAL PLACE, CITY OF WINDCREST | SAN ANTONIO, TX 78218
US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM
© RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED STATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM
RACKSPACE® | 5 MILLINGTON ROAD | HAYES, UNITED KINGDOM UB3 4AZ
UK SALES: +44 (0)20 8712 6507 | UK SUPPORT: 0800 988 0300 | WWW.RACKSPACE.CO.UK