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 CONTRIBUTING.md with backport info #10343

Closed
wants to merge 3 commits into from

Conversation

sxa
Copy link
Member

@sxa sxa commented Dec 19, 2016

Checklist
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

Add information on getting fixes into the LTS releases, and also
some information on what is needed for getting fixes to dependencies
back into the Node.js codebase.

While the top level CONTRIBUTING.md is great for people contributing into the master branch, it's not so clear on the process for getting changes into the current and LTS releases. This PR has some proposed additions to describe the process that contributors should know about, and what they may have to do, to get their fixes back into the LTS releases after they have got them into master.

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. lts-watch-v6.x labels Dec 19, 2016
CONTRIBUTING.md Outdated

Items may be selected as candidates for inclusion into the "active LTS"
branch(es), especially if they are bug fixes. This will be at the
discretion of someone the person releasing that new version by default, but
Copy link
Member

Choose a reason for hiding this comment

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

Extra "someone" here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed - cheers

CONTRIBUTING.md Outdated
its-watch-v6.x) and adding a suitable comment. If the changes can just be
cherry picked across without merge conflicts this will often be done by a
member of the release team, but if not then they may request a manual merge,
for which a pull request will be required.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the dont-land-on-XXX deserves mention, as the opposite of lts-watch

Copy link
Member Author

Choose a reason for hiding this comment

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

A fair point, although I'm not sure how often a non-collaborator would choose to add it. Could be useful for them to know about it if it's added to one of their PRs though. Done.

