blob: c2a1f86d5cfe8ed8430f268352257f0cef7c0df1 [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
Nasser Grainawi0f9abe32023-10-26 16:53:06 -060056a year in June. Non-Google link:dev-roles.html#maintainer[maintainers]
Edwin Kempin11932ad2019-04-24 15:58:02 +020057can nominate themselves by posting an informal application on the
Edwin Kempin412cf642020-04-03 14:14:02 +020058non-public mailto:gerritcodereview-community-managers@googlegroups.com[
Matthias Sohnd4fc7302023-11-03 09:58:43 +010059community manager mailing list] when the call for nominations is sent to
Nasser Grainawi0f9abe32023-10-26 16:53:06 -060060the maintainers list by a community manager.
Edwin Kempin412cf642020-04-03 14:14:02 +020061
62The list with all candidates will be published at the beginning of the
Nasser Grainawi0f9abe32023-10-26 16:53:06 -060063voting period.
Edwin Kempin412cf642020-04-03 14:14:02 +020064
65Keeping the candidates private during the nomination phase and
66publishing all candidates at once only at the start of the voting
67period ensures that:
68
69* people do not start voting before all candidates are known and the
70 voting period has started
71* candidates that announce their candidacy early do not have an
72 advantage
73* people are not discouraged to candidate when there are already other
74 candidates
75
76By applying to be steering committee member, the candidate confirms to
77be able to dedicate the time that is needed to fulfill this role (also
78see link:dev-roles.html#steering-committee-member[steering committee
Edwin Kempin11932ad2019-04-24 15:58:02 +020079member]).
80
81Each non-Google maintainer can vote for 2 candidates. The voting
Edwin Kempin412cf642020-04-03 14:14:02 +020082happens by posting on the
83mailto:gerritcodereview-maintainers@googlegroups.com[maintainer mailing
84list]. The voting period is 14 calendar days from the start of the
Nasser Grainawi0f9abe32023-10-26 16:53:06 -060085voting.
Edwin Kempin11932ad2019-04-24 15:58:02 +020086
87Google maintainers do not take part in this vote, because Google
88already has dedicated seats in the steering committee (see section
Marco Millere8b183b2020-09-30 12:04:31 -040089link:#steering-committee[steering committee]).
Edwin Kempin11932ad2019-04-24 15:58:02 +020090
Matthias Sohne192f942020-10-29 15:50:01 +010091If a non-Google seat on the steering committee becomes vacant before
92the current term ends, an exceptional election is conducted in order
93to replace the member(s) leaving the committee. The election will
94follow the same procedure as regular steering committee elections.
95The number of votes each maintainer gets in such exceptional election
96matches the number of seats to be filled. The term of the new member
97of the steering committee ends at the end of the current term of
98the steering committee when the next regular election concludes.
99
Edwin Kempinac69e582019-04-24 14:48:15 +0200100[[contribution-process]]
101== Contribution Process
102
103See link:dev-contributing.html[here].
104
Edwin Kempin099a5ec2019-04-25 16:15:14 +0200105[[design-doc-review]]
106== Design Doc Review
107
108See link:dev-design-docs.html#review[here].
109
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100110[[versioning]]
111== Semantic versioning
112
Marian Harbach34253372019-12-10 18:01:31 +0100113Gerrit 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 +0100114format:
115
116 * MAJOR is incremented when there are substantial incompatible changes and/or
117 new features in Gerrit.
118 * MINOR is incremented when there are changes that are typically backward compatible
119 with the earlier minor version. Features can be removed following the
120 link:#deprecating-features[feature deprecation process]. Dependencies can be upgraded
121 according to the link:dev-processes.html#upgrading-libraries[libraries upgrade policy].
122 * PATCH is incremented when there are backward-compatible bug fixes in Gerrit or its
123 dependencies. When PATCH is zero, it can be omitted.
124 * HOTFIX is present only when immediately after a patch release, some urgent
125 fixes in the code or the packaging format are required but do not justify a
126 new patch release.
127
128For every MAJOR.MINOR release there is an associated stable branch that follows well defined
129link:#dev-in-stable-branches[rules of development].
130
131Within a stable branch, there are multiple MAJOR.MINOR.PATCH tags created associated to the
132bug-fix releases of that stable release.
133
134Examples:
135
136* Gerrit v3.0.0 contains breaking incompatible changes in the functionality because
137 the ReviewDb storage has been totally removed.
138* Gerrit v2.15 contains brand-new features like NoteDb, however, still supports the existing
139 ReviewDb storage for changes and thus is considered a minor release.
140* Gerrit v2.14.20 is the 20th patch-release of the stable Gerrit v2.14.* and thus does not contain
141 new features but only bug-fixes.
142
Edwin Kempinc500df02019-04-23 15:53:00 +0200143[[dev-in-stable-branches]]
144== Development in stable branches
145
146As their name suggests stable branches are intended to be stable. This means that generally
147only bug-fixes should be done on stable branches, however this is not strictly enforced and
148exceptions may apply:
149
150 * When a stable branch is initially created to prepare a new release the Gerrit community
151 discusses on the mailing list if there are pending features which should still make it into the
152 release. Those features are blocking the release and should be implemented on the stable
153 branch before the first release candidate is created.
154 * To stabilize the code before doing a major release several release candidates are created. Once
155 the first release candidate was done no more features should be accepted on the stable branch.
Edwin Kempin11932ad2019-04-24 15:58:02 +0200156 If more features are found to be required they should be discussed with the steering committee
Edwin Kempinc500df02019-04-23 15:53:00 +0200157 and should only be allowed if the risk of breaking things is considered to be low.
158 * Once a major release is done only bug-fixes and documentation updates should be done on the
159 stable branch. These updates will be included in the next minor release.
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100160 * For minor releases new features could be acceptable if the following conditions are met:
161 ** they are result of a new feature introduced through a merge of an earlier stable branch
162 ** they are justified for completing, extending or fixing an existing feature
163 ** does not involve API, user-interface changes or data migrations
164 ** is backward compatible with all existing features
165 ** the parts of the code in common with existing features are properly covered by end-to-end tests
166 ** is important to the Gerrit community and no Gerrit maintainers have raised objections.
167 * In cases of doubt or conflicting opinions on new features, it's the responsibility of the
168 steering committee to evaluate the risk of new features and make a decision based on these
169 rules and opinions from the Gerrit community.
Edwin Kempinc500df02019-04-23 15:53:00 +0200170 * The older a stable branch is the more stable it should be. This means old stable branches
171 should only receive bug-fixes that are either important or low risk. Security fixes, including
172 security updates for third party dependencies, are always considered as important and hence can
173 always be done on stable branches.
174
Luca Milanesiob9ef6432019-08-22 15:08:26 +0100175Examples:
176
177* Gerrit v3.0.0-rc1 and v3.0.0-rc2 may contain new features and API changes without notice,
178 even if they are both cut on the same stable-3.0 branch.
179* Gerrit v2.14.8 introduced the support for ElasticSearch as a new feature. This was an exception
180 agreed amongst the Gerrit maintainers, did not touch the Lucene indexing code-base, was supported
181 by container-based E2E tests and represents a completion of an high-level feature.
182
Edwin Kempinc500df02019-04-23 15:53:00 +0200183[[backporting]]
184== Backporting to stable branches
185
186From time to time bug fix releases are made for existing stable branches.
187
188Developers concerned with stable branches are encouraged to backport or push fixes to these
189branches, even if no new release is planned. Backporting features is only possible in compliance
190with the rules link:#dev-in-stable-branches[above].
191
192Fixes that are known to be needed for a particular release should be pushed for review on that
193release's stable branch. They will then be included into the master branch when the stable branch
194is merged back.
195
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200196[[security-issues]]
197== Dealing with Security Issues
198
199If a security vulnerability in Gerrit is discovered, we place an link:#embargo[
200embargo] on it until a fixed release or mitigation is available. Fixing the
201issue is usually pursued with high priority (depends on the severity of the
202security vulnerability). The embargo is lifted and the vulnerability is
203disclosed to the community as soon as a fix release or another mitigation is
204available.
205
206[[report-security-issue]]
207=== How to report a security vulnerability?
208
209To report a security vulnerability file a
Edwin Kempin6c1f1f92023-06-20 12:30:21 +0000210link:https://issues.gerritcodereview.com/issues/new?component=1371046[
Edwin Kempin31ad78a2023-12-01 11:02:34 +0000211security issue,role=external,window=_blank] in the Gerrit issue tracker. Issues
212in the `Gerrit Code Review > Security` component are restricted to Gerrit
213maintainers and a few long-term contributors. The reporter becomes a
214collaborator on the issue and hence can see it as well. Security issues are
215triaged by the link:#steering-committee[Engineering Steering Committee].
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200216
Edwin Kempin31ad78a2023-12-01 11:02:34 +0000217If an existing issue is found to be a security vulnerability it should be moved
218to `Gerrit Code Review > Security` component (component ID: 1371046).
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200219
220In case of doubt, or if an issue cannot wait until the next ESC meeting,
221contact the link:#steering-committee[Engineering Steering Committee] directly
222by sending them an mailto:gerritcodereview-esc@googlegroups.com[email].
223
224If needed, the ESC will contact the reporter for additional details.
225
226[[embargo]]
227=== The Embargo
228
229Once an issue has been identified as security vulnerability, we keep it under
230embargo until a fixed release or a mitigation is available. This means that the
231issue is not discussed publicly, but only on issues with restricted visibility
232(see link:#report-security-issue[above]) and at the mailing lists of the ESC,
233community managers and Gerrit maintainers. Since the `repo-discuss` mailing
234list is public, security issues must not be discussed on this mailing list
235while the embargo is in place.
236
237The reason for keeping an embargo is to prevent attackers from taking advantage
238of a vulnerability while no fixed releases are available yet, and Gerrit
239administrators cannot make their systems secure.
240
241Once a fix release or mitigation is available, the embargo is lifted and the
242community is informed about the security vulnerability with the advise to
243address the security vulnerability immediately (either by upgrading to a fixed
244release or applying the mitigation). The information about the security
245vulnerability is disclosed via the
Marian Harbach34253372019-12-10 18:01:31 +0100246link:https://groups.google.com/d/forum/repo-discuss[repo-discuss,role=external,window=_blank] mailing list.
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200247
248[[handle-security-issue]]
249=== Handling of the Security Vulnerability
250
251. Engineering Steering Committee evaluates the security vulnerability:
252+
253The ESC discusses the security vulnerability and which actions should be taken
254to address it. One person, usually one of the Gerrit maintainers, should be
255appointed to drive and coordinate the investigation and the fix of the security
256vulnerability. This coordinator doesn't need to do all the work alone, but is
257responsible that the security vulnerability is getting fixed in a timely
258manner.
259+
260If the security vulnerability affects multiple or older releases the ESC should
261decide which of the releases should be fixed. For critical security issue we
262also consider fixing old releases that are otherwise not receiving any
263bug-fixes anymore.
264+
265It's also possible that the ESC decides that an issue is not a security issue
266and the embargo is lifted immediately.
267
Edwin Kempine9cc2752020-12-01 13:02:46 +0100268. Filing a CVE
269+
270For every security issue a CVE that describes the issue and lists the affected
271releases should be filed. Filing a CVE can be done by any maintainer that works
272for an organization that can request CVE numbers (e.g. Googlers). The CVE
273number must be included in the release notes. The CVE itself is only made
274public after fixed released have been published and the embargo has been
275lifted.
276
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200277. Implementation of the security fix:
278+
279To keep the embargo intact, security fixes cannot be developed and reviewed in
280the public `gerrit` repository. In particular it's not secure to use private
281changes for implementing and reviewing security fixes (see general notes about
282link:intro-user.html[security-fixes]).
283+
284Instead security fixes should be implemented and reviewed in the non-public
285link:https://gerrit-review.googlesource.com/admin/repos/gerrit-security-fixes[
Marian Harbach34253372019-12-10 18:01:31 +0100286gerrit-security-fixes,role=external,window=_blank] repository which is only accessible by Gerrit
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200287maintainers and Gerrit community members that work on security fixes.
288+
289The change that fixes the security vulnerability should contain an integration
290test that verifies that the security vulnerability is no longer present.
291+
292Review and approval of the security fixes must be done by the Gerrit
Luca Milanesio9df16672020-11-28 00:31:16 +0000293maintainers.
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200294+
295Once a security fix is ready and submitted, it should be cherry-picked to all
296branches that should be fixed.
297
Luca Milanesio9df16672020-11-28 00:31:16 +0000298. CI validation of the security fix:
299+
300The validation of the security fixes does not happen on the regular Gerrit CI,
301because it would compromise the confidentiality of the fix and therefore break
302the embargo.
303+
304The release manager maintains a private branch on the
305link:https://gerrit-review.googlesource.com/admin/repos/gerrit-ci-scripts[gerrit-ci-scripts,role=external,window=_blank] repository
306which contains a special build pipeline with special visibility restrictions.
307+
308The validation process provides feedback, in terms of Code-Style, Verification
309and Checks, to the incoming security changes. The links associated
310with the build logs are exposed over the Internet but their access limited
311to only those who are actively participating in the development and review of
312the security fix.
313+
314The maintainers that are willing to access the links to the CI logs need
315to request a time-limited (maximum 30 days) nominal X.509 certificate from a
316CI maintainer, which allows to access the build logs and analyze failures.
317The release manager may help obtaining that certificate from CI maintainers.
318
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200319. Creation of fixed releases and announcement of the security vulnerability:
320+
321A release manager should create new bug fix releases for all fixed branches.
322+
323The new releases should be tested against the security vulnerability to
324double-check that the release was built from the correct source that contains
325the fix for the security vulnerability.
326+
327Before publishing the fixed releases, an announcement to the Gerrit community
328should be prepared. The announcement should clearly describe the security
329vulnerability, which releases are affected and which releases contain the fix.
330The announcement should recommend to upgrade to fixed releases immediately.
331+
332Once all releases are ready and tested and the announcement is prepared, the
333releases should be all published at the same time. Immediately after that, the
334announcement should be sent out to the
Marian Harbach34253372019-12-10 18:01:31 +0100335link:https://groups.google.com/d/forum/repo-discuss[repo-discuss,role=external,window=_blank] mailing list.
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200336+
337This ends the embargo and any issue that discusses the security vulnerability
338should be made public.
339
Edwin Kempine9cc2752020-12-01 13:02:46 +0100340. Publish the CVE
341
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200342. Follow-Up
343+
344The ESC should discuss if there are any learnings from the security
345vulnerability and define action items to follow up in the
Marian Harbach34253372019-12-10 18:01:31 +0100346link:https://bugs.chromium.org/p/gerrit[issue tracker,role=external,window=_blank].
Edwin Kempin2fef5a622019-10-02 17:22:05 +0200347
Edwin Kempinef1b8112019-10-29 09:27:00 +0100348[[core-plugins]]
349== Core Plugins
350
351See link:dev-core-plugins.html[here].
352
Edwin Kempinc500df02019-04-23 15:53:00 +0200353[[upgrading-libraries]]
354== Upgrading Libraries
355
Edwin Kempin6671edc2019-04-24 11:22:53 +0200356Changes that add new libraries or upgrade existing libraries require an approval on the
357`Library-Compliance` label. For an approval the following things are checked:
358
359* The library has a license that is suitable for use within Gerrit.
360* If the library is used within Google, the version of the library must be compatible with the
361 version that is used at Google.
362
Edwin Kempin3e0fe012022-02-18 13:15:10 +0100363Only maintainers from Google can vote on the `Library-Compliance` label. The
364Gerrit team at Google uses this
365link:https://gerrit-review.googlesource.com/q/label:%2522Library-Compliance%253Dneed%2522+-ownerin:google-gerrit-team+status:open+project:gerrit+-age:4week+-is:wip+-is:private+label:Code-Review%252B2[change query]
366to find changes that require a `Library-Compliance` approval.
Edwin Kempin6671edc2019-04-24 11:22:53 +0200367
Matthias Sohne2e483f2023-10-30 23:32:26 +0100368To get the attention of a Googler for dependency updates file separate issues
369(use type "Task") for each dependency update on the
370link:https://issues.gerritcodereview.com/issues/new?component=1371020&template=1834212["Hosting > googlesource" component].
371Then it will show up in Google's triage queue and the current person who is on duty
372should look into this.
373
Edwin Kempinc500df02019-04-23 15:53:00 +0200374Gerrit's library dependencies should only be upgraded if the new version contains
375something we need in Gerrit. This includes new features, API changes as well as bug
376or security fixes.
377An exception to this rule is that right after a new Gerrit release was branched
378off, all libraries should be upgraded to the latest version to prevent Gerrit
379from falling behind. Doing those upgrades should conclude at the latest two
380months after the branch was cut. This should happen on the master branch to ensure
381that they are vetted long enough before they go into a release and we can be sure
382that the update doesn't introduce a regression.
383
Edwin Kempin47d14032022-02-08 13:22:54 +0100384[[escalation-channel-to-google]]
385== Escalation channel to Google
386
387If anything urgent is blocking that requires the attention of a Googler you may
388escalate this by writing an email to Han-Wen Nienhuys: hanwen@google.com
389
Edwin Kempinc500df02019-04-23 15:53:00 +0200390[[deprecating-features]]
391== Deprecating features
392
393Gerrit should be as stable as possible and we aim to add only features that last.
394However, sometimes we are required to deprecate and remove features to be able
395to move forward with the project and keep the code-base clean. The following process
396should serve as a guideline on how to deprecate functionality in Gerrit. Its purpose
397is that we have a structured process for deprecation that users, administrators and
398developers can agree and rely on.
399
400General process:
401
402 * Make sure that the feature (e.g. a field on the API) is not needed anymore or blocks
403 further development or improvement. If in doubt, consult the mailing list.
404 * If you can provide a schema migration that moves users to a comparable feature, do
405 so and stop here.
406 * Mark the feature as deprecated in the documentation and release notes.
407 * If possible, mark the feature deprecated in any user-visible interface. For example,
408 if you are deprecating a Git push option, add a message to the Git response if
409 the user provided the option informing them about deprecation.
410 * Annotate the code with `@Deprecated` and `@RemoveAfter(x.xx)` if applicable.
411 Alternatively, use `// DEPRECATED, remove after x.xx` (where x.xx is the version
412 number that has to be branched off before removing the feature)
413 * Gate the feature behind a config that is off by default (forcing admins to turn
414 the deprecated feature on explicitly).
415 * After the next release was branched off, remove any code that backed the feature.
416
417You can optionally consult the mailing list to ask if there are users of the feature you
418wish to deprecate. If there are no major users, you can remove the feature without
419following this process and without the grace period of one release.
420
421GERRIT
422------
423Part of link:index.html[Gerrit Code Review]
424
425SEARCHBOX
426---------