Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

First things first: Welcome!

Arriving on this page means that you are interested in helping us out. For that: Welcome and thank you! REEF is a community driven project and we always welcome new people joining us. We are inviting contributions in many forms to all parts of the project, including:

  • Bug reports regarding the software, the documentation, the website, guides like this, etc.
  • Graphics (for instance, we don't have a logo yet).
  • Documentation updates, tutorials, examples.
  • Code: Patches, new features, etc

...

Getting started: Join the community.

The first step is to join the community by joining our mailing list . This is where all discussions regarding the project are happening, where we answer each other's questions and where you will find a friendly bunch to welcome you. 

If you want to work on the REEF code base, it is a good idea to learn how to compile and test REEF

Finding things to work on

At any given time, there is any number of open, unassigned issues on REEF. There is also a shorter list of open issues which are good for beginners. Note that that list doesn't only contain coding tasks, but also documentation, graphics work, the website and so on. We use JIRA to manage all open todos for the project, software or otherwise. However, some of the items on that list might since have become obsolete or such. Hence, it is always a good idea to get in touch with the rest of the community on the mailing list before getting started.

 Code contribution process

...

An important part of the process comes before you start the contribution process. Most issues should first be brought up in the dev@reef.incubator.apache.org mailing list. If you haven't done so yet, subscribe to the list. After discussion, you or one of the other developers will create an Issue on ASF JIRA. Again, create an account if you don't have one. Write a succinct description of the Issue, making sure to incorporate any discussion from the mailing list.

Assign the JIRA you've chosen to yourself. This way you're letting the rest of developers know that you're working on it, so that nobody else will start working on it in parallel.

And once you are ready to make changes, have a look at the coding guidelines to make sure your code agrees with the rest of REEF.

...

REEF uses GitHub's Pull Requests as the main method to accept changes: you fork REEF into your own repository, make changes, and then send a pull request to the GitHub repository. In more detail:

  1. Fork repository
  2. Create branch
  3. Make changes in your local machine
  4. Merge the master branch into your branch
  5. Push commits into the your remote repo (forked)Prepare the commits for the pull request
  6. Send a pull request.
  7. Participate in the code review.

1. Fork repository

First, you need to fork the REEF repository. Go to the Github repository mirrored from ASF, and click "Fork" button. Then you will have your own repository. Clone this repository to your local machine:

Code Block
languagetext
$ git clone https://github.com/{your_alias}/incubator-reef.git

Then, add the apache GitHub repository as upstream:

Code Block
languagetext
$ git remote add upstream https://github.com/apache/incubator-reef.git

A correct git configuration should look similar to the following, with an origin and upstream:

Code Block
languagetext
$ git remote -v
origin https://github.com/{your_alias}/incubator-reef.git (fetch)
origin https://github.com/{your_alias}/incubator-reef.git (push)
upstream https://github.com/apache/incubator-reef.git (fetch)
upstream https://github.com/apache/incubator-reef.git (push)

If you have an `apache.org` email address, now is the time to configure git to use it:

Code Block
languagetext
$ git config user.name "My Name Here"
$ git config user.email myusername@apache.org

2. Create a branch to work on

Before making changes, you have to make sure the issue to resolve (e.g. fix a bug, implement a new feature, etc) is registered in the REEF JIRA. Create a branch to address the issue on your own. The name of the branch should reference the issue, e.g., REEF-{issue_number}. You can take a look how others name their branches.

...

Write the code and make commits as usual. Make sure all new files contain the ASF licensing header.

Make sure to run all tests when you complete your change to avoid any regression. For instructions, see Java build instructions and C# build instructions.

4. Merge the master branch into your branch

...

Resolve the conflicts if exist. Test with the merged code so that it does not break the system. Then, check that Apache headers are in place where needed, by running RAT:

...

languagetext

...

There are several code quality checks executed as part of the build. If any of them fails, you can re-run it manually to clarify where the violation is. Java build instructions have instructions for running checks separately.


Finally, as a courtesy to the merger, you can rebase to master and squash all the commits from your PR into one:

...

Code Block
languagebash
pick   7387a49 Comment for first commit
squash 3371411 Comment for second commit
squash 9bf956d Comment for third commit

Chapter 3 and Chapter 7 of the Git Book contains lots of information on what this means. 

In this process, git allows you to edit the commit message for the final, squashed commit. This commit message will serve as the description of the pull request and will in all likelihood appear in verbatim in the REEF history. In other words: Spend some time making it good (smile). A common template for this commit message is:

Code Block
[REEF-JIRA_ISSUE_NUMBER] THE_TITLE_OF_THE_JIRA
 
This addressed the issue by 
  * INSERT_DESCRIPTION_OF_SOMETHING
  * INSERT_DESCRIPTION_OF_SOMETHING_ELSE
  * ...
 
JIRA:
  [REEF-JIRA_ISSUE_NUMBER](https://issues.apache.org/jira/browse/REEF-JIRA_ISSUE_NUMBER)

Pull request:
  This closes #

As you can see, we follow Markdown syntax for our commit messages. You can get a good idea how other people write their commit messages by inspecting the output of git log.

5. Push commits into the your remote repo (forked)

...

When you create a pull request, you choose the branches to compare and merge. Choose the base as apache:master and the head {your_alias}:{branch_name}. Fill out the description with what you have done. It is a good practice to start the description with "This addresses https://issues.apache.org/jira/browse/REEF-{issue_number}"The description will be the message of your one commit. Feel free to edit it if you aren't satisfied with your commit message.

Please update the JIRA issue with a link to the Pull Request. This triggers an email to the mailing list, which will hopefully result in a committer stepping up for a code review.

7. The code review

REEF follows a review-then-commit (RTC) model. We perform all our code reviews on GitHub: Community members will leave comments on your pull request and suggest changes. You can have a look at prior pull requests to get an idea of what to expect. During this process, you may want to change your code. You can do that by pushing additional commits to your branch. Don't worry about squashing the commits into one at this stage. This will be done by the committer once your code is merged into REEF.

When the code review concludesYou can push additional commits to address the feedback from the reviewer. When the status is good enough to be merged in the master branch, one of Committers will merge your work into the REEF codebase. Good job!

...

8. Merge the pull request (Committers only)

If you are committer, you can follow the steps in the Committer Guide to merge the pull request. Of course, you won't be merging your own pull requests. Nudge committers as needed to make sure everything gets merged correctly.

...