CONTRIBUTING.md Outdated
Items may be selected as candidates for inclusion into the "active LTS"
branch(es), especially if they are bug fixes. This will be at the
discretion of the person releasing that new version by default, but
anyone can request a backport by adding the label "its-watch-vX.x" (e.g.
Copy link
Member

Choose a reason for hiding this comment

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

Well, anyone can request that a collaborator add the lts-watch-vX.x or dont-land-on-vX.x labels by adding a suitable comment.

Also "its-watch-vX.x" -> lts-watch-vX.x ( i -> l and use backticks) for consistency.

We should also probably link to https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md#how-can-i-help

@gibfahn
Copy link
Member

gibfahn commented Dec 20, 2016

General idea makes sense to me, but we should be careful about duplicating information about LTS dates and backporting guides from the LTS repo and the LTS section on the Collaborator guide.

EDIT: I suspect the answer is to move some of the Collaborator guide info into this document.

@jasnell
Copy link
Member

jasnell commented Dec 23, 2016

/cc @thealphanerd

@gibfahn gibfahn self-assigned this Dec 23, 2016
Copy link
Contributor

@MylesBorins MylesBorins left a comment

Choose a reason for hiding this comment

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

I really appreciate the work that has gone into this, and it is important information to document.

My primary concern with the current iteration is that it is a bit verbose. I've made some inline suggestions of how to substantially trim down the copy here.

Please let me know if you think that my suggestions are going to over simplify things.

CONTRIBUTING.md Outdated
member of the release team, but if not then they may request a manual merge,
for which a pull request will be required. Also related to the lts-watch-
labels, if you want to ensure something is not backported, label it with
dont-land-on-vX.x (e.g. dont-land-on-v6.x)
Copy link
Contributor

Choose a reason for hiding this comment

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

I find the above paragraph a bit verbose and not entirely accurate. Perhaps consider

Any change can be considered for LTS by applying the appropriate lts-watch-vX.x label for the branch you would like it backported to. If a commit is not to be considered for backporting please apply the dont-land-on-vX.x label. If it can be cherry-picked cleanly it will be done by someone from the release team, if a manual backport is required you may be asked to submit a PR against the staging branch of the release line the backport is targetting.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep that wording works for me too and I don't think it is oversimplifying. Have adjusted accordingly.

CONTRIBUTING.md Outdated
details of each are on the LTS schedule page. Once Pull Requests have
landed in master they will often automatically become candidates for the
next version of the "current" release, in which case the process mentioned
above regarding cherry picking and potentially pull requests will apply.
Copy link
Contributor

Choose a reason for hiding this comment

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

While the information regarding the current release is important, is this the best place to have it? It is mentioned above that commits should live in current for at least two weeks. I think we can remove this paragraph

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 get where you're coming from, but do we explicitly document it anywhere else that can be referenced? There is the diagram on the LTS page, but there are almost no other references to what "current" means (as distinct from LTS) anywhere else in the document (and the section in the LTS doc on NaN currently has a reference to "current LTS" which possibly doesn't help - I'll submit a change to make that "current and Active LTS")

The LTS page says "New semver-major releases of Node.js are cut from master every six months." but it doesn't specifically call that out as being the definition of "current". I could add the word current in a few places in the LTS document if we choose to drop it from CONTRIBUTING.md if that would be preferable, but I'm not too keen on just dropping it at the moment.

Copy link
Member

@gibfahn gibfahn Dec 28, 2016

Choose a reason for hiding this comment

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

+1 to documenting this in the LTS page and then linking to it here, in which case I assume you could collapse the LTS Contributions and Current Release sections into one Backporting section.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated to remove the section on the basis that nodejs/Release#174 lands, clarifying what "current" means.

CONTRIBUTING.md Outdated
```

Any other relevant links to pull requests can be included as "Ref:" links in
the PR message
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that this needs to be an entire section. The abridged version of the top paragraph I suggested could likely be supplemented to include the additional information found here

A manually backported change should include the same set of commits that originally landed on master, this includes all meta data. The easiest way to do this is to use git cherry-pick

   $ git cherry-pick SHA-OF-ORIGINAL-COMMIT
   // fix all conflicts that are reported
   $ git cherry-pick --continue

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I'm good with that. Done.

@gibfahn
Copy link
Member

gibfahn commented Dec 28, 2016

@sxa555 If you rebase against master, it's probably worth putting the extra info in the Additional Notes section (it didn't exist when you opened this PR).

Add information on getting fixes into the LTS releases, and also
some information on what is needed for getting fixes to dependencies
back into the Node.js codebase.

doc: Separate out current release from LTS in CONTRIBUTING.md

doc: Add info on bumping V8 path level
CONTRIBUTING.md Outdated
familiar with the LTS information and schedules at
https://github.com/nodejs/LTS#lts-schedule

Items which have already landed on master will be candidates for the
Copy link
Member Author

Choose a reason for hiding this comment

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

@thealphanerd Are you ok with "Items" at the start of this paragraph? I'm thinking I'd prefer "commits" or "Pull Requests" now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to "commits"

Copy link
Member

@gibfahn gibfahn left a comment

Choose a reason for hiding this comment

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

Various nits

CONTRIBUTING.md Outdated

Before backporting or contributing to the LTS releases make sure you are
familiar with the LTS information and schedules at
https://github.com/nodejs/LTS#lts-schedule
Copy link
Member

Choose a reason for hiding this comment

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

LTS information and schedules at https://github.com/nodejs/LTS#lts-schedule -> [LTS information and schedules](https://github.com/nodejs/LTS#lts-schedule).

CONTRIBUTING.md Outdated
For developing new features and bug fixes, the `master` branch should be
pulled and built upon. See the section on
[backporting](#backporting-to-current-and-lts-branches) if you would like
the fix to be backported.
Copy link
Member

Choose a reason for hiding this comment

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

if you would like the fix to be backported.

I'm thinking that new contributors probably have no idea if they'd like something to be backported, maybe something like:
if you think the fix should be applied to current release lines (or something).

Commits which have already landed on master will be candidates for the
"current" release branch(es) and can then also become candidates for
inclusion into the "Active LTS" branch(es), especially if they are bug
fixes. Any change can be considered for LTS by requesting @nodejs/lts apply
Copy link
Member

Choose a reason for hiding this comment

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

@nodejs/lts -> a collaborator

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 wanted it to be a bit more specific bearing in mind this should be a fairly self-contained document for beginners. I could point to a list of collaborators and say "Pick a random one from this list" but I would think that this would be a more useful default action for newbies.

CONTRIBUTING.md Outdated
"current" release branch(es) and can then also become candidates for
inclusion into the "Active LTS" branch(es), especially if they are bug
fixes. Any change can be considered for LTS by requesting @nodejs/lts apply
the appropriate lts-watch-vX.x label for the branch you would like it
Copy link
Member

Choose a reason for hiding this comment

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

needs backticks:

lts-watch-vX.x -> `lts-watch-vX.x`

CONTRIBUTING.md Outdated
fixes. Any change can be considered for LTS by requesting @nodejs/lts apply
the appropriate lts-watch-vX.x label for the branch you would like it
backported to. If a commit is not to be considered for backporting please
ask for it to be labelled with dont-land-on-vX.x. If it is to be backported
Copy link
Member

Choose a reason for hiding this comment

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

backticks

CONTRIBUTING.md Outdated
backported to. If a commit is not to be considered for backporting please
ask for it to be labelled with dont-land-on-vX.x. If it is to be backported
and can be cherry-picked cleanly it will be done by someone from the release
team. Generally all changes should have landed in the current release for
Copy link
Member

Choose a reason for hiding this comment

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

@MylesBorins Should all changes should be qualified, maybe all significant changes or all functional changes?

CONTRIBUTING.md Outdated

If a manual backport is required when porting your change to the current or
LTS branches you may be asked to submit a PR against the staging branch of
the release line the backport is targetting (vX.x-staging). The easiest way
Copy link
Member

Choose a reason for hiding this comment

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

backticks

CONTRIBUTING.md Outdated
```

If you need to reference other relevant pull requests regarding the
conflicts, list them as "Ref:" links in the PR message.
Copy link
Member

Choose a reason for hiding this comment

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

Amazingly there's no standard for using Ref: vs Refs: (and it's not mentioned anywhere). I feel we should pick one and document it.

