From 546cea1b09886e32d824f4d3a84f31375ea56407 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 16 Nov 2017 03:10:18 +0800 Subject: [PATCH 1/5] doc: reorganize collaborator guide * Add sections about first time contributions, code reviews and seeking consensus, waiting for approvals, testing and CI * Move paragraphs to more suitable sections * Update table of contents --- COLLABORATOR_GUIDE.md | 182 ++++++++++++++++++++++++++---------------- 1 file changed, 113 insertions(+), 69 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index c61aad6e7d4f31..39be5ee5e12765 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -4,15 +4,31 @@ * [Issues and Pull Requests](#issues-and-pull-requests) * [Accepting Modifications](#accepting-modifications) - - [Useful CI Jobs](#useful-ci-jobs) - - [Internal vs. Public API](#internal-vs-public-api) - - [Breaking Changes](#breaking-changes) - - [Deprecations](#deprecations) - - [Involving the TSC](#involving-the-tsc) + - [First Time Contributions](#first-time-contributions) + - [Code Reviews and Consensus Seeking](#code-reviews-and-consensus-seeking) + - [Waiting for Approvals](#waiting-for-approvals) + - [Testing and CI](#testing-and-ci) + - [Useful CI Jobs](#useful-ci-jobs) + - [Internal vs. Public API](#internal-vs-public-api) + - [Breaking Changes](#breaking-changes) + - [Breaking Changes and Deprecations](#breaking-changes-and-deprecations) + - [Breaking Changes to Internal Elements](#breaking-changes-to-internal-elements) + - [When Breaking Changes Actually Break Things](#when-breaking-changes-actually-break-things) + - [Reverting commits](#reverting-commits) + - [Introducing New Modules](#introducing-new-modules) + - [Deprecations](#deprecations) + - [Involving the TSC](#involving-the-tsc) * [Landing Pull Requests](#landing-pull-requests) - - [Technical HOWTO](#technical-howto) - - [I Just Made a Mistake](#i-just-made-a-mistake) - - [Long Term Support](#long-term-support) + - [Technical HOWTO](#technical-howto) + - [Troubleshooting](#troubleshooting) + - [I Just Made a Mistake](#i-just-made-a-mistake) + - [Long Term Support](#long-term-support) + - [What is LTS?](#what-is-lts) + - [How does LTS work?](#how-does-lts-work) + - [Landing semver-minor commits in LTS](#landing-semver-minor-commits-in-lts) + - [How are LTS Branches Managed?](#how-are-lts-branches-managed) + - [How can I help?](#how-can-i-help) + - [How is an LTS release cut?](#how-is-an-lts-release-cut) This document contains information for Collaborators of the Node.js project regarding maintaining the code, documentation and issues. @@ -24,14 +40,10 @@ understand the project governance model as outlined in ## Issues and Pull Requests -Courtesy should **always** be shown to individuals submitting issues and pull -requests to the Node.js project. Be welcoming to first time contributors, -identified by the GitHub ![badge](./doc/first_timer_badge.png) badge. - Collaborators should feel free to take full responsibility for managing issues and pull requests they feel qualified to handle, as long as this is done while being mindful of these guidelines, the -opinions of other Collaborators and guidance of the TSC. +opinions of other Collaborators and guidance of the [TSC][]. Collaborators may **close** any issue or pull request they believe is not relevant for the future of the Node.js project. Where this is @@ -41,13 +53,28 @@ Collaborators or additional evidence that the issue has relevance, the issue may be closed. Remember that issues can always be re-opened if necessary. -[**See "Who to CC in issues"**](./doc/onboarding-extras.md#who-to-cc-in-issues) +[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues) ## Accepting Modifications All modifications to the Node.js code and documentation should be performed via GitHub pull requests, including modifications by -Collaborators and TSC members. +Collaborators and TSC members. A pull request must be reviewed, and usually +must also be tested with CI, before being landed into the codebase. + +### First Time Contributions + +Courtesy should **always** be shown to individuals submitting issues and pull +requests to the Node.js project. Be welcoming to first time contributors, +identified by the GitHub ![badge](./doc/first_timer_badge.png) badge. + +For first time contributors, check if the commit author is the same as the +pull request author, and ask if they have configured their git +username and email to their liking as per [this guide][git-username]. +This is to make sure they would be promoted to "contributor" once +their pull request gets landed. + +### Code Reviews and Consensus Seeking All pull requests must be reviewed and accepted by a Collaborator with sufficient expertise who is able to take full responsibility for the @@ -55,22 +82,17 @@ change. In the case of pull requests proposed by an existing Collaborator, an additional Collaborator is required for sign-off. In some cases, it may be necessary to summon a qualified Collaborator -to a pull request for review by @-mention. +or a Github team to a pull request for review by @-mention. +[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues) If you are unsure about the modification and are not prepared to take full responsibility for the change, defer to another Collaborator. -Before landing pull requests, sufficient time should be left for input -from other Collaborators. Leave at least 48 hours during the week and -72 hours over weekends to account for international time differences -and work schedules. Trivial changes (e.g. those which fix minor bugs -or improve performance without affecting API or causing other -wide-reaching impact), and focused changes that affect only documentation -and/or the test suite, may be landed after a shorter delay if they have -multiple approvals. - -For first time contributors, ask the author if they have configured their git -username and email to their liking as per [this guide][git-username]. +If any Collaborator objects to a change *without giving any additional +explanation or context*, and the objecting Collaborator fails to respond to +explicit requests for explanation or context within a reasonable period of +time, the objection may be dismissed. Note that this does not apply to +objections that are explained. For non-breaking changes, if there is no disagreement amongst Collaborators, a pull request may be landed given appropriate review. @@ -80,12 +102,29 @@ elevate discussion to the TSC for resolution (see below). Breaking changes (that is, pull requests that require an increase in the major version number, known as `semver-major` changes) must be -elevated for review by the TSC. This does not necessarily mean that the -PR must be put onto the TSC meeting agenda. If multiple TSC members -approve (`LGTM`) the PR and no Collaborators oppose the PR, it can be -landed. Where there is disagreement among TSC members or objections -from one or more Collaborators, `semver-major` pull requests should be -put on the TSC meeting agenda. +[elevated for review by the TSC](#involving-the-tsc). +This does not necessarily mean that the PR must be put onto the TSC meeting +agenda. If multiple TSC members approve (`LGTM`) the PR and no Collaborators +oppose the PR, it can be landed. Where there is disagreement among TSC members +or objections from one or more Collaborators, `semver-major` pull requests +should be put on the TSC meeting agenda. + +### Waiting for Approvals + +Before landing pull requests, sufficient time should be left for input +from other Collaborators. In general, leave at least 48 hours during the +week and 72 hours over weekends to account for international time +differences and work schedules. However, certain types of pull requests +can be fast-tracked and may be landed after a shorter delay: + +* Trivial changes, for example, those fixing minor bugs or improving + performance without affecting API or causing other wide-reaching impact. +* Focused changes that affect only documentation and/or the test suite. + `code-and-learn` and `good-first-issue` pull requests typically fall + into this category. +* Changes that revert commit(s) and/or fix regressions. + +### Testing and CI All bugfixes require a test case which demonstrates the defect. The test should *fail* before the change, and *pass* after the change. @@ -94,12 +133,6 @@ All pull requests that modify executable code should be subjected to continuous integration tests on the [project CI server](https://ci.nodejs.org/). -If any Collaborator objects to a change *without giving any additional -explanation or context*, and the objecting Collaborator fails to respond to -explicit requests for explanation or context within a reasonable period of -time, the objection may be dismissed. Note that this does not apply to -objections that are explained. - #### Useful CI Jobs * [`node-test-pull-request`](https://ci.nodejs.org/job/node-test-pull-request/) @@ -172,20 +205,8 @@ using an API in a manner currently undocumented achieves a particular useful result, a decision will need to be made whether or not that falls within the supported scope of that API; and if it does, it should be documented. -Breaking changes to internal elements are permitted in semver-patch or -semver-minor commits but Collaborators should take significant care when -making and reviewing such changes. Before landing such commits, an effort -must be made to determine the potential impact of the change in the ecosystem -by analyzing current use and by validating such changes through ecosystem -testing using the [Canary in the Goldmine](https://github.com/nodejs/citgm) -tool. If a change cannot be made without ecosystem breakage, then TSC review is -required before landing the change as anything less than semver-major. - -If a determination is made that a particular internal API (for instance, an -underscore `_` prefixed property) is sufficiently relied upon by the ecosystem -such that any changes may break user code, then serious consideration should be -given to providing an alternative Public API for that functionality before any -breaking changes are made. +See [Breaking Changes to Internal Elements](#breaking-changes-to-internal-elements) +on how to handle that type of changes. ### Breaking Changes @@ -200,6 +221,20 @@ changing error messages in any way, altering expected timing of an event (e.g. moving from sync to async responses or vice versa), and changing the non-internal side effects of using a particular API. +Purely additive changes (e.g. adding new events to EventEmitter +implementations, adding new arguments to a method in a way that allows +existing code to continue working without modification, or adding new +properties to an options argument) are handled as semver-minor changes. + +Note that errors thrown, along with behaviors and APIs implemented by +dependencies of Node.js (e.g. those originating from V8) are generally not +under the control of Node.js and therefore *are not directly subject to this +policy*. However, care should still be taken when landing updates to +dependencies when it is known or expected that breaking changes to error +handling may have been made. Additional CI testing may be required. + +#### Breaking Changes and Deprecations + With a few notable exceptions outlined below, when backwards incompatible changes to a *Public* API are necessary, the existing API *must* be deprecated *first* and the new API either introduced in parallel or added after the next @@ -219,19 +254,26 @@ without a [Deprecation cycle](#deprecation-cycle). From time-to-time, in particularly exceptional cases, the TSC may be asked to consider and approve additional exceptions to this rule. -Purely additive changes (e.g. adding new events to EventEmitter -implementations, adding new arguments to a method in a way that allows -existing code to continue working without modification, or adding new -properties to an options argument) are handled as semver-minor changes. +For more information, see [Deprecations](#deprecations). -Note that errors thrown, along with behaviors and APIs implemented by -dependencies of Node.js (e.g. those originating from V8) are generally not -under the control of Node.js and therefore *are not directly subject to this -policy*. However, care should still be taken when landing updates to -dependencies when it is known or expected that breaking changes to error -handling may have been made. Additional CI testing may be required. +#### Breaking Changes to Internal Elements + +Breaking changes to internal elements are permitted in semver-patch or +semver-minor commits but Collaborators should take significant care when +making and reviewing such changes. Before landing such commits, an effort +must be made to determine the potential impact of the change in the ecosystem +by analyzing current use and by validating such changes through ecosystem +testing using the [Canary in the Goldmine](https://github.com/nodejs/citgm) +tool. If a change cannot be made without ecosystem breakage, then TSC review is +required before landing the change as anything less than semver-major. + +If a determination is made that a particular internal API (for instance, an +underscore `_` prefixed property) is sufficiently relied upon by the ecosystem +such that any changes may break user code, then serious consideration should be +given to providing an alternative Public API for that functionality before any +breaking changes are made. -#### When breaking changes actually break things +#### When Breaking Changes Actually Break Things Because breaking (semver-major) changes are permitted to land on the master branch at any time, at least some subset of the user ecosystem may be adversely @@ -349,12 +391,13 @@ Changes" section of the release notes. ### Involving the TSC -Collaborators may opt to elevate pull requests or issues to the TSC for -discussion by assigning the `tsc-review` label. This should be done -where a pull request: +Collaborators may opt to elevate pull requests or issues to the [TSC][] for +discussion by assigning the `tsc-review` label or @-mentioning the +`@nodejs/tsc` Github team. This should be done where a pull request: -- has a significant impact on the codebase, -- is inherently controversial; or +- is labeled `semver-major`, or +- has a significant impact on the codebase, or +- is inherently controversial, or - has failed to reach consensus amongst the Collaborators who are actively participating in the discussion. @@ -681,3 +724,4 @@ LTS working group and the Release team. [Enhancement Proposal]: https://github.com/nodejs/node-eps [git-username]: https://help.github.com/articles/setting-your-username-in-git/ [`node-core-utils`]: https://github.com/nodejs/node-core-utils +[TSC]: https://github.com/nodejs/TSC From d5b3ce86dc02b1a480de14c36cac0be800346147 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 16 Nov 2017 03:13:02 +0800 Subject: [PATCH 2/5] doc: document the fast-tracking process --- COLLABORATOR_GUIDE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 39be5ee5e12765..ac893b30c9f1aa 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -124,6 +124,10 @@ can be fast-tracked and may be landed after a shorter delay: into this category. * Changes that revert commit(s) and/or fix regressions. +When a pull request is deemed suitable to be fast-tracked, label it with +`fast-track`. The pull request can be landed once more than 3 collaborators +approve both the pull request and the fast-tracking request. + ### Testing and CI All bugfixes require a test case which demonstrates the defect. The From 75902aa6044ba0f9134c52fbaa7c6c14c48c5f98 Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 16 Nov 2017 17:32:42 +0800 Subject: [PATCH 3/5] [squash] reword and moving paragraphs to better places --- COLLABORATOR_GUIDE.md | 61 ++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 27 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index ac893b30c9f1aa..a72805ad93f194 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -3,8 +3,10 @@ **Contents** * [Issues and Pull Requests](#issues-and-pull-requests) + - [Managing Issues and Pull Requests](#managing-issues-and-pull-requests) + - [Welcoming First-Time Contributiors](#welcoming-first-time-contributiors) + - [Closing Issues and Pull Requests](#closing-issues-and-pull-requests) * [Accepting Modifications](#accepting-modifications) - - [First Time Contributions](#first-time-contributions) - [Code Reviews and Consensus Seeking](#code-reviews-and-consensus-seeking) - [Waiting for Approvals](#waiting-for-approvals) - [Testing and CI](#testing-and-ci) @@ -40,12 +42,31 @@ understand the project governance model as outlined in ## Issues and Pull Requests +### Managing Issues and Pull Requests + Collaborators should feel free to take full responsibility for managing issues and pull requests they feel qualified to handle, as long as this is done while being mindful of these guidelines, the -opinions of other Collaborators and guidance of the [TSC][]. +opinions of other Collaborators and guidance of the [TSC][]. They +may also notify other qualified parties for more input on an issue +or a pull request. +[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues) + +### Welcoming First-Time Contributiors + +Courtesy should always be shown to individuals submitting issues and pull +requests to the Node.js project. Be welcoming to first-time contributors, +identified by the GitHub ![badge](./doc/first_timer_badge.png) badge. + +For first-time contributors, check if the commit author is the same as the +pull request author, and ask if they have configured their git +username and email to their liking as per [this guide][git-username]. +This is to make sure they would be promoted to "contributor" once +their pull request gets landed. + +### Closing Issues and Pull Requests -Collaborators may **close** any issue or pull request they believe is +Collaborators may close any issue or pull request they believe is not relevant for the future of the Node.js project. Where this is unclear, the issue should be left open for several days to allow for additional discussion. Where this does not yield input from Node.js @@ -53,8 +74,6 @@ Collaborators or additional evidence that the issue has relevance, the issue may be closed. Remember that issues can always be re-opened if necessary. -[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues) - ## Accepting Modifications All modifications to the Node.js code and documentation should be @@ -62,18 +81,6 @@ performed via GitHub pull requests, including modifications by Collaborators and TSC members. A pull request must be reviewed, and usually must also be tested with CI, before being landed into the codebase. -### First Time Contributions - -Courtesy should **always** be shown to individuals submitting issues and pull -requests to the Node.js project. Be welcoming to first time contributors, -identified by the GitHub ![badge](./doc/first_timer_badge.png) badge. - -For first time contributors, check if the commit author is the same as the -pull request author, and ask if they have configured their git -username and email to their liking as per [this guide][git-username]. -This is to make sure they would be promoted to "contributor" once -their pull request gets landed. - ### Code Reviews and Consensus Seeking All pull requests must be reviewed and accepted by a Collaborator with @@ -210,7 +217,7 @@ result, a decision will need to be made whether or not that falls within the supported scope of that API; and if it does, it should be documented. See [Breaking Changes to Internal Elements](#breaking-changes-to-internal-elements) -on how to handle that type of changes. +on how to handle those types of changes. ### Breaking Changes @@ -225,17 +232,10 @@ changing error messages in any way, altering expected timing of an event (e.g. moving from sync to async responses or vice versa), and changing the non-internal side effects of using a particular API. -Purely additive changes (e.g. adding new events to EventEmitter +Purely additive changes (e.g. adding new events to `EventEmitter` implementations, adding new arguments to a method in a way that allows existing code to continue working without modification, or adding new -properties to an options argument) are handled as semver-minor changes. - -Note that errors thrown, along with behaviors and APIs implemented by -dependencies of Node.js (e.g. those originating from V8) are generally not -under the control of Node.js and therefore *are not directly subject to this -policy*. However, care should still be taken when landing updates to -dependencies when it is known or expected that breaking changes to error -handling may have been made. Additional CI testing may be required. +properties to an options argument) are semver-minor changes. #### Breaking Changes and Deprecations @@ -255,6 +255,13 @@ Exception to this rule is given in the following cases: Such changes *must* be handled as semver-major changes but MAY be landed without a [Deprecation cycle](#deprecation-cycle). +Note that errors thrown, along with behaviors and APIs implemented by +dependencies of Node.js (e.g. those originating from V8) are generally not +under the control of Node.js and therefore *are not directly subject to this +policy*. However, care should still be taken when landing updates to +dependencies when it is known or expected that breaking changes to error +handling may have been made. Additional CI testing may be required. + From time-to-time, in particularly exceptional cases, the TSC may be asked to consider and approve additional exceptions to this rule. From 00f7b9f5ff4e7402eb72c965706385bf6b5cec4f Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Thu, 16 Nov 2017 17:38:11 +0800 Subject: [PATCH 4/5] [squash] remove bug-fix and optimizations as fast-tracking examples, change to 2 approvals --- COLLABORATOR_GUIDE.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index a72805ad93f194..4e533447692694 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -124,15 +124,13 @@ week and 72 hours over weekends to account for international time differences and work schedules. However, certain types of pull requests can be fast-tracked and may be landed after a shorter delay: -* Trivial changes, for example, those fixing minor bugs or improving - performance without affecting API or causing other wide-reaching impact. * Focused changes that affect only documentation and/or the test suite. `code-and-learn` and `good-first-issue` pull requests typically fall into this category. * Changes that revert commit(s) and/or fix regressions. When a pull request is deemed suitable to be fast-tracked, label it with -`fast-track`. The pull request can be landed once more than 3 collaborators +`fast-track`. The pull request can be landed once more than 2 collaborators approve both the pull request and the fast-tracking request. ### Testing and CI From d793f215c24b31126f0c7b550e3fd9821befe6dd Mon Sep 17 00:00:00 2001 From: Joyee Cheung Date: Fri, 17 Nov 2017 22:05:49 +0800 Subject: [PATCH 5/5] [squash] reword fast-track requirements --- COLLABORATOR_GUIDE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index 4e533447692694..c98d19afc7520e 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -130,8 +130,9 @@ can be fast-tracked and may be landed after a shorter delay: * Changes that revert commit(s) and/or fix regressions. When a pull request is deemed suitable to be fast-tracked, label it with -`fast-track`. The pull request can be landed once more than 2 collaborators -approve both the pull request and the fast-tracking request. +`fast-track`. The pull request can be landed once 2 or more collaborators +approve both the pull request and the fast-tracking request, and the necessary +CI testing is done. ### Testing and CI