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

Signing off on own requested changes #19564

Closed
mscdex opened this issue Mar 23, 2018 · 36 comments
Closed

Signing off on own requested changes #19564

mscdex opened this issue Mar 23, 2018 · 36 comments
Labels
meta Issues and PRs related to the general management of the project.

Comments

@mscdex
Copy link
Contributor

mscdex commented Mar 23, 2018

  • Version: n/a
  • Platform: n/a
  • Subsystem: n/a

Currently pull requests submitted by non-collaborators only need a sign off by one collaborator in order to get merged. I think this rule should be tweaked to require at least two collaborators when the non-collaborator is making a change originally requested/suggested by an existing collaborator who signs off on the PR, to help remove any bias.

@mscdex mscdex added the meta Issues and PRs related to the general management of the project. label Mar 23, 2018
@Trott
Copy link
Member

Trott commented Mar 23, 2018

Given the large number of collaborators that we now have (116 and growing), it might be reasonable to simply increase the number of required approvals from one to two in all cases.

@targos
Copy link
Member

targos commented Mar 23, 2018

+1. Always two is easier to verify / remember.

@mscdex
Copy link
Contributor Author

mscdex commented Mar 23, 2018

That's fine by me too.

@jasnell
Copy link
Member

jasnell commented Mar 23, 2018

-0 ... I'm fine with saying should be 2+, I'd be -1 on making it a must be 2+ in all cases.

@Trott
Copy link
Member

Trott commented Mar 23, 2018

Arguably, this is what the 48-hour waiting period is for. It gives others time to object. So another approach might be to require 2+ for only fast-track PRs. But I suspect that doesn't solve the problem @mscdex has apparently experienced.

@Trott
Copy link
Member

Trott commented Mar 23, 2018

I'd be -1 on making it a must be 2+ in all cases.

