blob: b7dd2590a3172bf94d4dc2fea42a2ef3096bf59c [file] [log] [blame]
Marian Harbachebeb1542019-12-13 10:42:46 +01001:linkattrs:
Edwin Kempinc500df02019-04-23 15:53:00 +02002= Gerrit Code Review - Development Processes
3
Edwin Kempin11932ad2019-04-24 15:58:02 +02004[[project-governance]]
5[[steering-committee]]
David Pursehouse7840d812019-05-28 08:58:59 +09006== Project Governance / Engineering Steering Committee
Edwin Kempin11932ad2019-04-24 15:58:02 +02007
David Pursehouse7840d812019-05-28 08:58:59 +09008The Gerrit project has an engineering steering committee (ESC) that is
9in charge of:
Edwin Kempin11932ad2019-04-24 15:58:02 +020010
Edwin Kempinef1b8112019-10-29 09:27:00 +010011* Gerrit core (the `gerrit` project) and the link:dev-core-plugins.html[core
12 plugins]
Edwin Kempin11932ad2019-04-24 15:58:02 +020013* defining the project vision and the project scope
14* maintaining a roadmap, a release plan and a prioritized backlog
Edwin Kempin099a5ec2019-04-25 16:15:14 +020015* ensuring timely design reviews
Edwin Kempin11932ad2019-04-24 15:58:02 +020016* ensuring that new features are compatible with the project vision and
Edwin Kempin099a5ec2019-04-25 16:15:14 +020017 are well aligned with other features (give feedback on new
Edwin Kempinc507dbb2020-06-08 11:53:56 +020018 link:dev-design-docs.html[design docs] within 30 calendar days)
Edwin Kempin099a5ec2019-04-25 16:15:14 +020019* approving/rejecting link:dev-design-docs.html[designs], vetoing new
20 features
Edwin Kempinf13dfa92019-05-02 13:55:43 +020021* assigning link:dev-roles.html#mentor[mentors] for approved features
Edwin Kempin11932ad2019-04-24 15:58:02 +020022* accepting new plugins as core plugins
23* making changes to the project governance process and the
Edwin Kempin099a5ec2019-04-25 16:15:14 +020024 link:dev-contributing.html#contribution-processes[contribution
25 processes]
Edwin Kempin11932ad2019-04-24 15:58:02 +020026
27The steering committee has 5 members:
28
29* 3 Googlers that are appointed by Google
30* 2 non-Google maintainers, elected by non-Google maintainers for the
31 period of 1 year (see link:#steering-committee-election[below])
32
David Pursehouse5a4ae782019-09-18 12:11:51 +090033Refer to the project homepage for the link:https://www.gerritcodereview.com/members.html#engineering-steering-committee[
Marian Harbach34253372019-12-10 18:01:31 +010034list of current committee members,role=external,window=_blank].
David Pursehoused93d2592019-05-28 09:02:17 +090035
Edwin Kempin11932ad2019-04-24 15:58:02 +020036The steering committee should act in the interest of the Gerrit project
37and the whole Gerrit community.
38
39For decisions, consensus between steering committee members and all
40other maintainers is desired. If consensus cannot be reached, decisions
41can also be made by simple majority in the steering committee (should
42be applied only in exceptional situations).
43
44The steering committee is empowered to overrule positive/negative votes
45from individual maintainers, but should do so only in exceptional
46situations after attempts to reach consensus have failed.
47
48As an integral part of the Gerrit community, the steering committee is
49committed to transparency and to answering incoming requests in a
50timely manner.
51
52[[steering-committee-election]]
53=== Election of non-Google steering committee members
54
55The election of the non-Google steering committee members happens once
56a year in May. Non-Google link:dev-roles.html#maintainer[maintainers]
57can nominate themselves by posting an informal application on the
Edwin Kempin412cf642020-04-03 14:14:02 +020058non-public mailto:gerritcodereview-community-managers@googlegroups.com[
59community manager mailing list] by end of April (deadline for 2020
60is Thu 30th of April EOD).
61
62The list with all candidates will be published at the beginning of the
63voting period (for 2020 the start of the voting is planned for Mon 4th
64of May).
65
66Keeping the candidates private during the nomination phase and
67publishing all candidates at once only at the start of the voting
68period ensures that:
69
70* people do not start voting before all candidates are known and the
71 voting period has started
72* candidates that announce their candidacy early do not have an
73 advantage
74* people are not discouraged to candidate when there are already other
75 candidates
76
77By applying to be steering committee member, the candidate confirms to
78be able to dedicate the time that is needed to fulfill this role (also
79see link:dev-roles.html#steering-committee-member[steering committee
Edwin Kempin11932ad2019-04-24 15:58:02 +020080member]).
81
82Each non-Google maintainer can vote for 2 candidates. The voting
Edwin Kempin412cf642020-04-03 14:14:02 +020083happens by posting on the
84mailto:gerritcodereview-maintainers@googlegroups.com[maintainer mailing
85list]. The voting period is 14 calendar days from the start of the
86voting (for 2020 the voting period ends on Mon 18th May EOD).
Edwin Kempin11932ad2019-04-24 15:58:02 +020087
88Google maintainers do not take part in this vote, because Google
89already has dedicated seats in the steering committee (see section
90link:steering-committee[steering committee]).
91
Edwin Kempinac69e582019-04-24 14:48:15 +020092[[contribution-process]]
93== Contribution Process
94
95See link:dev-contributing.html[here].
96
Edwin Kempin099a5ec2019-04-25 16:15:14 +020097[[design-doc-review]]
98== Design Doc Review
99
100See link:dev-design-docs.html#review[here].
101
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100102[[versioning]]
103== Semantic versioning
104
Marian Harbach34253372019-12-10 18:01:31 +0100105Gerrit follows a light link:https://semver.org/[semantic versioning scheme,role=external,window=_blank] MAJOR.MINOR[.PATCH[.HOTFIX]]
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100106format:
107
108 * MAJOR is incremented when there are substantial incompatible changes and/or
109 new features in Gerrit.
110 * MINOR is incremented when there are changes that are typically backward compatible
111 with the earlier minor version. Features can be removed following the
112 link:#deprecating-features[feature deprecation process]. Dependencies can be upgraded
113 according to the link:dev-processes.html#upgrading-libraries[libraries upgrade policy].
114 * PATCH is incremented when there are backward-compatible bug fixes in Gerrit or its
115 dependencies. When PATCH is zero, it can be omitted.
116 * HOTFIX is present only when immediately after a patch release, some urgent
117 fixes in the code or the packaging format are required but do not justify a
118 new patch release.
119
120For every MAJOR.MINOR release there is an associated stable branch that follows well defined
121link:#dev-in-stable-branches[rules of development].
122
123Within a stable branch, there are multiple MAJOR.MINOR.PATCH tags created associated to the
124bug-fix releases of that stable release.
125
126Examples:
127
128* Gerrit v3.0.0 contains breaking incompatible changes in the functionality because
129 the ReviewDb storage has been totally removed.
130* Gerrit v2.15 contains brand-new features like NoteDb, however, still supports the existing
131 ReviewDb storage for changes and thus is considered a minor release.
132* Gerrit v2.14.20 is the 20th patch-release of the stable Gerrit v2.14.* and thus does not contain
133 new features but only bug-fixes.
134
Edwin Kempinc500df02019-04-23 15:53:00 +0200135[[dev-in-stable-branches]]
136== Development in stable branches
137
138As their name suggests stable branches are intended to be stable. This means that generally
139only bug-fixes should be done on stable branches, however this is not strictly enforced and
140exceptions may apply:
141
142 * When a stable branch is initially created to prepare a new release the Gerrit community
143 discusses on the mailing list if there are pending features which should still make it into the
144 release. Those features are blocking the release and should be implemented on the stable
145 branch before the first release candidate is created.
146 * To stabilize the code before doing a major release several release candidates are created. Once
147 the first release candidate was done no more features should be accepted on the stable branch.
Edwin Kempin11932ad2019-04-24 15:58:02 +0200148 If more features are found to be required they should be discussed with the steering committee
Edwin Kempinc500df02019-04-23 15:53:00 +0200149 and should only be allowed if the risk of breaking things is considered to be low.
150 * Once a major release is done only bug-fixes and documentation updates should be done on the
151 stable branch. These updates will be included in the next minor release.
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100152 * For minor releases new features could be acceptable if the following conditions are met:
153 ** they are result of a new feature introduced through a merge of an earlier stable branch
154 ** they are justified for completing, extending or fixing an existing feature
155 ** does not involve API, user-interface changes or data migrations
156 ** is backward compatible with all existing features
157 ** the parts of the code in common with existing features are properly covered by end-to-end tests
158 ** is important to the Gerrit community and no Gerrit maintainers have raised objections.
159 * In cases of doubt or conflicting opinions on new features, it's the responsibility of the
160 steering committee to evaluate the risk of new features and make a decision based on these
161 rules and opinions from the Gerrit community.
Edwin Kempinc500df02019-04-23 15:53:00 +0200162 * The older a stable branch is the more stable it should be. This means old stable branches
163 should only receive bug-fixes that are either important or low risk. Security fixes, including
164 security updates for third party dependencies, are always considered as important and hence can
165 always be done on stable branches.
166
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100167Examples:
168
169* Gerrit v3.0.0-rc1 and v3.0.0-rc2 may contain new features and API changes without notice,
170 even if they are both cut on the same stable-3.0 branch.
171* Gerrit v2.14.8 introduced the support for ElasticSearch as a new feature. This was an exception
172 agreed amongst the Gerrit maintainers, did not touch the Lucene indexing code-base, was supported
173 by container-based E2E tests and represents a completion of an high-level feature.
174
Edwin Kempinc500df02019-04-23 15:53:00 +0200175[[backporting]]
176== Backporting to stable branches
177
178From time to time bug fix releases are made for existing stable branches.
179
180Developers concerned with stable branches are encouraged to backport or push fixes to these
181branches, even if no new release is planned. Backporting features is only possible in compliance
182with the rules link:#dev-in-stable-branches[above].
183
184Fixes that are known to be needed for a particular release should be pushed for review on that
185release's stable branch. They will then be included into the master branch when the stable branch
186is merged back.
187
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200188[[security-issues]]
189== Dealing with Security Issues
190
191If a security vulnerability in Gerrit is discovered, we place an link:#embargo[
192embargo] on it until a fixed release or mitigation is available. Fixing the
193issue is usually pursued with high priority (depends on the severity of the
194security vulnerability). The embargo is lifted and the vulnerability is
195disclosed to the community as soon as a fix release or another mitigation is
196available.
197
198[[report-security-issue]]
199=== How to report a security vulnerability?
200
201To report a security vulnerability file a
202link:https://bugs.chromium.org/p/gerrit/issues/entry?template=Security+Issue[
Marian Harbach34253372019-12-10 18:01:31 +0100203security issue,role=external,window=_blank] in the Gerrit issue tracker. The visibility of issues that are
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200204created with the `Security Issue` template is automatically restricted to
205Gerrit maintainers and a few long-term contributors. This means as a reporter
206you may not be able to see the issue once it is created. Security issues are
207created on the `ESC` component so that they will be discussed at the next
208meeting of the link:#steering-committee[Engineering Steering Committee] which
209takes place biweekly.
210
211If an existing issue is found to be a security vulnerability it should be
212turned into a security issue by:
213
214. Setting the component to `ESC`
215. Adding the labels `Security` and `NonPublic`
216
217In case of doubt, or if an issue cannot wait until the next ESC meeting,
218contact the link:#steering-committee[Engineering Steering Committee] directly
219by sending them an mailto:gerritcodereview-esc@googlegroups.com[email].
220
221If needed, the ESC will contact the reporter for additional details.
222
223[[embargo]]
224=== The Embargo
225
226Once an issue has been identified as security vulnerability, we keep it under
227embargo until a fixed release or a mitigation is available. This means that the
228issue is not discussed publicly, but only on issues with restricted visibility
229(see link:#report-security-issue[above]) and at the mailing lists of the ESC,
230community managers and Gerrit maintainers. Since the `repo-discuss` mailing
231list is public, security issues must not be discussed on this mailing list
232while the embargo is in place.
233
234The reason for keeping an embargo is to prevent attackers from taking advantage
235of a vulnerability while no fixed releases are available yet, and Gerrit
236administrators cannot make their systems secure.
237
238Once a fix release or mitigation is available, the embargo is lifted and the
239community is informed about the security vulnerability with the advise to
240address the security vulnerability immediately (either by upgrading to a fixed
241release or applying the mitigation). The information about the security
242vulnerability is disclosed via the
Marian Harbach34253372019-12-10 18:01:31 +0100243link:https://groups.google.com/d/forum/repo-discuss[repo-discuss,role=external,window=_blank] mailing list.
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200244
245[[handle-security-issue]]
246=== Handling of the Security Vulnerability
247
248. Engineering Steering Committee evaluates the security vulnerability:
249+
250The ESC discusses the security vulnerability and which actions should be taken
251to address it. One person, usually one of the Gerrit maintainers, should be
252appointed to drive and coordinate the investigation and the fix of the security
253vulnerability. This coordinator doesn't need to do all the work alone, but is
254responsible that the security vulnerability is getting fixed in a timely
255manner.
256+
257If the security vulnerability affects multiple or older releases the ESC should
258decide which of the releases should be fixed. For critical security issue we
259also consider fixing old releases that are otherwise not receiving any
260bug-fixes anymore.
261+
262It's also possible that the ESC decides that an issue is not a security issue
263and the embargo is lifted immediately.
264
265. Implementation of the security fix:
266+
267To keep the embargo intact, security fixes cannot be developed and reviewed in
268the public `gerrit` repository. In particular it's not secure to use private
269changes for implementing and reviewing security fixes (see general notes about
270link:intro-user.html[security-fixes]).
271+
272Instead security fixes should be implemented and reviewed in the non-public
273link:https://gerrit-review.googlesource.com/admin/repos/gerrit-security-fixes[
Marian Harbach34253372019-12-10 18:01:31 +0100274gerrit-security-fixes,role=external,window=_blank] repository which is only accessible by Gerrit
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200275maintainers and Gerrit community members that work on security fixes.
276+
277The change that fixes the security vulnerability should contain an integration
278test that verifies that the security vulnerability is no longer present.
279+
280Review and approval of the security fixes must be done by the Gerrit
281maintainers. Verifications must be done manually since the Gerrit CI doesn't
282build and test changes of the `gerrit-security-fixes` repository (and it
283shouldn't because everything on the CI server is public which would break
284the embargo).
285+
286Once a security fix is ready and submitted, it should be cherry-picked to all
287branches that should be fixed.
288
289. Creation of fixed releases and announcement of the security vulnerability:
290+
291A release manager should create new bug fix releases for all fixed branches.
292+
293The new releases should be tested against the security vulnerability to
294double-check that the release was built from the correct source that contains
295the fix for the security vulnerability.
296+
297Before publishing the fixed releases, an announcement to the Gerrit community
298should be prepared. The announcement should clearly describe the security
299vulnerability, which releases are affected and which releases contain the fix.
300The announcement should recommend to upgrade to fixed releases immediately.
301+
302Once all releases are ready and tested and the announcement is prepared, the
303releases should be all published at the same time. Immediately after that, the
304announcement should be sent out to the
Marian Harbach34253372019-12-10 18:01:31 +0100305link:https://groups.google.com/d/forum/repo-discuss[repo-discuss,role=external,window=_blank] mailing list.
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200306+
307This ends the embargo and any issue that discusses the security vulnerability
308should be made public.
309
310. Follow-Up
311+
312The ESC should discuss if there are any learnings from the security
313vulnerability and define action items to follow up in the
Marian Harbach34253372019-12-10 18:01:31 +0100314link:https://bugs.chromium.org/p/gerrit[issue tracker,role=external,window=_blank].
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200315
Edwin Kempinef1b8112019-10-29 09:27:00 +0100316[[core-plugins]]
317== Core Plugins
318
319See link:dev-core-plugins.html[here].
320
Edwin Kempinc500df02019-04-23 15:53:00 +0200321[[upgrading-libraries]]
322== Upgrading Libraries
323
Edwin Kempin6671edc2019-04-24 11:22:53 +0200324Changes that add new libraries or upgrade existing libraries require an approval on the
325`Library-Compliance` label. For an approval the following things are checked:
326
327* The library has a license that is suitable for use within Gerrit.
328* If the library is used within Google, the version of the library must be compatible with the
329 version that is used at Google.
330
331Only maintainers from Google can vote on the `Library-Compliance` label.
332
Edwin Kempinc500df02019-04-23 15:53:00 +0200333Gerrit's library dependencies should only be upgraded if the new version contains
334something we need in Gerrit. This includes new features, API changes as well as bug
335or security fixes.
336An exception to this rule is that right after a new Gerrit release was branched
337off, all libraries should be upgraded to the latest version to prevent Gerrit
338from falling behind. Doing those upgrades should conclude at the latest two
339months after the branch was cut. This should happen on the master branch to ensure
340that they are vetted long enough before they go into a release and we can be sure
341that the update doesn't introduce a regression.
342
343[[deprecating-features]]
344== Deprecating features
345
346Gerrit should be as stable as possible and we aim to add only features that last.
347However, sometimes we are required to deprecate and remove features to be able
348to move forward with the project and keep the code-base clean. The following process
349should serve as a guideline on how to deprecate functionality in Gerrit. Its purpose
350is that we have a structured process for deprecation that users, administrators and
351developers can agree and rely on.
352
353General process:
354
355 * Make sure that the feature (e.g. a field on the API) is not needed anymore or blocks
356 further development or improvement. If in doubt, consult the mailing list.
357 * If you can provide a schema migration that moves users to a comparable feature, do
358 so and stop here.
359 * Mark the feature as deprecated in the documentation and release notes.
360 * If possible, mark the feature deprecated in any user-visible interface. For example,
361 if you are deprecating a Git push option, add a message to the Git response if
362 the user provided the option informing them about deprecation.
363 * Annotate the code with `@Deprecated` and `@RemoveAfter(x.xx)` if applicable.
364 Alternatively, use `// DEPRECATED, remove after x.xx` (where x.xx is the version
365 number that has to be branched off before removing the feature)
366 * Gate the feature behind a config that is off by default (forcing admins to turn
367 the deprecated feature on explicitly).
368 * After the next release was branched off, remove any code that backed the feature.
369
370You can optionally consult the mailing list to ask if there are users of the feature you
371wish to deprecate. If there are no major users, you can remove the feature without
372following this process and without the grace period of one release.
373
374GERRIT
375------
376Part of link:index.html[Gerrit Code Review]
377
378SEARCHBOX
379---------