github.com/midokura/kubeedge@v1.2.0-mido.0/CONTRIBUTING.md (about) 1 # Welcome 2 3 Welcome to KubeEdge! 4 5 - [Before you get started](#before-you-get-started) 6 - [Code of Conduct](#code-of-conduct) 7 - [Community Expectations](#community-expectations) 8 - [Getting started](#getting-started) 9 - [Your First Contribution](#your-first-contribution) 10 - [Find something to work on](#find-something-to-work-on) 11 - [Find a good first topic](#find-a-good-first-topic) 12 - [Work on an Issue](#work-on-an-issue) 13 - [File an Issue](#file-an-issue) 14 - [Contributor Workflow](#contributor-workflow) 15 - [Creating Pull Requests](#creating-pull-requests) 16 - [Code Review](#code-review) 17 - [Testing](#testing) 18 19 # Before you get started 20 21 ## Code of Conduct 22 23 Please make sure to read and observe our [Code of Conduct](https://github.com/kubeedge/kubeedge/blob/master/CODE_OF_CONDUCT.md). 24 25 ## Community Expectations 26 27 KubeEdge is a community project driven by its community which strives to promote a healthy, friendly and productive environment. 28 The goal of the community is to develop a cloud native edge computing platform built on top of Kubernetes to manage edge nodes and devices at scale and demonstrate resiliency, reliability in offline scenarios. To build a platform at such scale requires the support of a community with similar aspirations. 29 30 - See [Community Membership](https://github.com/kubeedge/kubeedge/blob/master/docs/getting-started/community-membership.md) for a list of various community roles. With gradual contributions, one can move up in the chain. 31 32 33 # Getting started 34 35 - Fork the repository on GitHub 36 - Read the [setup](https://github.com/kubeedge/kubeedge/blob/master/docs/setup/setup.md) for build instructions. 37 38 39 # Your First Contribution 40 41 We will help you to contribute in different areas like filing issues, developing features, fixing critical bugs and getting your work reviewed and merged. 42 43 If you have questions about the development process, feel free to jump into our [Slack Channel](https://join.slack.com/t/kubeedge/shared_invite/enQtNjc0MTg2NTg2MTk0LWJmOTBmOGRkZWNhMTVkNGU1ZjkwNDY4MTY4YTAwNDAyMjRkMjdlMjIzYmMxODY1NGZjYzc4MWM5YmIxZjU1ZDI) or join our [mailing list](https://groups.google.com/forum/#!forum/kubeedge). 44 45 ## Find something to work on 46 47 We are always in need of help, be it fixing documentation, reporting bugs or writing some code. 48 Look at places where you feel best coding practices aren't followed, code refactoring is needed or tests are missing. 49 Here is how you get started. 50 51 ### Find a good first topic 52 53 There are [multiple repositories](https://github.com/kubeedge/) within the KubeEdge organization. 54 Each repository has beginner-friendly issues that provide a good first issue. 55 For example, [kubeedge/kubeedge](https://github.com/kubeedge/kubeedge) has [help wanted](https://github.com/kubeedge/kubeedge/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) and [good first issue](https://github.com/kubeedge/kubeedge/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) labels for issues that should not need deep knowledge of the system. 56 We can help new contributors who wish to work on such issues. 57 58 Another good way to contribute is to find a documentation improvement, such as a missing/broken link. Please see [Contributing](#contributing) below for the workflow. 59 60 #### Work on an issue 61 62 When you are willing to take on an issue, you can assign it to yourself. Just reply with `/assign` or `/assign @yourself` on an issue, 63 then the robot will assign the issue to you and your name will present at `Assignees` list. 64 65 ### File an Issue 66 67 While we encourage everyone to contribute code, it is also appreciated when someone reports an issue. 68 Issues should be filed under the appropriate KubeEdge sub-repository. 69 70 *Example:* a KubeEdge issue should be opened to [kubeedge/kubeedge](https://github.com/kubeedge/kubeedge/issues). 71 72 Please follow the prompted submission guidelines while opening an issue. 73 74 # Contributor Workflow 75 76 Please do not ever hesitate to ask a question or send a pull request. 77 78 This is a rough outline of what a contributor's workflow looks like: 79 80 - Create a topic branch from where to base the contribution. This is usually master. 81 - Make commits of logical units. 82 - Make sure commit messages are in the proper format (see below). 83 - Push changes in a topic branch to a personal fork of the repository. 84 - Submit a pull request to [kubeedge/kubeedge](https://github.com/kubeedge/kubeedge). 85 - The PR must receive an approval from two maintainers. 86 87 ## Creating Pull Requests 88 89 Pull requests are often called simply "PR". 90 KubeEdge generally follows the standard [github pull request](https://help.github.com/articles/about-pull-requests/) process. 91 To submit a proposed change, please develop the code/fix and add new test cases. 92 After that, run these local verifications before submitting pull request to predict the pass or 93 fail of continuous integration. 94 95 * Run and pass `make verify` 96 * Run and pass `make edge_test` or `make cloud_test` 97 * Run and pass `make edge_integration_test` 98 99 In addition to the above process, a bot will begin applying structured labels to your PR. 100 101 The bot may also make some helpful suggestions for commands to run in your PR to facilitate review. 102 These `/command` options can be entered in comments to trigger auto-labeling and notifications. 103 Refer to its [command reference documentation](https://go.k8s.io/bot-commands). 104 105 ## Code Review 106 107 To make it easier for your PR to receive reviews, consider the reviewers will need you to: 108 109 * follow [good coding guidelines](https://github.com/golang/go/wiki/CodeReviewComments). 110 * write [good commit messages](https://chris.beams.io/posts/git-commit/). 111 * break large changes into a logical series of smaller patches which individually make easily understandable changes, and in aggregate solve a broader issue. 112 * label PRs with appropriate reviewers: to do this read the messages the bot sends you to guide you through the PR process. 113 114 ### Format of the commit message 115 116 We follow a rough convention for commit messages that is designed to answer two questions: what changed and why. 117 The subject line should feature the what and the body of the commit should describe the why. 118 119 ``` 120 scripts: add test codes for metamanager 121 122 this add some unit test codes to imporve code coverage for metamanager 123 124 Fixes #12 125 ``` 126 127 The format can be described more formally as follows: 128 129 ``` 130 <subsystem>: <what changed> 131 <BLANK LINE> 132 <why this change was made> 133 <BLANK LINE> 134 <footer> 135 ``` 136 137 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. 138 139 Note: if your pull request isn't getting enough attention, you can use the reach out on Slack to get help finding reviewers. 140 141 ## Testing 142 143 There are multiple types of tests. 144 The location of the test code varies with type, as do the specifics of the environment needed to successfully run the test: 145 146 * Unit: These confirm that a particular function behaves as intended. Unit test source code can be found adjacent to the corresponding source code within a given package. These are easily run locally by any developer. 147 * Integration: These tests cover interactions of package components or interactions between KubeEdge components and Kubernetes control plane components like API server. An example would be testing whether the device controller is able to create config maps when device CRDs are created in the API server. 148 * End-to-end ("e2e"): These are broad tests of overall system behavior and coherence. The e2e tests are in [kubeedge e2e](https://github.com/kubeedge/kubeedge/tree/master/tests/e2e). 149 150 Continuous integration will run these tests on PRs.