-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: make contribution more newbie friendly #3102
Conversation
@zhexuany Nice work! |
@shenli More work will be done tonight. The goal of this commit is make contribution more newbie friendly. |
CONTRIBUTING.md
Outdated
|
||
This document outlines some of the conventions on development workflow, commit message formatting, contact points and other | ||
TiDB is a community driven open source project. All contributor are very welcome. The process of contributing to the TiDB project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TiDB is a community-driven open source project and welcomes any contributor.
CONTRIBUTING.md
Outdated
|
||
This document outlines some of the conventions on development workflow, commit message formatting, contact points and other | ||
TiDB is a community driven open source project. All contributor are very welcome. The process of contributing to the TiDB project | ||
may be different than many other projects you get involved in. This document outlines some conventions about development workflow, commit message formatting, contact points and other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be different from other projects that you've been involved in.
CONTRIBUTING.md
Outdated
## Contribution flow | ||
### Contributor License Agrement ### | ||
Before sending your first change to TiDB, you have to sign the CLA. PingCap only accepts the [individual contributor license agreement](https://cla-assistant.io/pingcap). | ||
This means if your organzation is the copyright holder, you can not contribute to this project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before pulling your first request to TiDB, you have to sign the CLA. It is noted that PingCAP only accepts the individual contributor license agreement, which means if your organization is the copyright holder, you can not contribute to this project.
CONTRIBUTING.md
Outdated
Before sending your first change to TiDB, you have to sign the CLA. PingCap only accepts the [individual contributor license agreement](https://cla-assistant.io/pingcap). | ||
This means if your organzation is the copyright holder, you can not contribute to this project. | ||
|
||
## Preparing a Development Enviorment for Contributing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enviorment --> Environment
CONTRIBUTING.md
Outdated
This means if your organzation is the copyright holder, you can not contribute to this project. | ||
|
||
## Preparing a Development Enviorment for Contributing | ||
The first step is fork TiDB to your own repository. After you finishing fork TiDB, you can clone the TiDB to your machine and add your own repository as a fork. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first step is to fork TiDB to your own repository. After forking TiDB,
9c516ef
to
79f1d3f
Compare
@Wenting0905 PTAL |
CONTRIBUTING.md
Outdated
@@ -1,47 +1,297 @@ | |||
# How to contribute | |||
# Contribution Guide # | |||
TiDB is a community driven open source project. All contributor are very welcome. The process of contributing to the TiDB project |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TiDB is a community-driven open source project and we welcome any contributor.
CONTRIBUTING.md
Outdated
# How to contribute | ||
# Contribution Guide # | ||
TiDB is a community driven open source project. All contributor are very welcome. The process of contributing to the TiDB project | ||
may be different than many other projects you get involved in. This document outlines some conventions about development workflow, commit message formatting, contact points and other resources to make it easier to get your contribution accepted. This document is the canonical source of truth for things like supported toolchain versions for building and testing TiDB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
different from many other projects that you've been involved in.
CONTRIBUTING.md
Outdated
This document outlines some of the conventions on development workflow, commit message formatting, contact points and other | ||
resources to make it easier to get your contribution accepted. | ||
Please submit an [issue] on github if you | ||
* find a requirement that this doc does not capture, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find a requirement that this doc does not include or meet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using capture here is identical as using meet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so why not use the more common one?
CONTRIBUTING.md
Outdated
Please submit an [issue] on github if you | ||
* find a requirement that this doc does not capture, | ||
* find other docs with references to requirements that | ||
are not simply links to this doc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this sentence mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a requirement for this doc. Sometime, contribution.md may be outdated. Under this circumstance, submitting a new issue about this doc is right practice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i find it hard to understand the 2nd point
CONTRIBUTING.md
Outdated
|
||
## Getting started | ||
## Pre submit flight checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this expression seems strange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a Metaphor. pre flight check is needed whenever you take a plane. Submit a PR is like flight. Pre checking is necessary to ensure PR in a good quality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i know the pre-flight check but i didn't get the point of using a metaphor in a documentation. i hope contributors will understand such a metaphor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, metaphor is used a lot quite in tech doc. I have read plenty of docs. Metaphor is the easiest way to convey knowledge to audience.
CONTRIBUTING.md
Outdated
Commit changes made in response to review comments to the same branch on your | ||
fork. | ||
|
||
Very small PRs are easy to review. Very large PRs are very difficult to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONe
CONTRIBUTING.md
Outdated
Commit changes made in response to review comments to the same branch on your | ||
fork. | ||
|
||
Very small PRs are easy to review. Very large PRs are very difficult to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small PRs are easy to review while large ones are difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separating for emphasizing.
CONTRIBUTING.md
Outdated
|
||
#### Squash and Merge | ||
|
||
Upon merge (by either you or your reviewer), all commits left on the review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your reviewers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
CONTRIBUTING.md
Outdated
#### Squash and Merge | ||
|
||
Upon merge (by either you or your reviewer), all commits left on the review | ||
branch should represent meaningful milestones or units of work. Use commits to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
redundant space....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
CONTRIBUTING.md
Outdated
|
||
For mass automated fixups (e.g. automated doc formatting), use one or more | ||
commits for the changes to tooling and a final commit to apply the fixup en | ||
masse. This makes reviews easier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot understand what this sentence means.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well. It is usually related with gofmt
.
8dd35be
to
32cb6e5
Compare
@Wenting0905 PTAL |
@shenli @coocood PTAL. Most advice from @Wenting0905 is token. It should be ready to merge. But more advice are welcome. |
c69d1c6
to
00df4b9
Compare
CONTRIBUTING.md
Outdated
|
||
## Getting started | ||
Before you move on, please make sure what your issue and/or pull request is. Is is a simply bug fix or a architecture changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before you move on, please make sure what your issue and/or pull request is, a simple bug fix or an architecture change.
CONTRIBUTING.md
Outdated
|
||
This is a rough outline of what a contributor's workflow looks like: | ||
Fixing bug usually come with tests. With the help of continuous integration test, patches can be easy to review. Bug fixes don't usually require a lot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing bug --> Bug fixing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug fixes is better.
CONTRIBUTING.md
Outdated
|
||
### Is this a performance improvement? | ||
|
||
When talking about performance improvement, it is always the hardest thing to review even for the experienced software engineers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance improvement is always difficult to review, even for those experienced software engineers.
CONTRIBUTING.md
Outdated
### Is this a performance improvement? | ||
|
||
When talking about performance improvement, it is always the hardest thing to review even for the experienced software engineers. | ||
Typically, for this kind of improvement, it MUST ALSO submit data that that support your argument if you want the issue to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- delete the redundant "that"
- support --> supports
CONTRIBUTING.md
Outdated
actually do better. | ||
|
||
|
||
Examples of how NOT to suggest a performance bug (these can really lead to a long review process and waste cycles): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these --> this
"This" may be better if you want to refer to the event ("not to suggest a performance bug") instead of "examples"
CONTRIBUTING.md
Outdated
git rebase upstream/master | ||
``` | ||
|
||
Branch from it: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does "it" refer to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstream/master
CONTRIBUTING.md
Outdated
#### Build | ||
|
||
```sh | ||
# Run unit test for making sure all test passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for making --> to make
CONTRIBUTING.md
Outdated
# Run unit test for making sure all test passed | ||
make dev | ||
|
||
# Build tidb-server for making sure a binary can be built |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for making --> to make
CONTRIBUTING.md
Outdated
cd $working_dir/tidb | ||
make | ||
|
||
# Chekc checklist before you move on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chekc --> Check
CONTRIBUTING.md
Outdated
```sh | ||
git commit | ||
``` | ||
Likely you'll go back and edit/build/test some more then `commit --amend` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some more what?
00df4b9
to
44aa6b8
Compare
LGTM |
@Wenting0905 @shenli PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Good Job!
It is just a proposal. More polish on the way.