EDIT: #10670

Copy link
Member

Choose a reason for hiding this comment

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

s/Ref:/Refs:/

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'd already made that change but apparently hadn't pushed it. I have now.

@gibfahn
Copy link
Member

gibfahn commented Jan 19, 2017

ping @sxa555

Copy link
Member

@gibfahn gibfahn left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding the line about including "vX.x backport in the PR title".

@gibfahn
Copy link
Member

gibfahn commented Jan 19, 2017

@sam-github @richardlau @MylesBorins any other issues?

I guess also cc/ @nodejs/lts

For developing new features and bug fixes, the `master` branch should be pulled
and built upon.
For developing new features and bug fixes, the `master` branch should be
pulled and built upon. See the section on
Copy link
Member

Choose a reason for hiding this comment

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

The use of "should" in this first sentence has always bothered me. The master branch is the branch for new features and bug fixes, not should be. So perhaps changing this to:

New features and bug fixes are landed in `master` first, then backported to release
branches. See the section on [backporting]...

```
$ git cherry-pick HASH
// fix all conflicts that are reported
$ git cherry-pick --continue
Copy link
Member

Choose a reason for hiding this comment

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

might be worthwhile mentioning that git add {fixed-file} is needed before continuing

@gibfahn gibfahn mentioned this pull request Feb 1, 2017
2 tasks
@jasnell
Copy link
Member

jasnell commented Mar 24, 2017

Is this superseded by #11099?

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Mar 24, 2017
@MylesBorins
Copy link
Contributor

@jasnell I believe so

@TimothyGu
Copy link
Member

Closing as it is superseded by #11099.

@TimothyGu TimothyGu closed this Apr 22, 2017
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. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants