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

doc: update collaborator guide #19116

Closed
wants to merge 6 commits into from

Conversation

BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Mar 4, 2018

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

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.
@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Mar 4, 2018
@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 4, 2018

Copy link
Member

@Trott Trott left a 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.

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
Copy link
Member

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.

[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
Copy link
Member

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

@@ -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
Copy link
Member

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

Copy link
Member Author

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?

Copy link
Member

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.

### 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
Copy link
Member

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


### Handling own pull requests

If you as a collaborator open a pull request, please always start a CI right
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Collaborator

[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
Copy link
Member

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

@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Comma after this

@@ -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
Copy link
Member

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?

@@ -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
Copy link
Member

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

* 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.
Copy link
Member

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?

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 4, 2018

Comments addressed :-)

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 4, 2018

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 4, 2018
@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 5, 2018

@nodejs/collaborators PTAL as this is important for each one of us.

`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.
Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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.

@@ -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,
Copy link
Member

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.

Copy link
Contributor

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.

@addaleax
Copy link
Member

addaleax commented Mar 5, 2018

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.

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 5, 2018

@addaleax my reasoning here is the following:

  1. it is a significant overhead in case someone has to go through the PRs and start CI after CI. It will fill up the queue immediately and slow down our machines. If we have a CI run right away the workload is distributed, even though there are more runs overall.
  2. there should not be any overhead by extra CI outcome checks. I think the intermediate ones are mainly to make sure we can tick the ready label on the PR and to see if the linter fails / if all CIs fail (CI status). That way we have a early signaling instead of having to check that again later.
  3. about having to change something because of comments: there are multiple PRs where it would be fine with the first CI even though it is not the average case. But especially other OS failures can be detected right away instead of seeing this later on and having to comment again when someone wants to land the PR.

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.
Copy link
Member

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?).

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 5, 2018

So one thing got pretty clear for me: I think the name ready is confusing and we should find a new name for it. The reason is that it is not obvious that there are still steps left to do if the label sticks on a PR.

So far I could not come up with a great name but maybe something like pre-land or verify-ready?

@gibfahn
Copy link
Member

gibfahn commented Mar 5, 2018

So one thing got pretty clear for me: I think the name ready is confusing and we should find a new name for it. The reason is that it is not obvious that there are still steps left to do if the label sticks on a PR.

I think I missed the original discussion, but what is the benefit of the ready label? You still have to check that the PR is ready before landing, as things may have changed since ready was added.

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.

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 5, 2018

@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.

@addaleax
Copy link
Member

addaleax commented Mar 5, 2018

I think I missed the original discussion, but what is the benefit of the ready label?

@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.

The reason is that it is not obvious that there are still steps left to do if the label sticks on a PR.

It’s mostly outward communication: The naming basically indicates that there is nothing left to do on the author’s side.

@mcollina
Copy link
Member

mcollina commented Mar 5, 2018

how about "author ready" then?

Copy link
Contributor

@GlenTiki GlenTiki left a 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.

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.
Copy link
Contributor

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.

@@ -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,
Copy link
Contributor

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.

@addaleax
Copy link
Member

addaleax commented Mar 5, 2018

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.

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 5, 2018

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 lite CI (documentation changes) or a regular one.

@addaleax addaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 5, 2018
@addaleax
Copy link
Member

addaleax commented Mar 5, 2018

I’ve changed the name to author ready. Renaming labels is cheap! :)

@gibfahn
Copy link
Member

gibfahn commented Mar 5, 2018

@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.

@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.

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.

@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 6, 2018

Comments addressed. PTAL.

CI https://ci.nodejs.org/job/node-test-pull-request-lite/234/

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 6, 2018
@BridgeAR
Copy link
Member Author

BridgeAR commented Mar 8, 2018

@nodejs/collaborators PTAL. If there are no further comments, I would like to land this soon.

Copy link
Member

@mcollina mcollina left a 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
Copy link
Contributor

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?

Copy link
Member

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)

Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

@Trott Trott Mar 8, 2018

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:
Copy link
Contributor

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.

Copy link
Member

@Trott Trott Mar 8, 2018

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?

Copy link
Member Author

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?

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

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).
Copy link
Member

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.

Copy link
Member Author

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).

Copy link
Member

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.)

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@addaleax @mhdawson is the new wording OK for you? If not: do you have a suggestion how to reword it?

Copy link
Contributor

@GlenTiki GlenTiki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BridgeAR
Copy link
Member Author

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.

@addaleax addaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 11, 2018
@BridgeAR
Copy link
Member Author

* 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.
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

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

BridgeAR added a commit to BridgeAR/node that referenced this pull request Mar 21, 2018
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>
@BridgeAR
Copy link
Member Author

Thanks a lot to everyone :-)

Landed in 1b8746f

@BridgeAR BridgeAR closed this Mar 21, 2018
MylesBorins pushed a commit that referenced this pull request Mar 22, 2018
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>
@BridgeAR BridgeAR deleted the update-collaborators branch April 1, 2019 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.