@jasnell Can you please explain why? (I'm not disagreeing with you, as I have yet to form my own opinion on this. Saying "I'm -1 on this" doesn't help the consensus-seeking conversation the way "I'm -1 on this because X, Y, and Z" would.)

@mscdex
Copy link
Contributor Author

mscdex commented Mar 23, 2018

Sometimes PRs get "lost" amongst the other PRs, especially over 48/72-hour periods, so having a time window does not always work. It's especially a problem IMHO when there were objections in the original issue that led to the PR (and those who objected do not know the PR was made).

@vsemozhetbyt
Copy link
Contributor

So another approach might be to require 2+ for only fast-track

This is already set.

@jasnell
Copy link
Member

jasnell commented Mar 23, 2018

Because it's unnecessary and there are often times when the change is so obscure or limited in scope that very few have enough context to sign off on it. Making it a must can needlessly delay landing important fixes that should be landed.

I agree with @mscdex that no change should land if there are objections, and objections about whether the change should be made at all being discussed in the original issue and not the PR count towards that.

@vsemozhetbyt

This is already set.

Oh! nice, I'd forgotten about that. I even think I've inadvertently not followed that rule on a couple of simple obscure minor edits. Good to have the reminder.

@vsemozhetbyt
Copy link
Contributor

@apapirovski
Copy link
Member

I agree with @jasnell here. A great many http2, StreamBase, timers, etc. PRs have landed with a single approval because there aren't enough people available with the required expertise to review in a timely manner.

@devsnek
Copy link
Member

devsnek commented Mar 23, 2018

that option only controls if you use the UI to merge a pr right? most PRs are landed by applying the diff and pushing from a collabs computer

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Mar 23, 2018

To be honest, I found these big red spots with crosses a bit intimidating and discouraging for new contributors.

@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Mar 23, 2018

It seems this also means git pushing, if I get this right: https://help.github.com/articles/about-required-reviews-for-pull-requests/ (the example at the end).

@targos
Copy link
Member

targos commented Mar 23, 2018

It seems this also means git pushing, if I get this right: help.github.com/articles/about-required-reviews-for-pull-requests (the example at the end).

Yes, protected branches don't work with our workflow, because it's impossible to push a different commit from what was reviewed

@mscdex
Copy link
Contributor Author

mscdex commented Mar 23, 2018

Just to point out, requiring two collaborator signoff still wouldn't solve the issue of objections from an issue not transferring to a related PR. I don't know if tooling could help with that particular problem, but at the very least we should be including something about it in the collaborator guide. I don't know if we should suggest pinging people in the PR who objected/raised concerns in the issue or not (that way they can reiterate their concerns in the PR).

I still think we also need to have some way to make sure there is no bias when signing off on and landing a PR. Whether that's requiring at least two collaborators on all PRs (like we did originally way back when IIRC), incorporating some kind of deterrent, or something else.

We already require an additional sign off for PRs from collaborators (to me, this seems kind of backwards anyway). I don't see why a PR from a non-collaborator should require only one signoff. The fast-track rules can still apply, that's fine by me, but otherwise we should have two signoffs for all other PRs.

@joyeecheung
Copy link
Member

joyeecheung commented Mar 24, 2018

Given the large number of collaborators that we now have (116 and growing), it might be reasonable to simply increase the number of required approvals from one to two in all cases.

@Trott Just want to say that the number is not a very valid statstistic in my opinion. Out of 116 existing collaborators, about 11% have never submitted any review in nodejs/node since GitHub launched the review feature (late 2016), 36% have not reviewed any pull request using the GitHub UI in nodejs/node in the last three months, and 43% have not done so in the last month (I used nodejs/node-core-utils#186 with the query tweaked to reviewed-by:user repo:nodejs/node). The less active collaborators, in my observation, are usually still responsive to pings but only if you ping them directly, and usually do not automatically review PRs submitted here unless they suddenly find the time to do so.

I am OK with doing this with test and doc where there are more people doing reviews, but I share the sentiment with @apapirovski in that with some subsystems finding two reviewers to weight in, say, in a week, is pretty hard. Also, if the author is a non-collaborator, things could be even harder because they might not know who to ping for reviews and other collaborators might not remember to do that for them either.

@mscdex
Copy link
Contributor Author

mscdex commented Mar 29, 2018

Doing it only for test and doc changes doesn't make sense to me as those are typically less controversial changes than say a change to code in lib/ or src/ for example.

@jasnell
Copy link
Member

jasnell commented Mar 29, 2018

We already require an additional sign off for PRs from collaborators

Yes and no. We require that a collaborator cannot sign off on their own PR, but such changes still only require a single sign off from someone else.

The point about objections from issues not transferring to PRs is well taken, however. This has bit us a few times (including on my a few of my own PRs). Our process is biased towards Just Landing Things and Trusting Those Putting In The Effort, which is (in my opinion) the right approach but it does have the risk of legitimate concerns and objections being missed. I'm not sure if there's a policy solution for this, but it's certainly something we can strongly encourage folks to pay more attention to.

@Trott
Copy link
Member

Trott commented Mar 29, 2018

One thing to perhaps reconsider is the tendency to "avoid the red X". That makes sense for nits and stuff, but I think we should embrace the red X for changes if you actually don't want them to land, especially as we embrace automation more and more. If there's concern that it will be discouraging to new contributors, some encouraging text can be written to compensate. I have to imagine having your change land and then having a bunch of people upset about it is more discouraging than being asked to make changes.

@joyeecheung
Copy link
Member

joyeecheung commented Mar 30, 2018

Maybe we can tweak the rules to "at least two sign-offs, or one sign-off if no other reviews within n days"? I also agree that for more substantial changes from collaborators, we should embrace the red X.

@mscdex
Copy link
Contributor Author

mscdex commented Mar 31, 2018

I don't think requiring only one sign-off after no reviews within n days will work either as one of the main problems I described earlier is that some PRs can easily get lost/buried in all of the other PRs, so people may not see it anymore or may forget about it if they haven't participated in that PR's conversation (or are otherwise not being notified).

@mhdawson
Copy link
Member

mhdawson commented Apr 4, 2018

Do we have some examples where having only a single sign-off has resulted in a problem, but that we think one more might have avoided it? Just trying to understand to scope of the problem that we are trying to fix in this case.

@refack
Copy link
Contributor

refack commented Apr 4, 2018

+1
I had similar intuition once upon a time (includes some examples): nodejs/CTC#144

@mscdex
Copy link
Contributor Author

mscdex commented Apr 5, 2018

@mhdawson Requiring one additional signoff is not foolproof, but it's better than nothing if we cannot find a way to at least transfer concerns/-1's from issue to PR, as it helps to somewhat ensure there is no bias when landing a PR.

@mhdawson
Copy link
Member

mhdawson commented Apr 5, 2018

@mscdex I was just trying to see if there was some data quantifying the severity of the issue, that would help in making the case for changing.

@mscdex
Copy link
Contributor Author

mscdex commented Apr 6, 2018

@mhdawson I guess "problem"/"severity" can be subjective.

Did the example that prompted me to submit this issue cause backwards compatibility problems, break CI, or otherwise become similarly disruptive? No, not as far as we know.

Is it a problem that complaints registered in the issue were completely ignored in the PR that resulted from that issue? IMO, yes.

Is it a problem that our process allows one collaborator to publicly suggest a change affecting code executed during runtime, have a non-collaborator submit a PR implementing said suggestion, and then allow the same collaborator to be the only one to review, approve, and merge it? IMO, yes.

@Trott
Copy link
Member

Trott commented Apr 6, 2018

Given the large number of active Collaborators, getting 2 for even obscure parts of the code base is not difficult.

Problems with getting 2 reviews are almost never about the change being to an obscure part of the code base. It is nearly always about the change being too large to easily review in a short amount of time. But for large changes, we obviously want more than one person reviewing.

I'm +1 on bumping the requirement up to 2-or-more Collaborators, but I also don't feel strongly enough to push for this if others object (which apparently they do, unless the above two paragraphs are more persuasive than I expect them to be).

@devsnek
Copy link
Member

devsnek commented Apr 6, 2018

I'm in favour of at least two for all PRs, although maybe for quick reverts for unbreaking CI, etc, 1 is fine

@Trott
Copy link
Member

Trott commented Apr 6, 2018

TL;DR: At least looking at the last 30 days, there appears to be little or no evidence for "it is too hard to get a second reviewer because this code is obscure". Instead, the evidence seems to point to a lack of effort to attract a second review when there is only one, which is understandable because it's not required by our rules. You got your one review, move on.

To me, that argues for the proposed rule change.

("Too hard to get a second TSC reviewer" is another issue entirely.)

Here are all the commits from the last 30 days that have only a single reviewer:

  • Update to AUTHORS file. Totally could have gotten a second review from someone if it was required. dca09a7
  • A pair of reverts that did in fact get two reviews, but only one ended up in the metadata. (Needs two reviews under our current rules anyway because it was fast-tracked.) e37effe 026f6b7
  • A refactor for part of fs to prepare for BigInt support. I suspect this could have received a second review if it was required. It likely didn't attract much attention because nobody @-mentioned nodejs/fs or any other groups. f7049a2
  • This one only got one review but was also only open for 24 hours, so it landed in violation of our rules. Had it stayed open the additional 24 hours, would it have received a second review? Seems not at all unlikely. c5928ab
  • Finally! One that is arguably obscure! Inspector code! But again, no @-mention of nodejs/v8-inspector or any other groups. I mean, when there's one review, can we at least agree that a call ought to go out to an appropriate group? If all else fails, that group can be nodejs/collaborators. a9a1f12
  • Again, no groups @-mentioned. Again, when there's one review, can we at least agree that a call ought to go out to an appropriate group? abc8786...b7cfd27
  • 1a85328 only lists one reviewer in the metadata, but the PR has four reviewers.
  • 1c81494 doesn't seem to be obscure and no @-mention of a group or groups trying to get a few more reviews.
  • f32796f and 38bae5d: Again, not obscure, and no @-mention of a group or groups trying to get a few more reviews.
  • ab75548 and cef9097: Again, seems like an @-mention of an appropriate group (in this case, probably http2) would have likely attracted some more eyes.
  • 1f356a2 landed in violation of our existing rules (fast-tracked but only one approval) so the proposed rule change wouldn't have changed anything for the requirements for this commit. Anyway, once again, no group @-mention in the PR. Seems like that would have almost certainly racked up a few more LGTMs given the simplicity of the change.
  • Starting to see a pattern here? 9c93247 landed with one review but again, no group @-mentions in the PR. Change is tiny. Seems doubtful that it would have been too hard to find a second person to approve it. (And if so, it sure would be a lot easier to believe that if there had been a group @-mention that went unheeded.)
  • 96cb4fb: No group @-mentions in the PR.
  • 69f8523 and 3802e43 are from a PR that had no...wait for it...wait for it...yup, no group @-mentions.
  • Oh, look, it's one of mine! 5e23b65 And guess what? Yup. I didn't do a group @-mention. I'm sure that @-mentioning nodejs/testing would have attracted an additional review or four. The change simply moves a file from test/parallel to test/sequential.
  • 861285a: No group @-mentions in the PR.
  • 8ed0f34 is one of mine. No group @-mentions in the PR.
  • 8403f00 has only one Review-By line but there are two reviews in the PR.
  • 1dd9c97: No group @-mentions in the PR.
  • 48b5c11: No group @-mentions in the PR.

I would conclude that we're not using group @-mentions enough to draw attention to PRs. Seems to me like the proposed rule change would encourage people to surface PRs to relevant groups more often.

@Trott
Copy link
Member

Trott commented Apr 6, 2018

quick reverts for unbreaking CI, etc, 1 is fine

I see the motivation there, but I disagree with that. We require two for fast-tracking and that should remain. Fast-tracking is exactly when you want more than one person to approve it. The fix should be so obvious and so critical that many people approve it.

I agree with what @targos said in #19564 (comment): Make it two in all cases and then the rule is simple.

@cjihrig
Copy link
Contributor

cjihrig commented Apr 7, 2018

I would conclude that we're not using group @-mentions enough to draw attention to PRs.

I looked through that list of commits. Another somewhat common theme is cc'ing or requesting reviews from coworkers instead of the wider collaborator base. I'm not sure if it's related, but definitely a pattern I've noticed by subscribing to the issue tracker.

@joyeecheung
Copy link
Member

Thanks for the detailed investigation, @Trott . The pattern there is very useful.

@devsnek and I discussed about https://help.github.com/articles/about-codeowners/ the other day, maybe we can try putting teams in the CODEOWNERS files and see if this helps making sure PRs get multiple reviews? I would not mind we start requiring two sign-offs and suggesting people to at-mention teams for a start, and see how things go for a while.

@joyeecheung
Copy link
Member

I looked through that list of commits. Another somewhat common theme is cc'ing or requesting reviews from coworkers instead of the wider collaborator base. I'm not sure if it's related, but definitely a pattern I've noticed by subscribing to the issue tracker.

@cjihrig I also noticed that and I sometimes tend to ping handles as well, usually when I fix a TODO or some comments left in the code or when I remember someone has talked about the related code path before. When I don't have a particular person in mind I would try to ping a related team, but not always if I get a review in time, since pinging teams sometimes feel like spamming...maybe it's just me though.

@Trott
Copy link
Member

Trott commented Apr 8, 2018

since pinging teams sometimes feel like spamming

I definitely used to feel that way. Now I feel more like pinging a team is using the team for the very purpose for which it exists.

@mmarchini
Copy link
Contributor

+1 to add a CODEOWNERS file with teams on it and to start requiring two sign-offs.

Trott added a commit to Trott/io.js that referenced this issue Sep 14, 2018
Currently, changes require approval by one Collaborator in most cases.
However there are situations where two approvals are required. For
example, breaking changes require two approvals from TSC members. And
fast-tracking a request requires two approvals.

Additionally, although only one approval is strictly required, in
practice, we nearly always seek a second approval when there is only
one.

Lastly, concerns have been raised about (perhaps unintentionally) gaming
the one-approval system by suggesting a change to someone else, and then
approving that change when the user submits a pull request. This
resolves (or at least mitigates) that concern.

Fixes: nodejs#19564
@Trott Trott closed this as completed in b01e617 Sep 25, 2018
targos pushed a commit that referenced this issue Sep 25, 2018
Currently, changes require approval by one Collaborator in most cases.
However there are situations where two approvals are required. For
example, breaking changes require two approvals from TSC members. And
fast-tracking a request requires two approvals.

Additionally, although only one approval is strictly required, in
practice, we nearly always seek a second approval when there is only
one.

Lastly, concerns have been raised about (perhaps unintentionally) gaming
the one-approval system by suggesting a change to someone else, and then
approving that change when the user submits a pull request. This
resolves (or at least mitigates) that concern.

Fixes: #19564

PR-URL: #22255
Refs: #19564
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Issues and PRs related to the general management of the project.
Projects
None yet
Development

No branches or pull requests