This guide gives the best way for contributing to Apache HAWQ. Contributing to HAWQ includes not only writing some code, it also includes helping new users on mailing list, testing releases and document improvement.
HAWQ Mailing lists
If you plan to contribute to HAWQ on an ongoing basis it is best to be subscribed to at least developer mailing list. As with any Apache Project all discussions are expected to happen there. Remember "if it didn't happen on the mailing list – it didn't happen". Follow this link to find out how to subscribe to various mailing lists.
HAWQ Repositories
- Apache HAWQ git repository (https://git-wip-us.apache.org/repos/asf/incubator-hawq.git) : Apache internal git repo.
- Github Apache HAWQ mirror (https://github.com/apache/incubator-hawq.git) : This repo is synced automatically from Apache HAWQ git repo.
HAWQ issue tracking
HAWQ uses Jira for issue tracking. All changes are discussed and reviewed in Jira before commit.
Coding conventions
HAWQ follows the PostgreSQL coding conventions: http://www.postgresql.org/docs/9.1/static/source.html
Contribution process (for contributors)
The overall contribution process is to fork a repo from the github mirror repo, and work on the forked repo for any changes. Do code review by creating pull requests.
- Fork the apache github mirror incubator-hawq repo; you will work on your own repo for new features or bug fixes
- Clone your own repository to local
- Add the apache github mirror as “upstream”
# git remote add upstream https://github.com/apache/incubator-hawq.git
- Fetch “upstream” repository
# git fetch upstream
- Merge the update of the upstream into your local master
# git checkout master && git merge upstream/master
- Push the merged local master to your remote repo
# git push origin master
- Create a feature branch “feature-awesome” to work on
# git checkout -b feature-awesome master
- Make changes and commit to local. Please format commit message as follows and feel free to add additional comments.
<jira ticket number>. <Commit Message>
Example: HAWQ-1002. Add awesome feature - Push it to your github repo
# git push --set-upstream origin feature-awesome (or git push origin feature-hawq-123) - Now you can create pull requests on github for code review.
Code review
We expect that pull requests which have been submitted on github will be reviewed by committers, but will be visible to the community for comments as well. Contributors should learn the code review criteria in order to make the changes accepted.
Code review criteria
Features should have a lot of potential use cases and benefit a lot of users
- Fixes should fix the root cause of the problem
- Easily tested and have tests associated with the commits
- Changes have been discussed on JIRA and have a JIRA linked to your change(Pull Request)
- Code follows the coding conventions
- Do not introduce potential performance regressions
Commit process (for committers)
The overall commit process is to review the pull request. If the change passes code review, get the patch and commit it to Apache git repo.
Clone the apache repository
# git clone https://git-wip-us.apache.org/repos/asf/incubator-hawq.gitAdd remote github mirror repository
# git remote add github https://github.com/apache/incubator-hawq.gitGet the pull request
# git fetch github pull/2/head:feature_awesomeCheckout master branch
# git checkout masterMerge the patch
# git merge feature_awesomeRun unit tests (more in future before committing to “develop” branch)
# make installcheck_goodPush to apache repo (note: all commits needs an Apache JIRA)
# git push originDelete the feature branch
# git branch -d feature_awesome