@@ -6,58 +6,49 @@ Each release line has a staging branch that the releaser will use as a scratch
6
6
pad while preparing a release. The branch name is formatted as follows:
7
7
` vN.x-staging ` where ` N ` is the major release number.
8
8
9
- ### Active staging branches
10
-
11
- | Release Line | Staging Branch |
12
- | ------------ | -------------- |
13
- | ` v7.x ` | ` v7.x-staging ` |
14
- | ` v6.x ` | ` v6.x-staging ` |
15
- | ` v4.x ` | ` v4.x-staging ` |
9
+ * Note* : For the active staging branches see the [ LTS Schedule] [ ] .
16
10
17
11
## What needs to be backported?
18
12
19
13
If a cherry-pick from master does not land cleanly on a staging branch, the
20
14
releaser will mark the pull request with a particular label for that release
21
- line, specifying to our tooling that this pull request should not be included.
22
- The releaser will then add a comment that a backport is needed.
15
+ line (e.g. ` backport-requested-vN.x ` ), specifying to our tooling that this
16
+ pull request should not be included. The releaser will then add a comment
17
+ requesting that a backport pull request be made.
23
18
24
19
## What can be backported?
25
20
26
21
The "Current" release line is much more lenient than the LTS release lines in
27
- what can be landed. Our LTS release lines (v4.x and v6.x as of March 2017)
28
- require that commits mature in a Current release for at least 2 weeks before
29
- they can be landed on staging. If the commit can not be cherry-picked from
30
- master a manual backport will need to be submitted. Please see the [ LTS Plan] [ ]
31
- for more information. After that time, if the commit can be cherry-picked
32
- cleanly from master, then nothing needs to be done. If not, a backport pull
33
- request will need to be submitted.
22
+ what can be landed. Our LTS release lines (see the [ LTS Plan] [ ] )
23
+ require that commits mature in the Current release for at least 2 weeks before
24
+ they can be landed in an LTS staging branch. Only after "maturation" will those
25
+ commits be cherry-picked or backported.
34
26
35
27
## How to submit a backport pull request
36
28
37
- For these steps, let's assume that a backport is needed for the v7.x release
38
- line. All commands will use the v7 .x-staging branch as the target branch.
39
- In order to submit a backport pull request to another branch, simply replace
40
- that with the staging branch for the targeted release line.
29
+ For the following steps, let's assume that a backport is needed for the v6.x
30
+ release line. All commands will use the ` v6 .x-staging` branch as the target
31
+ branch. In order to submit a backport pull request to another branch, simply
32
+ replace that with the staging branch for the targeted release line.
41
33
42
- * Checkout the staging branch for the targeted release line
43
- * Make sure that the local staging branch is up to date with the remote
44
- * Create a new branch off of the staging branch
34
+ 1 . Checkout the staging branch for the targeted release line
35
+ 2 . Make sure that the local staging branch is up to date with the remote
36
+ 3 . Create a new branch off of the staging branch
45
37
46
38
``` shell
47
39
# Assuming your fork of Node.js is checked out in $NODE_DIR,
48
40
# the origin remote points to your fork, and the upstream remote points
49
41
# to git://github.com/nodejs/node
50
42
cd $NODE_DIR
51
- # Fails if you already have a v7.x-staging
52
- git branch v7.x-staging upstream/v7.x-staging
53
- git checkout v7.x-staging
54
- git reset --hard upstream/v7.x-staging
55
- # We want to backport pr #10157
56
- git checkout -b backport-10157-to-v7.x
43
+ # If v6.x-staging is checked out `pull` should be used instead of `fetch`
44
+ git fetch upstream v6.x-staging:v6.x-staging -f
45
+ # Assume we want to backport PR #10157
46
+ git checkout -b backport-10157-to-v6.x v6.x-staging
57
47
```
58
48
59
- * After creating the branch, apply the changes to the branch. The cherry-pick
60
- will likely fail due to conflicts. In that case, you will see something this:
49
+ 4 . After creating the branch, apply the changes to the branch. The cherry-pick
50
+ will likely fail due to conflicts. In that case, you will see something
51
+ like this:
61
52
62
53
``` shell
63
54
# Say the $SHA is 773cdc31ef
@@ -68,25 +59,28 @@ hint: with 'git add <paths>' or 'git rm <paths>'
68
59
hint: and commit the result with ' git commit'
69
60
```
70
61
71
- * Make the required changes to remove the conflicts, add the files to the index
72
- using ` git add ` , and then commit the changes. That can be done with
73
- ` git cherry-pick --continue ` .
74
- * Leave the commit message as is. If you think it should be modified, comment
75
- in the Pull Request.
76
- * Make sure ` make -j4 test ` passes
77
- * Push the changes to your fork and open a pull request.
78
- * Be sure to target the ` v7.x-staging ` branch in the pull request.
79
-
80
- ### Helpful Hints
81
-
82
- * Please include the backport target in the pull request title in the following
83
- format: ` (v7.x backport) <commit title> `
84
- * Ex. ` (v4.x backport) process: improve performance of nextTick `
85
- * Please check the checkbox labelled "Allow edits from maintainers".
86
- This is the easiest way to to avoid constant rebases.
87
-
88
- In the event the backport pull request is different than the original,
89
- the backport pull request should be reviewed the same way a new pull request
90
- is reviewed.
91
-
62
+ 5 . Make the required changes to remove the conflicts, add the files to the index
63
+ using ` git add ` , and then commit the changes. That can be done with
64
+ ` git cherry-pick --continue ` .
65
+ 6 . Leave the commit message as is. If you think it should be modified, comment
66
+ in the Pull Request.
67
+ 7 . Make sure ` make -j4 test ` passes.
68
+ 8 . Push the changes to your fork
69
+ 9 . Open a pull request:
70
+ 1 . Be sure to target the ` v6.x-staging ` branch in the pull request.
71
+ 2 . Include the backport target in the pull request title in the following
72
+ format — ` [v6.x backport] <commit title> ` .
73
+ Example: ` [v6.x backport] process: improve performance of nextTick `
74
+ 3 . Check the checkbox labelled "Allow edits from maintainers".
75
+ 4 . In the description add a reference to the original PR
76
+ 5 . Run a [ ` node-test-pull-request ` ] [ ] CI job (with ` REBASE_ONTO ` set to the
77
+ default ` <pr base branch> ` )
78
+ 10 . If during the review process conflicts arise, use the following to rebase:
79
+ ` git pull --rebase upstream v6.x-staging `
80
+
81
+ After the PR lands replace the ` backport-requested-v6.x ` label on the original
82
+ PR with ` backported-to-v6.x ` .
83
+
84
+ [ LTS Schedule ] : https://github.com/nodejs/LTS/#lts-schedule1
92
85
[ LTS Plan ] : https://github.com/nodejs/LTS#lts-plan
86
+ [ `node-test-pull-request` ] : https://ci.nodejs.org/job/node-test-pull-request/build
0 commit comments