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.

Using GitHub

  1. Fork the Apache Geode mirror project on GitHub - https://github.com/apache/geode




  2. Clone the apache repository locally so you can start working:

     git clone https://github.com/apache/geode
    
  3. 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
    
  4. 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)
    
  5. Create a local develop branch (develop is where all new development work goes).

    git checkout develop
    
  6. 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



  7. Before committing and pushing your work, run the code formatter to format your code according to geode conventions

    ./gradlew spA
  8. Run any relevant tests and the basic build against your changes

    ./gradlew build
  9. 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.
  10. When work is complete, consider whether documentation needs to be updated or created due to the new feature.
  11. If/When needed to push your local work to GitHub use the following command:

     git push -u myfork feature/GEODE-41
    
  12. Open the GitHub web interface and you should see your just-pushed branch with a 'Compare & pull request' button:



  13. 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.

Accepting a Pull-request

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).


Website publishing

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.

  • No labels