Skip to content

Latest commit

 

History

History
80 lines (52 loc) · 3.28 KB

CONTRIBUTING.md

File metadata and controls

80 lines (52 loc) · 3.28 KB

How to contribute

Thanks for your interest in contributing to PD! If you need any help or mentoring getting started, understanding the codebase, or making a PR (or anything else really), please ask on #sig-scheduling (Slack channel).

Finding something to work on

For beginners, we have prepared many suitable tasks for you. Checkout our Help Wanted issues list, in which we have also marked the difficulty level.

If you are planning something big, for example, relates to multiple components or changes current behaviors, make sure to open an issue to discuss with us before going on.

Getting started

  • Fork the repository on GitHub.
  • Read the README.md for build instructions.
  • Play with the project, submit bugs, submit patches!

Contribution flow

This is a rough outline of what a contributor's workflow looks like:

  • Create a topic branch from where you want to base your work. This is usually master.
  • Make commits of logical units and add test case if the change fixes a bug or adds new functionality.
  • Run tests and make sure all the tests are passed.
  • Make sure your commit messages are in the proper format (see below).
  • Push your changes to a topic branch in your fork of the repository.
  • Submit a pull request.
  • Your PR must receive LGTMs from two reviewers.

More specifics on the development workflow are in development workflow.

More specifics on the coding flow are in development.

Thanks for your contributions!

Code style

The coding style suggested by the Golang community is used in PD. See the style doc for details.

Please follow this style to make PD easy to review, maintain and develop.

Format of the Commit Message

We follow a rough convention for commit messages that is designed to answer two questions: what changed and why. The subject line should feature the what and the body of the commit should describe the why.

server/schedule: add comment for variable declaration

Improve documentation.

The format can be described more formally as follows:

<subsystem>: <what changed>
<BLANK LINE>
<why this change was made>
<BLANK LINE>
<footer>

The first line is the subject and should be no longer than 70 characters, the second line is always blank, and other lines should be wrapped at 80 characters. This allows the message to be easier to read on GitHub as well as in various git tools.

If the change affects more than one subsystem, you can use comma to separate them like server, pd-cilent:.

If the change affects many subsystems, you can use * instead, like *:.

For the why part, if no specific reason for the change, you can use one of some generic reasons like "Improve documentation.", "Improve performance.", "Improve robustness.", "Improve test coverage."

Signing off the Commit

The project uses DCO check and the commit message must contain a Signed-off-by line for Developer Certificate of Origin.

Use option git commit -s to sign off your commits.