Skip to content

Latest commit

 

History

History
83 lines (66 loc) · 6.08 KB

CONTRIBUTING.md

File metadata and controls

83 lines (66 loc) · 6.08 KB

Contributing to OpenEBS Maya

OpenEBS uses the standard GitHub pull requests process to review and accept contributions. There are several areas that could use your help. For starters, you could help in improving the sections in this document by either creating a new issue describing the improvement or submitting a pull request to this repository. The issues for the various OpenEBS components (including maya components) are maintained in openebs/openebs repository.

Steps to Contribute

OpenEBS is an Apache 2.0 Licensed project and all your commits should be signed with Developer Certificate of Origin. See Sign your work.

  • Find an issue to work on or create a new issue. The issues are maintained at openebs/openebs. You can pick up from a list of good-first-issues.
  • Claim your issue by commenting your intent to work on it to avoid duplication of efforts.
  • Fork the repository on GitHub.
  • Create a branch from where you want to base your work (usually master).
  • Make your changes. If you are working on code contributions, please see Setting up the Development Environment.
  • Relevant coding style guidelines are the Go Code Review Comments and the Formatting and style section of Peter Bourgon's Go: Best Practices for Production Environments.
  • Commit your changes by making sure the commit messages convey the need and notes about the commit.
  • Push your changes to the branch in your fork of the repository.
  • Submit a pull request to the original repository. See Pull Request checklist.

Pull Request Checklist

  • Rebase to the current master branch before submitting your pull request.
  • Commits should be as small as possible. Each commit should follow the checklist below:
    • For code changes, add tests relevant to the fixed bug or new feature.
    • Pass the compile and tests - includes spell checks, formatting, etc.
    • Commit header (first line) should convey what changed.
    • Commit body should include details such as why the changes are required and how the proposed changes.
    • DCO Signed.
  • If your PR is not getting reviewed or you need a specific person to review it, please reach out to the OpenEBS Contributors. See OpenEBS Community.

Sign your work

We use the Developer Certificate of Origin (DCO) as an additional safeguard for the OpenEBS project. This is a well established and widely used mechanism to assure that contributors have confirmed their right to license their contribution under the project's license. Please read dcofile. If you can certify it, then just add a line to every git commit message:

  Signed-off-by: Random J Developer <[email protected]>

Use your real name (sorry, no pseudonyms or anonymous contributions). The email id should match the email id provided in your GitHub profile. If you set your user.name and user.email in git config, you can sign your commit automatically with git commit -s.

You can also use git aliases like git config --global alias.ci 'commit -s'. Now you can commit with git ci and the commit will be signed.

Setting up your Development Environment

This project is implemented using Go and uses the standard golang tools for development and build. In addition, this project heavily relies on Docker and Kubernetes. It is expected that the contributors:

  • are familiar with working with Go;
  • are familiar with Docker containers;
  • are familiar with Kubernetes and have access to a Kubernetes cluster or Minikube to test the changes.

For setting up a Development environment on your local host, see the detailed instructions here.

Reviews against Pull Requests

A PR can be reviewed by both core as well as external contributors. Below can be referred to during reviews:

  • contributor should be familiar with maya's idiomatic standards
  • contributor should fix all the linting issues raised by the lint tools integrated with maya
  • contributor should try to implement relevant golang based unit tests for the fix/enhancement
  • contributor should try to rework on the review comments as much as possible
  • a review comment can be taken up later if it falls under any of the following categories
    • if the review comment talks about a new idiom or code pattern that is not in use by maya
    • if the review comment talks about the need to implement integration test corresponding to the fix/enhancement
    • if contributor as well as reviewer agree that it can be addressed in a different PR
  • contributor should follow below pattern in code comments when some rework needs to be done at a later point:
// TD:        -- indicates technical debt
// NBDD:      -- indicates needs integration tests in BDD format _(i.e. ginkgo tests)_
// TD: SMALL  -- indicates few/similar code changes & hence less impact
// TD: MEDIUM -- indicates code changes at multiple files & may impact certain feature
// TD: LARGE  -- indicates code changes at multiple files & has impact on more than one features