Jump to: navigation, search

Difference between revisions of "Your first patch (Zaqar)"

(Submit your patch)
(Redirected page to Zaqar/Your first patch)
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
=== Learn how we work ===
+
#REDIRECT [[Zaqar/Your_first_patch]]
 
 
* What [[Open]] means to us
 
* How our [[ReleaseCycle|Release Cycle]] works
 
* Our [[BranchModel|Branch model]]
 
* How to work with [[Bugs|Launchpad Bugs]]
 
 
 
=== Set up your contributor account ===
 
 
 
* Learn [[GerritWorkflow|how to work]] with our [http://review.openstack.org/ Gerrit review system]. Some useful tips are [https://www.youtube.com/watch?v=mT2yC6ll5Qk&feature=youtu.be in this video].
 
* Before we can accept your patches, you'll have to sign the [[How_To_Contribute#Contributors_License_Agreement|Contributors License Agreement]].
 
 
 
=== Get the code ===
 
 
 
<pre><nowiki>
 
git clone https://github.com/openstack/marconi.git
 
</nowiki></pre>
 
 
 
Check out how to set up a Marconi's basic deployment in [https://github.com/openstack/marconi Marconi's repositorie in Github].
 
 
 
=== Hack, hack, hack! ===
 
 
 
==== Pick a bug ====
 
 
 
You can start tacking some bugs from the [https://bugs.launchpad.net/marconi%20 bugs list in Launchpad]. When you find a bug you want to work on, just assign yourself.
 
Make sure to read the bug report and, if you need more information, ask the reporter to provide more details.
 
 
 
If you find a bug that it's not in the [https://bugs.launchpad.net/marconi%20 bugs list in Launchpad] (props for that!), just report it and wait for another developer to confirm it. When it's confirmed, you can start working on it.
 
 
 
To start working on your bug, make sure to follow the [[Gerrit_Workflow#Normal_Workflow|Gerrit Workflow]].
 
 
 
==== Design principles ====
 
 
 
Marconi lives by the following design principles:
 
 
 
# DRY
 
# YAGNI
 
# KISS
 
 
 
 
 
Try to stick to them when working on your patch, the reviewers will appreciate that!
 
 
 
=== Submit your patch ===
 
 
 
Once you finished coding your fix, go ahead and [[Gerrit_Workflow#Committing_Changes|submit it for review]]. Other Marconi devs will try it and make their comments, and when you get two or more +1 and a core reviewer approves it, it will get merged. Well done!
 
 
 
==== Common Problems ====
 
1. You realized that you were working in master and you HAVEN'T made any commits.
 
Solution
 
<pre>
 
git checkout -b newbranch    #if you already created the branch, omit the -b
 
git commit -a -m "Edited"
 
</pre>
 
Now all your changes are in newbranch. Problem solved!
 
 
 
2. You realized that you were working in master and you HAVE made commits to master
 
<pre>
 
git branch newbranch
 
git reset --hard HEAD~x    #x is the number of commits you have made to master. YOU WILL LOSE ANY UNCOMMITTED WORK
 
git checkout newbranch
 
</pre>
 
Your commits are now in newbranch. Problem solved!
 
 
 
3. You made multiple commits and realized that Gerrit needs one commit per patch
 
You need to squash your previous commits. Make sure you are in your branch and follow [http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html this] guide.
 
Fill in the commit message as specified on the [https://wiki.openstack.org/wiki/Gerrit_Workflow#Committing_Changes Gerrit Workflow] page
 

Latest revision as of 18:42, 5 December 2014