-
Notifications
You must be signed in to change notification settings - Fork 27
Development Workflow
For code review I suggest Google review board. Currently located at https://fermicloud140.fnal.gov/reviews. Its advantage over GitHub review is that it is far more powerful.
Go to this site and register. Accessible from Fermilab network only. So need VPN for off-site access.
Install RBTools
yum install RBTools
Edit ~/.reviweboardrc
echo "REPOSITORY = \"git://github.com/HEPCloud/decisionengine.git\"" > ~/.reviewboardrc
Edit ~/.gitconfig by adding:
[reviewboard]
url = https://fermicloud140.fnal.gov/reviews
Suggested development cycle:
git clone https://github.com/HEPCloud/decisionengine
git pull
git checkout -b <my branch>
Work on you branch, periodically rebase from master
git rebase master
When ready to post, do
git commit -a
Post patch for review:
rbt post --guess-description --summary="summary" --testing-done="how I tested" --parent=master --disable-ssl-verification
The command will ask your username / password at reviewboard and will spit the URL of your review request, e.g. https://fermicloud140.fnal.gov/reviews/r/NUMBER/ . Cut&paste it into your browser. Finish review request by checking that diff looks good (upper right corner tabs). Fill in necessary additions to Description and Testig. Add Group name "decisionengine" under "Reviewers" and click "Publish"
An e-mail be sent to members of "decisionengine" group, and someone will review the request. IF you need to modify your review. Commit the change locally and run 👍
rbt post -r NUMBER --parent=master
This will post another diff to https://fermicloud140.fnal.gov/reviews/r/NUMBER. Visit the page furnish it with details of your new commit and click publish.
When review is approved.
git checkout master
git pull
git checkout <my branch>
git rebase master
git checkout master
git merge --squash <my branch>
git commit -a
Above command normally opens commit message edit dialog. When writing commit message I suggest:
- Remove all intermediate commit messages you might have made while developing your patch
- Use concise statement to summarize patch.
- Write details in the next line
- add reference to rebview board?.
Here is an example:
decisionengine/logicengine: python3 compliance changes
Replaced string.join() where appropriate
RB : https://fermicloud140.fnal.gov/reviews/r/NUMBER/
Then push to the remote:
git push origin HEAD
Assumption is: you have fixed the bug and pushed it to master using above procedure. Now we need to have a "production" branch patched.
git checkout <branch>
git pull <branch>
git checkout -b fix/<branch>/<rb number>
git cherry-pick -x <HASH of the bugix commit to master>
Fix conflicts if any
git push <remote> HEAD
Proceed to Web interface and create pull request against <branch>. is the name of your remote repository. For instance in my case:
[litvinse@orbis decisionengine]$ git remote -v
litvinse git@github.com:DmitryLitvintsev/decisionengine.git (fetch)
litvinse git@github.com:DmitryLitvintsev/decisionengine.git (push)
origin https://github.com/HEPCloud/decisionengine (fetch)
origin https://github.com/HEPCloud/decisionengine (push)
The name of remote repository is litvinse.