Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landing PRs policy #242

Closed
mmarchini opened this issue Oct 5, 2018 · 10 comments
Closed

Landing PRs policy #242

mmarchini opened this issue Oct 5, 2018 · 10 comments
Labels

Comments

@mmarchini
Copy link
Contributor

I just realized we don't have a policy for landing Pull Requests and I guess most of us are assuming Node.js core policies here: at least one approval + wait 48/72 hours. Considering the project has only a few collaborators, I don't think this policy is adequate since it usually takes weeks to get approvals.

Inspired on recent discussions about PR waiting time on Node.js core (nodejs/node#22275) and on the Commit-Then-Review concept, I'd like to propose the following PR policy:

Before landing a pull request, make sure the following conditions must be true:
- The Pull Request must contain tests, when applicable
- Last CI run must be green
- There must be no objections (GitHub's Request for Changes)

Also, at least one of the following conditions must be true:
- The Pull Request is open for at least 72 hours
- The Pull Request was approved by at least one collaborator

I'm open to discuss this in person next week during the Collab Summit :)

cc @nodejs/diagnostics since llnode falls under the WG Governance. Also ccing llnode collaborators: @joyeecheung @indutny @cjihrig @bnoordhuis @rnchamberlain @hhellyer

@mmarchini mmarchini added the meta label Oct 5, 2018
@richardlau
Copy link
Member

The one advantage of following the same rules as core is that the associated tooling (i.e. node-core-utils) should just work. That's not to say we couldn't teach ncu different rules for different projects (but then we'd have to make sure it applied the correct rules).

@mmarchini
Copy link
Contributor Author

node-core-utils already have problems with llnode: it complains because there's no CI run (we're not using Jenkins yet) and users have to use ncu-config to make ncu look into Node.js README for the list of collaborators (which doesn't make sense, llnode collaborators are not necessarily Node.js collaborators). Thus I don't think this should be a reason to keep following core's policy.

By the way, I made a mistake in my first comment: right now core requires two approvals instead of one, unless the pull request is open for over a week. This rule works for core where we have several collaborators who review pull requests daily, but it is excessive for a project with only a handful of active collaborators.


With that being said, teaching ncu different rules according to the project sounds like a good idea. Maybe we could have a .ncurc in our projects, where we can customize ncu's behavior accordingly?

For example:

{
  "wait-time": 72,
  "min-approvals": 2,
  "required-ci": [ 
    { "type": "jenkins", "job": "node-test-pull-request" }, 
    { "type": "jenkins", "job": "node-test-pull-request-lite-pipeline" }
  ]
}

@joyeecheung
Copy link
Member

joyeecheung commented Oct 6, 2018

@mmarchini You maybe looking for the ./.ncu/ directory as that's where ncu-config serialize per-project configurations already? (e.g. ncu-config set repo llnode is serialized in ./ncu/config). Also, PRs to refactor the PR checker in ncu (ideally configurable through rules like what you described) are very welcomed!

which doesn't make sense, llnode collaborators are not necessarily Node.js collaborators

The llnode collaborators are still a subset of node collaborators at the moment, but yeah we need something for the long term. I thought about moving the collaborator information from the README (which is weird to parse) to a JSON, but the idea of moving names out of the README wasn't quite popular in core - although simply duplicating the information in a JSON is probably not going to meet much objections, I guess.

@mmarchini
Copy link
Contributor Author

maybe looking for the ./.ncu/ directory

./.ncu/ is being used for user-specific settings, right? I suggested .ncurc so we could have something committable, then we could have per-project settings applicable for all users.

@joyeecheung
Copy link
Member

@mmarchini We could have .ncu/something committed into the tree, and ask users to put something like

.ncu
!.ncu/something

into their global git configs. But yeah it also make sense to make this a top-level file. Maybe .ncuattributes? (Thinking along the lines of .gitattributes)

@mmarchini
Copy link
Contributor Author

@joyeecheung ncu changes aside, what do you think about the proposed policy?

@joyeecheung
Copy link
Member

joyeecheung commented Oct 12, 2018

@mmarchini IIUC, the proposed policy allows PRs to be merged without reviews after it is open for 72 hours? I don't feel quite comfortable with this, considering there are actual users of this project who are not our collaborators, to be honest..
(I would be a bit more comfortable if it's 7 days and the PR is opened by an existing collaborator, but it's just me, though)

@mmarchini
Copy link
Contributor Author

I would be a bit more comfortable if it's 7 days and the PR is opened by an existing collaborator, but it's just me, though

That sounds reasonable to me.

@mhdawson
Copy link
Member

I guess only collaborators can land PRs. Maybe something like allowing a collaborator to approve their own PR after 7 days ...

@mmarchini
Copy link
Contributor Author

I like this idea @mhdawson. I'll open a PR to document this and cc @nodejs/diagnostics there.

mmarchini added a commit to mmarchini/llnode that referenced this issue Feb 26, 2019
llnode has been unofficially following the Node.js Collaborator Guide
wrt Approving and Landing PRs policy. On the downside, these policies
were written for a large project with 100+ collaborators and dozens of
active collaborators daily. llnode has only a few collaborators, and
some policies slow the project quite a bit.

This commit adds COLLABORATOR_GUIDE.md with a link to Node.js
Collaborator Guide, so we'll start to follow these guidelines
officially. It also adds one exception to ensure the project can move
forward with a limited number of collaborators.

Fixes: nodejs#242
mmarchini added a commit to mmarchini/llnode that referenced this issue Mar 5, 2019
llnode has been unofficially following the Node.js Collaborator Guide
wrt Approving and Landing PRs policy. This commit adds
COLLABORATOR_GUIDE.md with a link to Node.js Collaborator Guide, so
we'll start to follow these guidelines officially.

Fixes: nodejs#242
mmarchini added a commit to mmarchini/llnode that referenced this issue Sep 10, 2019
llnode has been unofficially following the Node.js Collaborator Guide
wrt Approving and Landing PRs policy. This commit adds
COLLABORATOR_GUIDE.md with a link to Node.js Collaborator Guide, so
we'll start to follow these guidelines officially.

Fixes: nodejs#242
mmarchini added a commit to mmarchini/llnode that referenced this issue Sep 10, 2019
llnode has been unofficially following the Node.js Collaborator Guide
wrt Approving and Landing PRs policy. This commit adds
COLLABORATOR_GUIDE.md with a link to Node.js Collaborator Guide, so
we'll start to follow these guidelines officially.

Fixes: nodejs#242
mmarchini added a commit to mmarchini/llnode that referenced this issue Feb 12, 2020
As discussed in the 2020-02-12 Diagnostics WG Meeting and suggested in
nodejs#242 (comment),
change the landing policy so that Collaborators can land pull requests
if it was open for three days and there were no reviews on it.

Ref: nodejs/diagnostics#355
mmarchini added a commit that referenced this issue Feb 22, 2020
As discussed in the 2020-02-12 Diagnostics WG Meeting and suggested in
#242 (comment),
change the landing policy so that Collaborators can land pull requests
if it was open for three days and there were no reviews on it.

Ref: nodejs/diagnostics#355

PR-URL: #336
Refs: nodejs/diagnostics#355
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants