-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
doc: update collaborator guide #19116
Conversation
This also updates some parts of the onboarding. It is mainly about how to handle pull requests, how and when to start a CI, when to add the `ready` label and some other minor changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of tiny nits, but I like where you're going with this.
COLLABORATOR_GUIDE.md
Outdated
or a pull request. | ||
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues) | ||
Collaborators should take full responsibility for managing issues and pull | ||
requests they feel qualified to handle. Just make sure this is done while being |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Get rid of Just
.
COLLABORATOR_GUIDE.md
Outdated
[See "Who to CC in issues"](./doc/onboarding-extras.md#who-to-cc-in-issues) | ||
Collaborators should take full responsibility for managing issues and pull | ||
requests they feel qualified to handle. Just make sure this is done while being | ||
mindful of these guidelines, the opinions of other Collaborators and guidance of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: add a comma after Collaborators
COLLABORATOR_GUIDE.md
Outdated
@@ -75,47 +77,86 @@ Collaborators or additional evidence that the issue has relevance, the | |||
issue may be closed. Remember that issues can always be re-opened if | |||
necessary. | |||
|
|||
### Ready to land pull requests | |||
|
|||
A pull request that is still awaiting the minimum review time is considered |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: is considered
-> may be labeled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this sentence my intention was to explain what ready
stands for and not that we should label the PR accordingly. That is done in the sentence afterwards. Do you still want me to change that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a nit; if you think it's better the way it is, then that works for me.
COLLABORATOR_GUIDE.md
Outdated
### Ready to land pull requests | ||
|
||
A pull request that is still awaiting the minimum review time is considered | ||
`ready` as soon as the CI got kicked off, it got at least one approval and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Change first got
to has been
and the second got
to has
Nit: Add a comma after approval
COLLABORATOR_GUIDE.md
Outdated
|
||
### Handling own pull requests | ||
|
||
If you as a collaborator open a pull request, please always start a CI right |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Collaborator
COLLABORATOR_GUIDE.md
Outdated
[build](https://github.com/nodejs/build/issues)) or not and open new issues | ||
in case they are not. If not CI was run or the run is outdated because code | ||
was pushed after the last run, please first start a new CI and wait for the | ||
result. If no CI is required, please leave a comment in case non is already |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: non
-> none
, I think
COLLABORATOR_GUIDE.md
Outdated
@@ -655,12 +701,12 @@ hint: See the 'Note about fast-forwards' in 'git push --help' for details. | |||
``` | |||
|
|||
That means a commit has landed since your last rebase against `upstream/master`. | |||
To fix this, fetch, rebase, run the tests again (to make sure no interactions | |||
between your changes and the new changes cause any problems), and push again: | |||
To fix this pull with rebase from upstream and run the tests again (to make sure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Comma after this
doc/onboarding.md
Outdated
@@ -86,6 +86,10 @@ onboarding session. | |||
`semver-major` label | |||
* When adding a `semver-*` label, add a comment explaining why you're adding | |||
it. Do it right away so you don't forget! | |||
* Please add the `ready` label for PRs where the CI was just kicked off and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: was just kicked off
-> has been started
?
doc/onboarding.md
Outdated
@@ -86,6 +86,10 @@ onboarding session. | |||
`semver-major` label | |||
* When adding a `semver-*` label, add a comment explaining why you're adding | |||
it. Do it right away so you don't forget! | |||
* Please add the `ready` label for PRs where the CI was just kicked off and | |||
that are good to go (no outstanding review items), pending the CI outcome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: are good to go (no outstanding review items)
-> have no outstanding review items
doc/onboarding.md
Outdated
* Please add the `ready` label for PRs where the CI was just kicked off and | ||
that are good to go (no outstanding review items), pending the CI outcome | ||
and possibly the 48/72 hour waiting rule and the necessary LGs for | ||
semver-major. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence can use some editing for clarity. If all else fails, maybe change the last part to a bulleted list or something?
Comments addressed :-) |
@nodejs/collaborators PTAL as this is important for each one of us. |
COLLABORATOR_GUIDE.md
Outdated
`ready` as soon as the CI has been started, it has at least one approval, and it | ||
has no outstanding review comments. Please always make sure to add the | ||
appropriate `ready` label to the PR in that case and remove it again as soon as | ||
that condition is not met anymore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought ready
was ok to land, so CI has run and someone has checked if this could land. So ready
should mean "ready to land", not "check CI because this could be ready to land".
Also, it should include a CITGM run for semver-major.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mcollina When I introduced that label, I didn’t intend it to have that meaning.
Practically speaking, it’s easier this way; you can kick off CI and add the label, because you’re planning to go through the list of open PRs with that label, and can then check CI.
In particular, it avoids having to keep track of which PRs have CIs started and which not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @addaleax explained it is meant to be the way it is described right now. This has helped me (and probably others just as much, but I can not speak for others) quite a lot already to keep a better overview of PRs that should be checked again.
If everything was already checked there is little point besides the waiting time to have the label at all because in that case the PR should just be merged instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it is easier and it's what we want, and it's probably the right moment to apply a tag. However, I don't think a PR is "ready to land" if it does not have CI passing, so the "ready" term is very misleading to me: I've landed something that should not have landed because of it. It's definitely not ready to land if CI has not been checked for which failures are infrastructure or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd have to agree with @mcollina on this. Perhaps ready
in this case should really mean ready to consider landing
. Before the PR can actually land, a look at the CI results is required.
doc/onboarding.md
Outdated
@@ -86,6 +86,13 @@ onboarding session. | |||
`semver-major` label | |||
* When adding a `semver-*` label, add a comment explaining why you're adding | |||
it. Do it right away so you don't forget! | |||
* Please add the `ready` label for PRs where: | |||
* the CI has been started, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CI has been successfully run.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If CI was required, as some of this documentation indicates it may not be.
Not a fan of requiring all PRs to constantly have CI runs, tbh. With our current setup, doing that & checking the outcomes takes significant time. At least when a PR has just been opened, it’s wasteful because there almost certainly are change requests coming up. What matters in the end is that PRs have a recent CI run available for most of the time, not always. |
@addaleax my reasoning here is the following:
|
COLLABORATOR_GUIDE.md
Outdated
Landing your own pull requests distributes the work load for each Collaborator | ||
equally. If it is still awaiting the | ||
[minimum time to land](#waiting-for-approvals), please add the `ready` label to | ||
it so it is obvious that the PR can land as soon as the time ends. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sentence assumes that a "ready to land" means it has a passing CI. However, in the previous paragraph it's defined as "a PR with CI started", which definitely does not meet our criteria to landing them (we want CI passing, right?).
So one thing got pretty clear for me: I think the name So far I could not come up with a great name but maybe something like |
I think I missed the original discussion, but what is the benefit of the I guess it means you can check back to when the ready tag was last added to see if anything is outstanding since then, but I'm not sure how useful that actually is. |
@gibfahn the label is a helper in case you want to go ahead and know which PRs are likely good to go. The label can be attached before the waiting time is over and you just check which ones are either fast tracked or over the time and then you check the CI result. If it is green, go ahead and land the PR. Otherwise remove the label and comment that something is wrong. That is much much less work than randomly selecting a PR that might look ready. Because first, you have to see if there are outstanding comments, second you have to probably start a new CI and wait at least an hour for the result and then come back to check if it was green to actually be able to land the PR. |
@gibfahn When I added it, my workflow was basically going through open PRs without that label, checking whether there was anything needed to be done for them, kick off CI if necessary, adding the label & then either landing it or pointing out CI failures.
It’s mostly outward communication: The naming basically indicates that there is nothing left to do on the author’s side. |
how about "author ready" then? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left comments on the "exception" to running CI. It might be good to document when that exception can be made.
COLLABORATOR_GUIDE.md
Outdated
All modifications to the Node.js code and documentation should be performed via | ||
GitHub pull requests, including modifications by Collaborators and TSC members. | ||
A pull request must be reviewed, and must also be tested with CI, before being | ||
landed into the codebase. There may be exception to the latter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"There may be exception to the latter". When? Clarity would be useful here.
doc/onboarding.md
Outdated
@@ -86,6 +86,13 @@ onboarding session. | |||
`semver-major` label | |||
* When adding a `semver-*` label, add a comment explaining why you're adding | |||
it. Do it right away so you don't forget! | |||
* Please add the `ready` label for PRs where: | |||
* the CI has been started, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If CI was required, as some of this documentation indicates it may not be.
Also, one more thought: For collaborators that want to get a PR into Node, they can do pretty much everything they need to do for that on their own. That includes running CI, and the assumption should be that they want to merge that PR so they are motivated to keep a PR going anyway, with the extra rules from here in place or not. If we want to reduce overhead in keeping track of PRs, a better solution might be easier starting and checking of CI runs; I think @joyeecheung was doing a decent amount of work for the automatic tooling? For PRs from non-collaborators, that’s a different story, because they can’t start CI anyway. I would very much be +1 on recommending the first approver of a PR to kick off CI for it. |
I am definitely +1 on automating the CIs for collaborators! We could actually go so far and check the changed files to see if we have to start a |
I’ve changed the name to |
Thanks for the explanations, that does make sense I guess. I agree that an automated solution would probably be better, but this does seem useful in the interim. |
Comments addressed. PTAL. CI https://ci.nodejs.org/job/node-test-pull-request-lite/234/ |
@nodejs/collaborators PTAL. If there are no further comments, I would like to land this soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* The merge method will add an unnecessary merge commit. | ||
* The squash & merge method has been known to add metadata to the commit | ||
title (the PR #). | ||
* If more than one author has contributed to the PR, keep the most recent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this point a bit confusing? If this is an advice, should we get it out of "Reasons for not using..." part? If this is a green button artifact, should the "keep" become "keeps" and should the culprit method be mentioned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I'd strictly be in favor of keeping code by authors who are not core collaborators in PRs even if they are not the latest. I think that if there are multiple contributors we should keep commits from all of them (perhaps with the same commit message)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It requires judgment, particularly around how significant the contribution is. If someone contributed something significant, squashing commits in a way that removes them as an author should certainly be avoided. That can look like (or can actually be) stealing credit for someone else's work. On the other hand, we do have to make sure that all tests pass with each commit, and sometimes squashing is the most reasonable way to achieve that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the point that this is confusing but I would really like to keep this out of the scope of this PR. I did not change this part, so I guess that is fine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, hadn't noticed that this content has not changed and this is just a formatting/white-space change to this part. Yeah, the comments should be addressed in another PR IMO.
@@ -86,6 +86,13 @@ onboarding session. | |||
`semver-major` label | |||
* When adding a `semver-*` label, add a comment explaining why you're adding | |||
it. Do it right away so you don't forget! | |||
* Please add the `author-ready` label for PRs where: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this list seems confusing grammar-wise. "where:" prefix does not combine smoothly with points like "that have no outstanding review comments and". It seems we have to unify the grammatical pattern of the points or reword the introductory sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the list is a bit confusing. the CI has been started
and pending the CI outcome
seem redundant with each other, for example. Or maybe there's a nuance there that I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
About the CI has been started
and pending the CI outcome
: It should be clear that a) the CI has to be started and b) it does not have to be done when adding the label. Do you maybe have a better wording for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think CI has been started
is sufficient. But if you want to be explicit, maybe CI has been started (not necessarily finished)
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed.
COLLABORATOR_GUIDE.md
Outdated
after (see [testing and CI](#testing-and-ci) for further information on how to | ||
do that) and post the link to it as well. Please also make sure that you start a | ||
new CI after each update (due to e.g., a change request in a review or due to | ||
rebasing). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure starting a CI right after opening is the best way to go. I often wait until there are a few reviews to see if I'm going to have to make any updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep it this way until we get that part automated. Do you feel strongly about it?
See the former discussion for the reasons, e.g., #19116 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BridgeAR Can we hold off landing this before we have consensus here?
Or, alternatively, could you reword this as a suggestion?
(That is a general feeling I have about this PR, btw: I don’t think we should impose our own workflows on other people.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally am not a huge fan about starting a CI always either ^^. The only reason why I think it is good, is that it improves the handling of the PRs as far as I see it.
I also believe that we all want to have a automation of this for collaborators, so I think this is just a intermediate step. I am going to open a issue in build to get some insight in how we might be able to automate it.
This is, by all means, not meant to impose a workflow on someone. Even with the current wording I do not see it as something mandatory, just as something that is really nice to have. I am going to tone down a wording a bit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reworded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
As far as I see it there is no one against landing this as is right now, right? Because in that case I would like to land this on Monday. |
* Please add the `author-ready` label for PRs where: | ||
* the CI has been started (not necessarily finished), | ||
* no outstanding review comments exist and | ||
* at least one collaborator approved the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally would not add the label if it's semver-major and has not received 2 TSC approval yet...probably just a different interpretation of the label though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no strong opinion either way. It was just my current interpretation. Because I feel the author is ready as soon as a collaborator approved it. We have to make sure it gets enough LGs one way or the other and we know that we have to trigger the TSC in case some are missing.
Shall I change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BridgeAR We can revisit that later, probably need to update the label description as well if we are going to change its meaning
This also updates some parts of the onboarding. It is mainly about how to handle pull requests, how and when to start a CI, when to add the `ready` label and some other minor changes. PR-URL: nodejs#19116 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Glen Keane <glenkeane.94@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Thanks a lot to everyone :-) Landed in 1b8746f |
This also updates some parts of the onboarding. It is mainly about how to handle pull requests, how and when to start a CI, when to add the `ready` label and some other minor changes. PR-URL: #19116 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Chen Gang <gangc.cxy@foxmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Glen Keane <glenkeane.94@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This also updates some parts of the onboarding. It is mainly about
how to handle pull requests, how and when to start a CI, when to add
the
ready
label and some other minor changes.I believe that adopting these suggestions will improve our general PR handling a lot.
It can probably be further polished though, so I am looking forward to your comments.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
doc