- Contributing Giude
- Before you get started
- Getting started
- Your First Contribution
- Contributor Workflow
Please make sure to read and observe our Code of Conduct.
Carina is a community project driven by its community which strives to promote a healthy, friendly and productive environment. Carina is a standard kubernetes CSI plugin. Users can use standard kubernetes storage resources like storageclass/PVC/PV to request storage media.
- Fork the repository on GitHub.
- Make your changes on your fork repository.
- Submit a PR.
We will help you to contribute in different areas like filing issues, developing features, fixing critical bugs and getting your work reviewed and merged.
If you have questions about the development process, feel free to file an issue.
We are always in need of help, be it fixing documentation, reporting bugs or writing some code. Look at places where you feel best coding practices aren't followed, code refactoring is needed or tests are missing. Here is how you get started.
There are multiple repositories within the Carina organization. Each repository has beginner-friendly issues that provide a good first issue. For example, carina-io/carina has help wanted and good first issue labels for issues that should not need deep knowledge of the system. We can help new contributors who wish to work on such issues.
Another good way to contribute is to find a documentation improvement, such as a missing/broken link. Please see Contributing below for the workflow.
When you are willing to take on an issue, just reply on the issue. The maintainer will assign it to you.
While we encourage everyone to contribute code, it is also appreciated when someone reports an issue. Issues should be filed under the appropriate Carina sub-repository.
Example: a Carina issue should be opened to carina-io/carina.
Please follow the prompted submission guidelines while opening an issue.
Please do not ever hesitate to ask a question or send a pull request.
This is a rough outline of what a contributor's workflow looks like:
- Create a topic branch from where to base the contribution. This is usually main.
- Make commits of logical units.
- Push changes in a topic branch to a personal fork of the repository.
- Submit a pull request to carina-io/carina.
Pull requests are often called simply "PR". Carina generally follows the standard github pull request process. To submit a proposed change, please develop the code/fix and add new test cases. After that, run these local verifications before submitting pull request to predict the pass or fail of continuous integration.
- Run and pass
make vet
- Run and pass
make test
To make it easier for your PR to receive reviews, consider the reviewers will need you to:
- follow good coding guidelines.
- write good commit messages.
- break large changes into a logical series of smaller patches which individually make easily understandable changes, and in aggregate solve a broader issue.
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.
carina-node: add test codes for carina-node
this add some unit test codes to improve code coverage for carina-node
Fixes #666
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.
Note: if your pull request isn't getting enough attention, you can use the reach out on WechatGroup to get help finding reviewers.
There are multiple types of tests. The location of the test code varies with type, as do the specifics of the environment needed to successfully run the test:
- 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.
- Integration: These tests cover interactions of package components or interactions between components and Kubernetes control plane components like API server.
- End-to-end ("e2e"): These are broad tests of overall system behavior and coherence.
Continuous integration will run these tests on PRs.