Browse Source

Merge "[DevRef] Add code review guideline"

Zuul 3 months ago
parent
commit
d144bf7593

+ 2
- 0
doc/source/contributor/gerrit.rst View File

@@ -1,3 +1,5 @@
1
+.. _code-reviews-with-gerrit:
2
+
1 3
 Code Reviews with Gerrit
2 4
 ========================
3 5
 

+ 1
- 0
doc/source/contributor/index.rst View File

@@ -58,6 +58,7 @@ Other Resources
58 58
 
59 59
    launchpad
60 60
    gerrit
61
+   manila-review-policy
61 62
 
62 63
 API Reference
63 64
 -------------

+ 107
- 0
doc/source/contributor/manila-review-policy.rst View File

@@ -0,0 +1,107 @@
1
+.. _manila-review-policy:
2
+
3
+Manila team code review policy
4
+==============================
5
+
6
+Peer code review and the OpenStack Way
7
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8
+
9
+Manila adheres to the `OpenStack code review policy and guidelines
10
+<https://docs.openstack.org/infra/manual/developers.html#peer-review>`_.
11
+Similar to other projects hosted on `git.openstack.org <http://git.openstack
12
+.org/cgit>`_, all of manila's code is curated and maintained by a small
13
+group of individuals called the "core team". The `primary core team
14
+<https://review.openstack.org/#/admin/groups/213,members>`_
15
+consists of members from diverse affiliations. There are special core teams
16
+such as the `manila release core team <https://review.openstack
17
+.org/#/admin/groups/215,members>`_ and the `manila stable maintenance core
18
+team <https://review.openstack.org/#/admin/groups/1099,members>`_ that
19
+have specific roles as the names suggest.
20
+
21
+To make a code change in openstack/manila or any of the associated code
22
+repositories (openstack/manila-image-elements, openstack/manila-specs,
23
+openstack/manila-tempest-plugin, openstack/manila-test-image,
24
+openstack/manila-ui and openstack/python-manilaclient), contributors need to
25
+follow the :ref:`Code Submission Process <code-reviews-with-gerrit>` and
26
+upload their code on the `OpenStack Gerrit <https://review.openstack.org>`_
27
+website. They can then seek reviews by adding individual members of the
28
+`manila core team <https://review.openstack.org/#/admin/groups/213,
29
+members>`_ or alert the entire core team by inviting the Gerrit group
30
+"manila-core" to the review. Anyone with a membership to the OpenStack
31
+Gerrit system may review the code change. However, only the core team can
32
+accept and merge the code change. Reviews from contributors outside the core
33
+team are encouraged. Reviewing code meticulously and often is a
34
+pre-requisite for contributors aspiring to join the core reviewer team.
35
+
36
+One or more core reviewers will take cognizance of the contribution and
37
+provide feedback, or accept the code. For the submission to be accepted, it
38
+will need a minimum of one Code-Review:+2 and one Workflow:+1 votes, along
39
+with getting a Verified:+1 vote from the CI system. If no core reviewer pays
40
+attention to a code submission, feel free to remind the team on the
41
+#openstack-manila IRC channel on irc.freenode.com. [#]_ [#]_
42
+
43
+Core code review guidelines
44
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
+
46
+By convention rather than rule, we require that a minimum of two code
47
+reviewers provide a Code-Review:+2 vote on each code submission before it is
48
+given a Workflow:+1 vote. Having two core reviewers approve a change adds
49
+diverse perspective, and is extremely valuable in case of:
50
+
51
+- Feature changes in the manila service stack
52
+- Changes to configuration options
53
+- Addition of new tests or significant test bug-fixes in manila-tempest-plugin
54
+- New features to manila-ui, manila-test-image, manila-image-elements
55
+- Bug fixes
56
+
57
+Trivial changes
58
+---------------
59
+Trivial changes are:
60
+
61
+- Continuous Integration (CI) system break-fixes that are simple,
62
+  i.e.:
63
+
64
+  - No job or test is being deleted
65
+  - Change does not break third-party CI
66
+
67
+- Documentation changes, especially typographical fixes and grammar
68
+  corrections.
69
+- Automated changes generated by tooling - translations, lower-requirements
70
+  changes, etc.
71
+
72
+We do not need two core reviewers to approve trivial changes.
73
+
74
+Affiliation of core reviewers
75
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
76
+Previously, the manila core team informally enforced a code review
77
+convention that each code change be reviewed and merged by
78
+reviewers of different affiliations. This was followed because the
79
+OpenStack Technical Committee used the diversity of
80
+affiliation of the core reviewer team as a metric for maturity of the
81
+project. However, since the Rocky release cycle, the TC has changed its view
82
+on the subject [#]_ [#]_. We believe this is a step in the right
83
+direction.
84
+
85
+While there is no strict requirement that two core reviewers accepting
86
+a code change have different affiliations. Other things being equal, we will
87
+continue to informally encourage organizational diversity by having core
88
+reviewers from different organizations. Core reviewers have the professional
89
+responsibility of avoiding conflicts of interest.
90
+
91
+Vendor code and review
92
+~~~~~~~~~~~~~~~~~~~~~~
93
+All code in the manila repositories is open-source and anyone can submit
94
+changes to these repositories as long as they seek to improve the code base.
95
+Manila supports over 30 vendor storage systems, and many of these vendors
96
+participate in the development and maintenance of their drivers. To the
97
+extent possible, core reviewers will seek out driver maintainer feedback on
98
+code changes pertaining to vendor integrations.
99
+
100
+
101
+References
102
+~~~~~~~~~~
103
+
104
+.. [#] Getting started with IRC: https://docs.openstack.org/contributors/common/irc.html
105
+.. [#] IRC guidelines: https://docs.openstack.org/infra/manual/irc.html
106
+.. [#] TC Report 18-28: https://anticdent.org/tc-report-18-28.html
107
+.. [#] TC vote to remove team diversity tags: https://review.openstack.org/#/c/579870/

Loading…
Cancel
Save