All changes to the Geode codebase are tracked via ASF JIRA. Anybody contributing to Geode is highly encouraged to create a JIRA issue describing the nature of the contribution. Remember that even if you start with sending us a pull request, ASF JIRA will be required anyway.
When submitting actual code to Apache Geode in the form of a patch, contributors have two alternatives: GitHub pull request or a git-format patch attached to a JIRA ticket.
This document covers the steps for GitHub pull requests, but if a contributor decides to go the JIRA + Attachment route, the review step of this document should still apply.
Fork the Apache Geode mirror project on GitHub - https://github.com/apache/geode
Clone the apache repository locally so you can start working:
git clone https://github.com/apache/geode |
After cloning add your fork as an additional remote so you can push code to your fork. Substitute your GitHub username for 'markito' in this example, or use the GitHub 'HTTPS Clone URL':
cd geode git remote add myfork https://github.com/markito/geode |
Your git remote should look like the following:
git remote -v origin https://github.com/apache/geode (fetch) origin https://github.com/apache/geode (push) myfork https://github.com/markito/geode (fetch) myfork https://github.com/markito/geode (push) |
Create a local develop branch (develop is where all new development work goes).
git checkout develop |
Then create your feature branch with the number of the JIRA task that describes your work (fix/feature). You can call the branch whatever your want (it's your fork!) but the convention is to use feature/GEODE-XXX.
git checkout develop git pull git checkout -b feature/GEODE-41 |
Before committing and pushing your work, run the code formatter to format your code according to geode conventions
./gradlew spA |
Run any relevant tests and the basic build against your changes
./gradlew build |
Complete your work and commit it.
git commit -a |
Follow the guidelines for good commit messages. Here's an example:
GEODE-526: Fix oplog unit test race condition KRF files are created asynchronously. The test needs to wait for the files to be created before checking header content. |
If/When needed to push your local work to GitHub use the following command:
git push -u myfork feature/GEODE-41 |
This will lead to the Open a pull request page with detailed information on which fork and branch you going from/to. You should add some descriptive information, if needed, and click on Create pull request. Once your PR is created, the CI system will run checks against your PR, which may take a couple of hours. You may want to create your PR as a draft PR so that you can see if your PR passes the checks before opening it up for review. All checks must pass before your PR can be merged.
The review process starts. Once approved, your PR will be need to be merged into develop. If it's not approved or requires some additional work, make changes and go back to the commit step.
Once the PR is approved, if you are a committer, you can just merge the PR using the Merge button at the bottom of the pull request. Click the arrow next to the merge button and select the appropriate merge choice (Usually squash and merge to create a single commit on develop).
The Geode website is maintained as part of the repository, within the geode-site
directory. Instructions for updating the website are in the geode-site/website/README.md
file.