21
The OpenStack Contribution Workflow Sean McGinnis

OpenStack Contribution Workflow

Embed Size (px)

Citation preview

Page 1: OpenStack Contribution Workflow

The OpenStack Contribution WorkflowSean McGinnis

Page 2: OpenStack Contribution Workflow

2 of 21

The BasicsAccount Setup and AgreementsLaunchpad Account Creationhttps://launchpad.net/+login

Join the OpenStack Foundation“Foundation” membership level, not “community”https://www.openstack.org/join/

Register Nick IRChttps://freenode.net//nick [desired_nick]/msg NickServ REGISTER password [email protected]

Page 3: OpenStack Contribution Workflow

3 of 21

Code Contibution SetupAccount Setup and Agreements

Gerrit Loginhttps://review.openstack.org/

Sign Contributor License Agreementhttps://review.openstack.org/#/settings/agreementshttps://wiki.openstack.org/wiki/GovernmentCLA (US Government)

Page 4: OpenStack Contribution Workflow

4 of 21

Hang out on IRC• So much of OpenStack development happens on IRC• Best way to ask questions and discuss issues• Some general channels and project specific channels

#openstack-dev#openstack-meeting#openstack-[project]

Many IRC clients available for various operating systems as well as Freenode web chat:

Clients: HexChat, LimeChat, irssiWeb: http://webchat.freenode.net/

Page 5: OpenStack Contribution Workflow

5 of 21

Join the Mailing ListLots of posts for announcements, development issues, etc.

General: openstackDevelopment: openstack-devAnnouncements: openstack-announceOperators: openstack-operators

More details and links to full list of mailing lists here:https://wiki.openstack.org/wiki/Mailing_Lists

Page 6: OpenStack Contribution Workflow

6 of 21

Project Watch ListAdd interested projects to your watch list to get notifications.Go to https://review.openstack.org/#/settings/projects:

Page 7: OpenStack Contribution Workflow

7 of 21

Add SSH KeysSSH public key must be registered to identify you when you push up code.Typically uses your default in ~/.ssh/id_rsa.pub but different key can also be used.Go to https://review.openstack.org/#/settings/ssh-keys:

Page 8: OpenStack Contribution Workflow

8 of 21

Code ReviewsReviewing code with Gerrit

One of the best places to start!

Learn from others changes.See what kinds of issues are pointed out by other reviewers.Share your expertise or just help catch basic coding issues.

Page 9: OpenStack Contribution Workflow

9 of 21

Code ReviewsGerrit Review LayoutLot’s of information!

Page 10: OpenStack Contribution Workflow

10 of 21

Code ReviewsGerrit Review Layout

Page 11: OpenStack Contribution Workflow

11 of 21

Code ReviewsGerrit Review Diff

Page 12: OpenStack Contribution Workflow

12 of 21

Code ReviewsGerrit Review Navigation and Settings

Page 13: OpenStack Contribution Workflow

13 of 21

Bug TrackingLaunchpad Bug ManagementBugs tracked on the Launchpad.net site.Overall list of all bugs in OpenStack projects:

https://bugs.launchpad.net/openstack Project specific view of bugs:https://bugs.launchpad.net/cinder

Search for bugs matching an issue you’ve found.Look for bugs you would like to work on.

Page 14: OpenStack Contribution Workflow

14 of 21

Bug TrackingWorking with bugs

Page 15: OpenStack Contribution Workflow

15 of 21

Bug TrackingBug Tags

Look for specific categories of bugs by tag.

Helpful tags like “low-hanging-fruit” or “documentation” can help you get started.

Page 16: OpenStack Contribution Workflow

16 of 21

Submitting CodeWorkflow Overview$ git clone https://github.com/openstack/nova$ cd nova$ git checkout –b bug/12345$ vi nova/my_amazing_bug_fix.py$ vi nova/tests/unit/test_myfix.py$ tox # < Don’t forget this!!$ git add . && git commit$ git review

Wait for patch feedback

$ vi nova/my_amazing_bug_fix.py$ tox –e pep8$ git add . && git commit --amend$ git review

Page 17: OpenStack Contribution Workflow

17 of 21

Submitting CodeViewing check queue status

http://status.openstack.org/zuul/

Page 18: OpenStack Contribution Workflow

18 of 21

Submitting CodeRebasing$ git checkout –b bug/12345$ vi nova/my_amazing_bug_fix.py$ git add . && git commit$ git review

Merge Conflict!

$ git checkout master$ git pull$ git checkout bug/12345$ git rebase master$ vi nova/merge_conflict_file.py$ git add nova/merge_conflict_file.py$ git rebase --continue$ git commit --amend$ git review

Page 19: OpenStack Contribution Workflow

19 of 21

Submitting CodeBug Fixes, New Features, and Small ChangesBug Fix

git checkout –b bug/12345In commit message:

Closes-bug: #12345New FeatureFile blueprint on LaunchpadSubmit spec and get approved if neededgit checkout –b feature_nameIn commit message:

Implements: blueprint blueprint_nameSmall cleanup or refactoringgit checkout –b descriptive_nameMake change and commit

Page 20: OpenStack Contribution Workflow

20 of 21

References

OpenStack Documentation• http://docs.openstack.org/

How to Contribute Wiki• https://wiki.openstack.org/wiki/How_To_Contribute Developer Manual• http://docs.openstack.org/infra/manual/developers.html

Page 21: OpenStack Contribution Workflow