| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Just a suggestion but how about a capital N? vN.x-staging might be a bit clearer.
Sorry, something went wrong.
|
Does this cover the same ground as #10343? If so I guess we should decide whether we want this as a separate guide linked to from the COLLABORATOR_GUIDE (i.e. this PR), or just a note at the bottom of the COLLABORATOR_GUIDE #10343. I'm undecided. |
Sorry, something went wrong.
|
@gibfahn oh wow, thanks. I totally missed that one |
Sorry, something went wrong.
|
There's likely value in separating it out |
Sorry, something went wrong.
There was a problem hiding this comment.
Great to see this documented so the process can become more regular.
Sorry, something went wrong.
There was a problem hiding this comment.
"as a scratch"
Sorry, something went wrong.
There was a problem hiding this comment.
what is the label? the labelelling has to distinguish things that should be backported (but aren't landing cleanly) from things that should not be backported (clean cherry-pick or not)
Sorry, something went wrong.
There was a problem hiding this comment.
Related: nodejs/github-bot#120
Sorry, something went wrong.
There was a problem hiding this comment.
Yea I wasn't quite sure how to word it being as the label is different for each release line.
I agree that we should have 1 label for something that doesn't land and another for 1 that shouldn't land. That being said, I think the reasoning for not having them is that we should land everything in master that isn't a breaking change and a breaking change will be marked as semver major.
Sorry, something went wrong.
There was a problem hiding this comment.
"certain" is vague, but elaborated on below, maybe state that criteria for consideration depends on the the target version (current or LTS)?
Sorry, something went wrong.
There was a problem hiding this comment.
actually, not elaborated on below, I don't think.
Sorry, something went wrong.
There was a problem hiding this comment.
Yea, I hear ya. It is a bit difficult to find the middle ground between spilling my guts on cutting releases vs the actual intention of the guide. I'll improve this.
Sorry, something went wrong.
There was a problem hiding this comment.
I think ideally this would link to the part of releases.md which talks about the criteria, not sure if there is currently anything in there to link to though.
Sorry, something went wrong.
There was a problem hiding this comment.
There is not anything in the releases.md document regarding this. I'll work on documenting that more specifically as well.
Sorry, something went wrong.
There was a problem hiding this comment.
I don't think that level of information belongs in this doc, if we can actually figure out what "certain" means then it belongs elsewhere anyway.
Sorry, something went wrong.
There was a problem hiding this comment.
lenient than what?
Sorry, something went wrong.
There was a problem hiding this comment.
shouldn't semver-major be mentioned here somewhere?
Sorry, something went wrong.
There was a problem hiding this comment.
This is unusual, isn't it? that a backport is needed from master to Current? Shouldn't master always pick clean to Current?
Sorry, something went wrong.
There was a problem hiding this comment.
not necessarily. Master takes semver-major changes. I see a lot of conflicts from changes that go in after a major change so they have to be backported quite a bit in that case.
Sorry, something went wrong.
There was a problem hiding this comment.
Recommending a consistent branch naming is a good thing: backport-<PR#>-to-<target node version>
Sorry, something went wrong.
There was a problem hiding this comment.
I like it. Will update
Sorry, something went wrong.
There was a problem hiding this comment.
what do you mean by "deps not present"? If its a manual backport, the code is changing, sometimes a lot, should the commit message still be exactly the same?
Sorry, something went wrong.
There was a problem hiding this comment.
That's a fair point. I guess the answer in that case would be "it depends". I don't think we should have identical commit messages if they are incorrect, but I do think we need a better way to show, hey this is a backport commit (like the v8 backports).
Sorry, something went wrong.
There was a problem hiding this comment.
Instead of an example, I suggest we be prescriptive. I've been doing "v4.x backport: proces: improve...", I thought that was requested, but I'm happy to do above instead.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd rather we put "v4.x backport" at the beginning; it makes it stand out more.
+1 for specifying exactly.
Sorry, something went wrong.
There was a problem hiding this comment.
that works for me. I added this so we could actually come up with a specified way that we request (and can edit to make sure is followed). I would rather we be opinionated on this. It makes looking for backports easier IO
Sorry, something went wrong.
There was a problem hiding this comment.
neither the commit above, nor the PR it links to, has these two lines in the commit message or PR description, can you point to where they should be? In the commit message when it lands, the backport description?
Maybe our process should add another PR-URL-like piece of metadata for commits that had to be reworked and PRed as a backport because they didn't land clean? The current metadata seems like a bit of a lie, the reviewers never saw the particular code diff that is landing in the backport.
Sorry, something went wrong.
There was a problem hiding this comment.
I thought that the procedure was to get LGTMs on the backport PR, and include those (not the LGTMs from the original PR) when landing.
Sorry, something went wrong.
There was a problem hiding this comment.
I do think we need to come up with an additional piece of metadata for the original PR-URL. Part of the reason for opening this is so we can get to the point where everyone knows how to handle these, because right now, things are kind of all over the place. +1 for including the reviewers from the backport PR vs the original PR
Sorry, something went wrong.
There was a problem hiding this comment.
landing->land
Also, do we do three-way merging (git am -3)? If so it might be worth specifying that.
Sorry, something went wrong.
There was a problem hiding this comment.
no, we only cherry-pick (or I only cherry-pick). /cc @nodejs/release do any of yall actually fixup conflicts when cherry-picking?
Sorry, something went wrong.
There was a problem hiding this comment.
I'm pretty sure I got this (in my ~/.gitconfig) from @MylesBorins :
pa = "!curl -L $1.patch | git am --whitespace=fix #" # Patch Github PR
pap = "!curl -L $1.patch | git am -3 --whitespace=fix #" # Please patch it
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, when landing a commit for pushing to master, we use git am. For backporting, the goal is to get the commit unmodified, so we use git cherry-pick <sha>.
Sorry, something went wrong.
There was a problem hiding this comment.
Related: nodejs/github-bot#120
Sorry, something went wrong.
There was a problem hiding this comment.
Might be easier to just say something like:
git clone -o upstream https://github.com/nodejs/node.git && cd node
git remote add fork git@github.com:$USER/node.git
git fetch --allI'd find it easier to understand, and it doubles as a guide for someone not sure about setting up multiple remotes.
Sorry, something went wrong.
There was a problem hiding this comment.
sure, although I would think that origin is more common than fork
Sorry, something went wrong.
There was a problem hiding this comment.
I like to be specific in instructions, origin can end up being upstream or fork.
Sorry, something went wrong.
There was a problem hiding this comment.
I guess I'm a lot more used to https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-1-fork
Sorry, something went wrong.
There was a problem hiding this comment.
Okay fair enough, makes sense to keep it consistent then.
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe specify cherry-picking the commit across?
git cherry-pick $SHA # Use your commit hash
Sorry, something went wrong.
There was a problem hiding this comment.
Don't need the ?
Sorry, something went wrong.
|
We should definitely link to this from the COLLABORATOR_GUIDE. |
Sorry, something went wrong.
This guide should help answer questions for contributors that are not familiar with the backport process.
|
Ok, updated. PTAL. I went ahead and added to the COLLABORATOR_GUIDE as well. I removed an example commit since I (unfortunately) couldn't find one that actually used the backport PR-URL instead of the original. Thanks! |
Sorry, something went wrong.
| ```shell | ||
| git cherry-pick $SHA # Use your commit hash | ||
| ``` | ||
|
|
There was a problem hiding this comment.
At this point do we need to say what you should expect to see and how to fix it up? I assume that following this guide is only needed if the cherry-pick is going to fail (I'm also assuming that $SHA is for the original commit that went into master)
Sorry, something went wrong.
There was a problem hiding this comment.
I'll clarify. Yes, this guide is for when the releaser cannot cleanly cherry-pick the commit and requests a backport.
Sorry, something went wrong.
| ``` | ||
|
|
||
| * The commit message should be as close as possible to the commit message on the | ||
| master branch, unless the commit has to be different due to dependencies that |
There was a problem hiding this comment.
If I understand correctly, this means the metadata(PR urls, reviewers, etc) should remain the same as the original commit?
Sorry, something went wrong.
There was a problem hiding this comment.
In the case of a backport, I don't think it should. I'll clarify that.
Sorry, something went wrong.
|
Maybe we should have explicit meta-data on backport commits, like Backport: <URL to PR being backported>? Edit: which I realize from email notifications that @evanlucas already suggested, but the comment is hidden above. |
Sorry, something went wrong.
|
Having another line seems like a good idea, so @sam-github are you suggesting that if we have: PR-URL: url1 Backport: url2 then PR-URL: url1 is the original PR, and Backport: url2 is the vN.x Backport PR (not the other way around)? I guess it might make sense to keep PR-URL: the same across backports. |
Sorry, something went wrong.
|
@sam-github @gibfahn I agree. I went ahead and added it in. PTAL. Thanks! |
Sorry, something went wrong.
|
In the metadata of the backport commit, who should be displayed as Reviewed-By?
|
Sorry, something went wrong.
|
@targos good point. IMO, if a backport PR is necessary, it should go through the standard process of reviewers. I think the reviewers from the backport PR should be listed, not the reviewers from the original PR. |
Sorry, something went wrong.
|
@gibfahn I think PR-URL should point to the PR where this specific commit was reviewed, and the meta-data should refer to the specific (backport) PR. So, something like this: The original PR would be: commit message PR-URL: original PR (as it is now) ... (metadata as it is now) then it gets backported and PRed, a new PR (obviously): commit message PR-URL: the URL for the PR where the backport was proposed and discussed Backport-of: the URL to the original PR that needed to be backported ... metadata of *the backport* (not a copy of the original) I changed Backport to Backport-of because your question made me realize calling the original PR a "backport" is strange and confusing. If its way too much work, maybe it can't happen, but landing backports, which are rewritten PRs, with metadata claiming they have been reviewed by people who may not in fact have reviewed the rewrite seems misleading. |
Sorry, something went wrong.
|
We have so far been using the original PR for the PR-URL and including the backport PR as a Refs: This has not been consistent though. I'm up for whatever re: labelling as long as it is consistent and documented |
Sorry, something went wrong.
@sam-github yeah, that was my issue. I'm fine with using Backport-of: for the original PR to master, it makes sense that `PR-URL:`` should always point to the actual PR that added this specific commit. The Reviewed-By: field is (in my experience) already redone to only contain the reviewers of the backport PR. |
Sorry, something went wrong.
There was a problem hiding this comment.
I think we should clarify what the 2 week rule applies to.
Sorry, something went wrong.
| is reviewed. When each commit is landed, the new reviewers and the new PR-URL | ||
| should be used. | ||
|
|
||
| [`LTS Plan`]: https://github.com/nodejs/LTS#lts-plan |
There was a problem hiding this comment.
Is there a reason you used [`LTS Plan`] rather than: [LTS Plan]? It looks a bit odd to me.
Sorry, something went wrong.
| The "Current" release line (currently v7.x) is much more lenient than the LTS | ||
| release lines in what can be landed. Our LTS release lines | ||
| (currently v4.x and v6.x) require that commits live in a Current release for at | ||
| least 2 weeks before backporting. Please see the [`LTS Plan`][] for more |
There was a problem hiding this comment.
As I understand it, the two week rule doesn't apply to doc fixes and infrastructure changes (things that don't change what we ship). This is probably a question for @nodejs/lts, but either way we should probably be explicit here.
Refs: #11351 (comment) and nodejs/build#613 (comment)
Sorry, something went wrong.
There was a problem hiding this comment.
The length of time is not set in stone as is based on the potential impact. A doc change has no impact on runtime stability so those, as long as they are relevant to the version, can pretty much land any time. A code change, however, should go through at least one current release cycle to ensure that there are no regressions reported. For changes to more sensitive parts of the code, the length of time may be longer. Anything that is semver-minor will typically be batched up and held much longer than semver-patch so that we have less frequency between LTS minors.
Sorry, something went wrong.
There was a problem hiding this comment.
Based on what James said, I think we should remove this part. How does one know what sensitive parts of the codebase are when submitting a backport PR? It's hard to document something that isn't concrete imo.
Sorry, something went wrong.
There was a problem hiding this comment.
It's definitely a grey area, but people do talk about the two week rule, so I think we should try and document it somehow, even if we have to say that it's quite subjective.
Sorry, something went wrong.
|
I also had another question, if @nodejs/lts decides what gets backported to LTS, and @nodejs/release do the releases, who decides what gets backported to current? |
Sorry, something went wrong.
|
Essentially anything sitting in master that is not semver-major or explicitly marked dont-land for the current should land in current. The person doing the release selects the set. If a PR needs to be backported, then either the release person will do it or will ask someone to do it, otherwise it won't make it in. |
Sorry, something went wrong.
There was a problem hiding this comment.
Comment inline about one inaccuracy with current process
Sorry, something went wrong.
|
|
||
| Switch to using String#repeat to improve performance. | ||
|
|
||
| PR-URL: https://github.com/nodejs/node/pull/5678 |
There was a problem hiding this comment.
This is not accurate. we maintain the original PR-URL
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
@rvagg mind taking a quick look? Thanks! |
Sorry, something went wrong.
|
|
||
| Switch to using String#repeat to improve performance. | ||
|
|
||
| PR-URL: https://github.com/nodejs/node/pull/1234 |
There was a problem hiding this comment.
5678
Sorry, something went wrong.
There was a problem hiding this comment.
FWIW looking at backport PRs they seem to vary.
Sorry, something went wrong.
Following on from discussion in: nodejs/Release#191 the backport PR should start with the same commit message. Any additions can be made by whoever lands the PR.
|
In the backporting meeting we decided that it would be easiest (at least for now) if people raising Backport PRs didn't have to modify the commit message, so I've added a commit to remove that info. |
Sorry, something went wrong.
There was a problem hiding this comment.
Still LGTM from me.
Sorry, something went wrong.
|
Does anyone have any objection to this landing? Any further issues can be looked at later, and it would be really good to have something to refer people to. |
Sorry, something went wrong.
There was a problem hiding this comment.
tiny nit: LGTM
Sorry, something went wrong.
| ## What needs to be backported? | ||
|
|
||
| If a cherry-pick from master does not land cleanly on a staging branch, the | ||
| releaser will mark the pull request with a particular label for that release |
There was a problem hiding this comment.
@gibfahn should we specify the label?
Sorry, something went wrong.
|
LGTM, still. Get it in, iterate on it as we go. |
Sorry, something went wrong.
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: #11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: #11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: #11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: #11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: #11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: #11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This guide should help answer questions for contributors that are not familiar with the backport process. PR-URL: nodejs/node#11099 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
| Back | FazBrowse Home | New Git URL |
This guide should help answer questions for contributors
that are not familiar with the backport process.
Checklist
Affected core subsystem(s)
doc