Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 1 | Contributing to VOLTHA |
| 2 | ====================== |
| 3 | |
| 4 | We'd love to accept your patches and contributions to the VOLTHA project. There are |
| 5 | just a few small guidelines you need to follow. |
| 6 | |
| 7 | Contributor License Agreement |
| 8 | ----------------------------- |
| 9 | |
| 10 | Contributions to this project must be accompanied by a Contributor License |
| 11 | Agreement. You (or your employer) retain the copyright to your contribution, |
| 12 | this simply gives us permission to use and redistribute your contributions as |
| 13 | part of the project. Head over to the `ONF CLA <https://cla.opennetworking.org/>`_ to see |
| 14 | your current agreements on file or to sign a new one. |
| 15 | |
| 16 | You generally only need to submit a CLA once, so if you've already submitted one |
| 17 | (even if it was for a different project), you probably don't need to do it |
| 18 | again. |
| 19 | |
| 20 | Guides, Rules and Best Practices |
| 21 | -------------------------------- |
| 22 | |
| 23 | VOLTHA follows `Google's Engineering Practices <https://google.github.io/eng-practices/>`_, |
| 24 | `Golang Formatting Guide <https://go.dev/doc/effective_go#formatting>`_. Use these documents as a guide when |
| 25 | writing, submitting or reviewing code. |
| 26 | VOLTHA uses gerrit to submit, review, tests and finally merge patches. |
| 27 | |
| 28 | Submitting Code |
| 29 | +++++++++++++++ |
| 30 | |
| 31 | Some additional points for developers: |
| 32 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 33 | - Submit your changes early and often. Code and design review input |
| 34 | with corrections early in the process prevent huge changes later. |
| 35 | - Please open a `jira ticket <https://jira.opencord.org/projects/VOL>`_ describing the issue/feature. |
| 36 | - While checking in changes please preface the commit message with |
| 37 | `[VOL-<jira_number]` e.g. `[VOL-4550]` to automatically link changesets, |
| 38 | jenkins jobs, etc making them self-documenting for discussions. |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 39 | |
| 40 | Steps to successful PRs |
| 41 | +++++++++++++++++++++++ |
| 42 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 43 | 1. Checkout the code base and prepare your patch. |
| 44 | 2. Workflow to modify VOLTHA code through gerrit is identical to `onos-classic` |
| 45 | and is described in `Sample Gerrit Workflow page <https://wiki.onosproject.org/display/ONOS/Sample+Gerrit+Workflow>`_ |
| 46 | 3. Before submitting your patch via `git review` please pre-screen your changes to ensure code quality. |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 47 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 48 | .. list-table:: Patch Pre-Screening |
| 49 | :widths: 10, 40 |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 50 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 51 | * - Command |
| 52 | - Description |
| 53 | * - `make lint <https://docs.voltha.org/master/howto/code/linting.html>`_ |
| 54 | - Syntax check source for problems |
| 55 | * - make sca |
| 56 | - Static Code Analysis |
| 57 | * - make test |
| 58 | - Invoke VOLTHA test suite(s) |
| 59 | * - make help |
| 60 | - Show available targets, bulk source cleanup needed for `make lint` to check everything by default. |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 61 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 62 | 4. Submitting your patch will initiate a `jenkins job <https://jenkins.opencord.org>`_ to validate changes. |
| 63 | Wait for job completion status before proceeding. |
| 64 | |
| 65 | - Job completion status will be sent to you asynchronously in email. |
| 66 | - For direct monitoring `review comment history for your patch <https://gerrit.opencord.org/q/status:open+-is:wip>`_. |
| 67 | - Search for `Jenkins Technical User <https://gerrit.opencord.org/c/voltha-docs/+/33952>`_ and click a job entry. |
| 68 | - In the top grey navigation bar, following "Dashboard", click the test suite name to view the active job dashboard history `verify_voltha-docs_unit-test <https://jenkins.opencord.org/job/verify_voltha-docs_unit-test/>`_. |
| 69 | |
| 70 | If testing fails please fix your patch with step 3 an then repeat 2 and 3, as necessary. |
| 71 | |
| 72 | **Passing CI verification is mandatory.** |
| 73 | |
| 74 | If the CI check does not start or fails and you believe the issue is |
| 75 | un-related to a changeset you can re-trigger by commenting on the |
| 76 | patch with `recheck`. |
| 77 | |
| 78 | If failures persist `ask for assistance <https://wiki.opennetworking.org/display/COM/VOLTHA>`_ in slack or a mailing list. |
| 79 | |
| 80 | 5. When comments are made to your patch please make the appropriate fixes and then |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 81 | amend your commit with `git commit --amend` and re-upload to gerrit with `git review`. |
| 82 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 83 | 6. Await review. Everyone can comment on code changes, but only Core contributors |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 84 | can give final review approval. **All changes must get at least one |
| 85 | approval**. Join one of the `communication channels <https://wiki.opennetworking.org/display/COM/VOLTHA>`_ |
| 86 | to request a review or to bring additional attention to your patch. |
| 87 | |
Andrea Campanella | 7dae5ce | 2022-03-25 16:08:15 +0100 | [diff] [blame] | 88 | Versioning |
| 89 | ++++++++++ |
| 90 | |
| 91 | All of the VOLTHA components and the charts include a VERSION file that specifies |
| 92 | the version of the service, library, protobuf, test suite included in the repository. |
| 93 | The VERSION is in the format and follows the `SemVer principles <https://semver.org>`_ |
| 94 | VOLTHA also follows the guidelines on how to increment versions as described in the |
| 95 | `SemVer specification <https://semver.org/#semantic-versioning-specification-semver>`_. |
| 96 | |
| 97 | Each increment of the VERSION file in a patch automatically triggers publishing of the repository |
| 98 | artifact, e.g. docker images, with that tag. |
| 99 | In VOLTHA we also use a `x.y.z-dev` format which identifies a non-released component (what is `master`). |
| 100 | When a patch is merged with the `-dev` suffix in the VERSION file no artifact is published except for `master` |
| 101 | docker images. The `-dev` suffix should be removed when a feature being worked on and the component |
| 102 | is ready for release. |
| 103 | |
| 104 | We expect contributions to the VOLTHA codebase to follow these rules when submitting a patch |
| 105 | and the same rules to be enforced by reviewers during the core review process. |
| 106 | |
| 107 | |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 108 | Core Contributors |
| 109 | ----------------- |
| 110 | |
| 111 | Anyone with a Gerrit account can open new issues, comment on existing issues, or |
| 112 | contribute code by opening a review. |
| 113 | |
| 114 | A **“core contributor”** is someone who can manage, approve and |
| 115 | merge patches, and create new branches in the main repository. |
| 116 | |
| 117 | Core contributors are responsible for maintaining the quality of contributions |
| 118 | to the codebase. The goal of this program is to have a diverse group of |
| 119 | individuals whose expertise in aggregate covers the entire project. |
| 120 | |
| 121 | The benefits of being a core contributor include: |
| 122 | - Increased influence of the direction of the project |
| 123 | - The ability to create branches in the main repository and after others approve it |
| 124 | merge your own code |
| 125 | - Community recognition and visibility for their contributions and expertise. |
| 126 | |
| 127 | Becoming a Core Contributor |
| 128 | +++++++++++++++++++++++++++ |
| 129 | |
| 130 | Core contributor candidates need to have a demonstrated proficiency with the |
| 131 | VOLTHA codebase and a track record of code reviews. Members of the Technical |
| 132 | Steering Team (TST) and existing core contributors will regularly invite people |
| 133 | to become new core contributors. Nominations can also be made (including |
| 134 | self-nominations) to the VOLTHA TST (`voltha-tst@opennetworking.org`) at any time. |
| 135 | |
| 136 | A good nomination will include details about who the person is (including their email |
| 137 | and Github and/or Gerrit username) and outline their experience with the VOLTHA codebase |
| 138 | and project at large. |
| 139 | Nominations are intended to start a conversation that results in a decision to |
| 140 | make the person a core contributor – anyone whose nomination is not initially |
| 141 | approved is encouraged to gain more experience with code submission and code |
| 142 | review in order to gain further mastery over the codebase. Partial approval is |
| 143 | also possible (e.g. a person may be granted the ability to handles patches only |
| 144 | on a certain repository), and full approval may be granted after the contributor |
| 145 | has gained more experience. |
| 146 | |
| 147 | New core contributors will be assigned a mentor that is either a TST member or |
| 148 | existing core contributor. The mentor will serve as the primary point of contact |
| 149 | to help onboard the new core contributors and answer any questions they have |
| 150 | with their new responsibilities. The mentor is not the only point of contact, |
| 151 | and core contributors should feel free to reach out to others if and when they |
| 152 | have questions or concerns. |
| 153 | |
| 154 | Guidelines for Core Contributors |
| 155 | ++++++++++++++++++++++++++++++++ |
| 156 | |
| 157 | Contributions in VOLTHA can should be merged after two different +1 arrive on a |
| 158 | given patch-set that is verified by CI as well. |
| 159 | For your own contributions, you now have the ability to approve and merge your |
| 160 | own code, pending that you received two other positive reviews. |
| 161 | For larger or potentially controversial reviews, please give the |
| 162 | community an opportunity (at least a few business days) to review your |
| 163 | contribution. Please always ask for comments on the #voltha-dev Slack channel. |
| 164 | **With great power comes great responsibility; please don't abuse |
| 165 | this privilege.** |
| 166 | |
| 167 | All Core Contributors have +2 and merge capabilities on all the repositories related |
| 168 | to the VOLTHA project, but we expect that they are responsible and exercise their |
| 169 | privilege **only** on patches and repositories they have expertise in and are comfortable reviewing and merging. |
| 170 | |
| 171 | To help patchset verification the VOLTHA test infrastructure offers Per-Patchset Verification Jobs |
| 172 | triggered by specific keyword used in the patch. More information can be found in the |
| 173 | `testing automation page <https://docs.voltha.org/master/testing/voltha_test_automation.html#per-patchset-verification-jobs>`_ |
| 174 | We suggest Core contributors to use these triggers when they would like more checks on a patch they are uncertain about |
| 175 | or that might have differences when applied to hardware pods. |
| 176 | |
| 177 | VOLTHA follows `Google’s best practices for code review <https://google.github.io/eng-practices/review/reviewer/>`_. |
| 178 | You should apply these guidelines strictly and with confidence when reviewing |
| 179 | submissions. |
| 180 | |
| 181 | If you are unsure about something in an issue or a review, leave a comment |
| 182 | that outlines your concerns. If a resolution is difficult to reach in the |
| 183 | comments section, the TST meetings are a good place to raise your concerns and |
| 184 | have a discussion. |
| 185 | |
| 186 | Current Core Contributors |
| 187 | +++++++++++++++++++++++++++ |
| 188 | |
| 189 | This is a list of core contributors divided by area of expertise: |
| 190 | |
| 191 | Adapter openonu and omci-lib-go: |
| 192 | |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 193 | - `Chip Boling <chip.boling@tibitcom.com>`_ |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 194 | - `Ozge Ayaz <ozge.ayaz@netsia.com>`_ |
| 195 | |
| 196 | Voltha-system-tests: |
| 197 | |
TorstenThieme | 47e59db | 2023-05-31 08:29:47 +0000 | [diff] [blame] | 198 | - to be assigned |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 199 | |
| 200 | Openolt agent: |
| 201 | |
| 202 | - `Thiyagarajan Subramani <Thiyagarajan.Subramani@radisys.com>`_ |
| 203 | - `Burak Gurdag <burak.gurdag@netsia.com>`_ |
| 204 | |
| 205 | ONOS apps: |
| 206 | |
| 207 | - `Gamze Abaka <gamze.abaka@netsia.com>`_ |
| 208 | - `Yasin Sapli <yasin.sapli@netsia.com>`_ |
| 209 | - `Tunahan Sezen <tunahan.sezen@netsia.com>`_ |
| 210 | |
| 211 | Olt adapter, rw-core: |
| 212 | |
| 213 | - `Abhilash Satish Laxmeshwar <abhilash.laxmeshwar@radisys.com>`_ |
| 214 | - `Gamze Abaka <gamze.abaka@netsia.com>`_ |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 215 | |
| 216 | Build system, makefiles, reviews: |
| 217 | |
| 218 | - `Joey Armstrong <joey@opennetworking.org>`_ |
| 219 | - `David Ferguson <daf@opennetworking.org>`_ |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 220 | |
| 221 | All of the codebase: |
| 222 | |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 223 | - `Mahir Gunyel <mahir.gunyel@netsia.com>`_ |
| 224 | - `Serkant Uluderya <serkant.uluderya@netsia.com>`_ |
| 225 | - `Amit Ghosh <Amit.Ghosh@radisys.com>`_ |
Joey Armstrong | ae15c26 | 2023-03-29 15:36:28 -0400 | [diff] [blame] | 226 | - `Suhas Gururaj Rao <suhas.gururaj@radisys.com>`_ |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 227 | |
Andrea Campanella | 4dd0422 | 2022-03-18 15:52:28 +0100 | [diff] [blame] | 228 | Community Guidelines |
| 229 | -------------------- |
| 230 | |
Joey Armstrong | a4d2723 | 2022-12-29 08:50:02 -0500 | [diff] [blame] | 231 | This project follows `Google's Open Source Community Guidelines <https://opensource.google/conduct/>`_ |
| 232 | |
Joey Armstrong | f713d7f | 2023-02-23 06:06:49 -0500 | [diff] [blame] | 233 | and ONF's `Code of Conduct <https://opennetworking.org/wp-content/themes/onf/img/onf-code-of-conduct.pdf>`_. |