SlideShare a Scribd company logo
Assign, Commit, and Review


           A developer’s guide to
           OpenStack contribution
           Luo, Zhongyue
           OpenStack APAC Conference, Shanghai
           August 11, 2012


1
TODO

    Why contribute?

    Terminologies

    Overview

    Prerequisites

    Assign

    Commit

    Review

    Summary




2
Why contribute?

    Tons of new requirements everyday when operating an IaaS
     • New customers, competitors, regulations, and technology

    Always short of skill, budget, and time
     • Need help from community

    Obvious requirements are to be contributed
     • Someone is always smarter than you in someway



     Contribute and gain respect
     • Have others pay attention to what you say



3
Terminologies

    Git
     • github.com: Code repository
     • git-review: The tool to submit code patches
     • git commit message: Description of code change

    Launchpad (https://launchpad.net)
     • Bug tracker for OpenStack projects
     • Blueprint/Bug report: Description of a requirement/problem

    Gerrit (https://review.openstack.org)
     • Standalone patch review server for git projects

    Jenkins (https://jenkins.openstack.org)
     • Continuous integration system

4
Overview




                                                 git clone




                                                             Your
                                                             code
                                                             patch


    e.g)
    git://github.com/openstack/nova
    git://github.com/openstack/quantum                       Your development
    git://github.com/openstack/cinder                          environment
    git://github.com/openstack/${project_name}




5
Overview                              gets aggregated

                                                                2
                                                    openstack-ci

                                                    ZUUL
                                                             4
                                    1                       reports
                                                                      runs tests

                       git review




    Your
                                                                             3
                                        updates
    code
    patch
                                        5
                         (link)
    Your development
      environment




6
Prerequisites
http://wiki.openstack.org/HowToContribute#If_you.27re_a_developer.2C_start_here:
Create Launchpad account

    https://launchpad.net/+login

    Also enables access to mailing list, wiki, gerrit, and jenkins




8
Sign your CLA

    Mandatory
     • Individual Contributor License Agreement

    Optional – done by your company
     • Corporate Contributor License Agreement
     • Update the list of authorized employees

    For more details
     • http://wiki.openstack.org/CLA




9
Add your name to contributors wiki

     http://wiki.openstack.org/Contributors




     2
                               (Individual CLA)
                               EchoSign transaction number
     1




10
Add your name to contributors wiki




                                              3




                                   2
                                                                                                                           1
     || ${your_name} || ${launchpad_id} || [[https://rackspace.echosign.com/verifier?tx=${EchoSign_transaction_number} |
     ${EchoSign_transaction_number}]] || ${company_name} ||




11
Join the openstack-cla team

     https://launchpad.net/~openstack-cla/+join




12
Add SSH public key to Gerrit

     https://review.openstack.org

                                    1




13
Add SSH public key to Gerrit

     GitHub's guide to SSH keys




     2


          3




14
Install git-review

     $ sudo pip install git-review




15
Assign
Key takeaway

     Ways to assign yourself work
      1. Attend IRC meetings
      2. Find bug reports on Launchpad
      3. Hack the source code

     What to write in a blueprint proposal
      • What is the current situation?
      • How will your blueprint improve this situation?
      • What are the follow ups?

     What to write in a bug description
      • Write about WHAT the problem is



17
Find out what others are having problems with

     Start with low-hanging-fruit, Triaged



     http://bugs.launchpad.net/${project_name}




18
How to assign yourself a bug report

     Find a unassigned one




                             1




19
How to assign yourself a bug report

     Not so simple with blueprints…




                       2




20
Get involved in the community

     Attend weekly IRC meetings
      • Fastest way to find work
      • Most effective way to have presence
      • #openstack-meeting on irc.freenode.net
      • http://wiki.openstack.org/Meetings

     Subscribe to the mailing lists
      • Find out the current issues in OpenStack
      • http://wiki.openstack.org/MailingLists




21
Write blueprint/bug reports of your own

     Report new features/requirements you need



     http://blueprints.launchpad.net/${project_name}




22
Commit
http://wiki.openstack.org/GerritWorkflow
Key takeaway

     One code patch should
      • be on one git branch
      • be about one blueprint/bug report
      • have a decent git commit message

     Git commit message should
      • consist of title, [blueprint/bug link], description
      • align with the blueprint/bug description
      • align with fixes done on your code patch

     What to write in a git commit message
      • Write about HOW and WHY you fixed the source code

     Code patches must be submitted by git-review

24
Git commit message example
                                                        Less than 50 char


     Remove DB access from             Fixes console/vmrc_manager.py
     compute                           import error



     Implements bp no-db-compute Fixes bug #1028748



     The description of a blue print   The description of a bugfix
     should be placed here             should be placed here




25
Send your code patch for review

     Update the master branch and rebase your branch to master
      • git checkout master
      • git fetch origin
      • git pull origin master
      • git checkout ${your_branch}
      • git rebase –i master

     You absolutely must run unittests before submission!
      • Run “./run_tests.py”

     Use git-review to submit code patch
      • git checkout ${your_branch}
      • git review

26
Some tips for using Git

     Git commands
      • Everyday GIT With 20 Commands Or So

     git-review options and functionalities
      • git review –-help

     More details about git
      • man git




27
Some tips for writing Python code

     Best Python tutorials – read every page
      • http://docs.python.org/tutorial/index.html
      • http://docs.python.org/library/index.html

     PEP8
      • Read it once everyday till you memorize all examples

     HACKING.rst
      • Coding conventions for OpenStack projects
      • Placed in base directory of every project
      • Built upon PEP8




28
Review
Key takeaway

     Take responsibility for your submits
      • Respond professionally to your comments
      • Not everyone lives on the same timezone

     When you’re not sure…
      • you understand a comment, ask anyone via IRC
      • about your code, find help for review via IRC

     How to download a patch to your local machine
         $ git review –d 10774




30
Replying to a comment




     1

31
Replying to a comment




                   4




                       2


                       3


32
Replying to a comment




     5



33
Replying to a comment




     6




     7


34
Summary

     Contribute code to have others contribute to you

     Do the prerequisites

     Get involved in the community and assign work to yourself

     Write formal git commit message with your patch

     Respond professionally to your review comments




35
Assign, Commit, and Review

More Related Content

What's hot (20)

PPTX
Docs or it didn’t happen
All Things Open
 
PPTX
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 
PPTX
Introduction to github using Egit
Yu Matsuzawa
 
PDF
Using Git Inside Eclipse, Pushing/Cloning from GitHub
AboutHydrology Slides
 
PDF
How Git and Gerrit make you more productive
Karsten Dambekalns
 
PPTX
Github basics
Radoslav Georgiev
 
PDF
Starting with Git & GitHub
Nicolás Tourné
 
PDF
Git best practices workshop
Otto Kekäläinen
 
KEY
The everyday developer's guide to version control with Git
E Carter
 
PPTX
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
PDF
Inside GitHub
err
 
PDF
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
Edureka!
 
PDF
EclipseCon 2010 tutorial: Understanding git at Eclipse
msohn
 
PDF
git and github
Darren Oakley
 
PPTX
Git within RStudio
PaulinaJedynakPhD
 
PDF
EclipseCon 2010 talk: Towards contributors heaven
msohn
 
PPTX
Hacking Git and GitHub
Edureka!
 
PDF
Intro to Git and GitHub
Matthew McCullough
 
PDF
Git Introduction Tutorial
Thomas Rausch
 
Docs or it didn’t happen
All Things Open
 
Git Tutorial For Beginners | What is Git and GitHub? | DevOps Tools | DevOps ...
Simplilearn
 
Introduction to github using Egit
Yu Matsuzawa
 
Using Git Inside Eclipse, Pushing/Cloning from GitHub
AboutHydrology Slides
 
How Git and Gerrit make you more productive
Karsten Dambekalns
 
Github basics
Radoslav Georgiev
 
Starting with Git & GitHub
Nicolás Tourné
 
Git best practices workshop
Otto Kekäläinen
 
The everyday developer's guide to version control with Git
E Carter
 
GitHub Basics - Derek Bable
"FENG "GEORGE"" YU
 
Inside GitHub
err
 
What is Git | What is GitHub | Git Tutorial | GitHub Tutorial | Devops Tutori...
Edureka!
 
EclipseCon 2010 tutorial: Understanding git at Eclipse
msohn
 
git and github
Darren Oakley
 
Git within RStudio
PaulinaJedynakPhD
 
EclipseCon 2010 talk: Towards contributors heaven
msohn
 
Hacking Git and GitHub
Edureka!
 
Intro to Git and GitHub
Matthew McCullough
 
Git Introduction Tutorial
Thomas Rausch
 

Similar to Assign, Commit, and Review (20)

PPTX
OpenStack Contribution Workflow
Sean McGinnis
 
PPTX
The OpenStack Contribution Workflow
openstackindia
 
ODP
OpenStack Contribution Process
openstackindia
 
ODP
Openstack contribution process
Syed Armani
 
PDF
Amending and Testing changes lab guide
openstackcisco
 
PDF
Osrs
Iccha Sethi
 
PPTX
Git, github and the hacktober fest
UtkarshRaj83
 
PPTX
Spring Projects Infrastructure
Roy Clarkson
 
PDF
Switching to Git
Stephen Yeargin
 
PDF
Intro to Git: a hands-on workshop
Cisco DevNet
 
PDF
Giddy Up on GitHub
Rocket Software
 
PPTX
FooConf23_Bringing the cloud back down to earth.pptx
Grace Jansen
 
PPTX
Jfokus_Bringing the cloud back down to earth.pptx
Grace Jansen
 
PDF
Rakuten openstack
Rakuten Group, Inc.
 
PDF
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
TomHalpin9
 
PDF
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
eoinhalpin99
 
PPTX
Python Automation With Gauge + Selenium + API + Jenkins
Fagun Priyadarshi
 
PPT
Open up your platform with Open Source and GitHub
Scott Graham
 
PDF
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
 
PDF
Understanding Distributed Source Control
Lorna Mitchell
 
OpenStack Contribution Workflow
Sean McGinnis
 
The OpenStack Contribution Workflow
openstackindia
 
OpenStack Contribution Process
openstackindia
 
Openstack contribution process
Syed Armani
 
Amending and Testing changes lab guide
openstackcisco
 
Git, github and the hacktober fest
UtkarshRaj83
 
Spring Projects Infrastructure
Roy Clarkson
 
Switching to Git
Stephen Yeargin
 
Intro to Git: a hands-on workshop
Cisco DevNet
 
Giddy Up on GitHub
Rocket Software
 
FooConf23_Bringing the cloud back down to earth.pptx
Grace Jansen
 
Jfokus_Bringing the cloud back down to earth.pptx
Grace Jansen
 
Rakuten openstack
Rakuten Group, Inc.
 
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
TomHalpin9
 
Leveraging the GitHub Ecosystem for Python Projects: From Hello World to Dock...
eoinhalpin99
 
Python Automation With Gauge + Selenium + API + Jenkins
Fagun Priyadarshi
 
Open up your platform with Open Source and GitHub
Scott Graham
 
Git Tutorial A Comprehensive Guide for Beginners.pdf
uzair
 
Understanding Distributed Source Control
Lorna Mitchell
 
Ad

Recently uploaded (20)

PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Digital Circuits, important subject in CS
contactparinay1
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Ad

Assign, Commit, and Review

  • 1. Assign, Commit, and Review A developer’s guide to OpenStack contribution Luo, Zhongyue OpenStack APAC Conference, Shanghai August 11, 2012 1
  • 2. TODO Why contribute? Terminologies Overview Prerequisites Assign Commit Review Summary 2
  • 3. Why contribute? Tons of new requirements everyday when operating an IaaS • New customers, competitors, regulations, and technology Always short of skill, budget, and time • Need help from community Obvious requirements are to be contributed • Someone is always smarter than you in someway  Contribute and gain respect • Have others pay attention to what you say 3
  • 4. Terminologies Git • github.com: Code repository • git-review: The tool to submit code patches • git commit message: Description of code change Launchpad (https://launchpad.net) • Bug tracker for OpenStack projects • Blueprint/Bug report: Description of a requirement/problem Gerrit (https://review.openstack.org) • Standalone patch review server for git projects Jenkins (https://jenkins.openstack.org) • Continuous integration system 4
  • 5. Overview git clone Your code patch e.g) git://github.com/openstack/nova git://github.com/openstack/quantum Your development git://github.com/openstack/cinder environment git://github.com/openstack/${project_name} 5
  • 6. Overview gets aggregated 2 openstack-ci ZUUL 4 1 reports runs tests git review Your 3 updates code patch 5 (link) Your development environment 6
  • 8. Create Launchpad account https://launchpad.net/+login Also enables access to mailing list, wiki, gerrit, and jenkins 8
  • 9. Sign your CLA Mandatory • Individual Contributor License Agreement Optional – done by your company • Corporate Contributor License Agreement • Update the list of authorized employees For more details • http://wiki.openstack.org/CLA 9
  • 10. Add your name to contributors wiki http://wiki.openstack.org/Contributors 2 (Individual CLA) EchoSign transaction number 1 10
  • 11. Add your name to contributors wiki 3 2 1 || ${your_name} || ${launchpad_id} || [[https://rackspace.echosign.com/verifier?tx=${EchoSign_transaction_number} | ${EchoSign_transaction_number}]] || ${company_name} || 11
  • 12. Join the openstack-cla team https://launchpad.net/~openstack-cla/+join 12
  • 13. Add SSH public key to Gerrit https://review.openstack.org 1 13
  • 14. Add SSH public key to Gerrit GitHub's guide to SSH keys 2 3 14
  • 15. Install git-review $ sudo pip install git-review 15
  • 17. Key takeaway Ways to assign yourself work 1. Attend IRC meetings 2. Find bug reports on Launchpad 3. Hack the source code What to write in a blueprint proposal • What is the current situation? • How will your blueprint improve this situation? • What are the follow ups? What to write in a bug description • Write about WHAT the problem is 17
  • 18. Find out what others are having problems with Start with low-hanging-fruit, Triaged http://bugs.launchpad.net/${project_name} 18
  • 19. How to assign yourself a bug report Find a unassigned one 1 19
  • 20. How to assign yourself a bug report Not so simple with blueprints… 2 20
  • 21. Get involved in the community Attend weekly IRC meetings • Fastest way to find work • Most effective way to have presence • #openstack-meeting on irc.freenode.net • http://wiki.openstack.org/Meetings Subscribe to the mailing lists • Find out the current issues in OpenStack • http://wiki.openstack.org/MailingLists 21
  • 22. Write blueprint/bug reports of your own Report new features/requirements you need http://blueprints.launchpad.net/${project_name} 22
  • 24. Key takeaway One code patch should • be on one git branch • be about one blueprint/bug report • have a decent git commit message Git commit message should • consist of title, [blueprint/bug link], description • align with the blueprint/bug description • align with fixes done on your code patch What to write in a git commit message • Write about HOW and WHY you fixed the source code Code patches must be submitted by git-review 24
  • 25. Git commit message example Less than 50 char Remove DB access from Fixes console/vmrc_manager.py compute import error Implements bp no-db-compute Fixes bug #1028748 The description of a blue print The description of a bugfix should be placed here should be placed here 25
  • 26. Send your code patch for review Update the master branch and rebase your branch to master • git checkout master • git fetch origin • git pull origin master • git checkout ${your_branch} • git rebase –i master You absolutely must run unittests before submission! • Run “./run_tests.py” Use git-review to submit code patch • git checkout ${your_branch} • git review 26
  • 27. Some tips for using Git Git commands • Everyday GIT With 20 Commands Or So git-review options and functionalities • git review –-help More details about git • man git 27
  • 28. Some tips for writing Python code Best Python tutorials – read every page • http://docs.python.org/tutorial/index.html • http://docs.python.org/library/index.html PEP8 • Read it once everyday till you memorize all examples HACKING.rst • Coding conventions for OpenStack projects • Placed in base directory of every project • Built upon PEP8 28
  • 30. Key takeaway Take responsibility for your submits • Respond professionally to your comments • Not everyone lives on the same timezone When you’re not sure… • you understand a comment, ask anyone via IRC • about your code, find help for review via IRC How to download a patch to your local machine $ git review –d 10774 30
  • 31. Replying to a comment 1 31
  • 32. Replying to a comment 4 2 3 32
  • 33. Replying to a comment 5 33
  • 34. Replying to a comment 6 7 34
  • 35. Summary Contribute code to have others contribute to you Do the prerequisites Get involved in the community and assign work to yourself Write formal git commit message with your patch Respond professionally to your review comments 35