1
1
# Overview
2
2
3
- This document explains how cherry- picks are managed on release branches within
4
- the kubernetes/kubernetes repository.
3
+ This document explains how cherry picks are managed on release branches within
4
+ the ` kubernetes/kubernetes ` repository.
5
5
A common use case for this task is backporting PRs from master to release
6
6
branches.
7
7
8
8
- [ Prerequisites] ( #prerequisites )
9
- - [ What Kind of PRs are Good for Cherry- Picks] ( #what-kind-of-prs-are-good-for-cherry-picks )
10
- - [ Initiate a Cherry-pick ] ( #initiate-a-cherry-pick )
11
- - [ Cherry-pick Review] ( #cherry-pick-review )
12
- - [ Searching for Cherry-picks ] ( #searching-for-cherry-picks )
13
- - [ Troubleshooting Cherry-picks ] ( #troubleshooting-cherry-picks )
14
- - [ Cherry-picks for unsupported releases ] ( #cherry-picks-for-unsupported-releases )
9
+ - [ What Kind of PRs are Good for Cherry Picks] ( #what-kind-of-prs-are-good-for-cherry-picks )
10
+ - [ Initiate a Cherry Pick ] ( #initiate-a-cherry-pick )
11
+ - [ Cherry Pick Review] ( #cherry-pick-review )
12
+ - [ Searching for Cherry Picks ] ( #searching-for-cherry-picks )
13
+ - [ Troubleshooting Cherry Picks ] ( #troubleshooting-cherry-picks )
14
+ - [ Cherry Picks for Unsupported Releases ] ( #cherry-picks-for-unsupported-releases )
15
15
16
16
## Prerequisites
17
17
18
18
- [ Contributor License Agreement] ( http://git.k8s.io/community/CLA.md ) is
19
- considered implicit for all code within cherry- pick pull requests,
20
- ** unless there is a large conflict** .
21
- - A pull request merged against the master branch.
19
+ considered implicit for all code within cherry pick pull requests,
20
+ ** unless there is a large conflict** .
21
+ - A pull request merged against the ` master ` branch.
22
22
- The release branch exists (example: [ ` release-1.18 ` ] ( https://github.com/kubernetes/kubernetes/tree/release-1.18 ) )
23
23
- The normal git and GitHub configured shell environment for pushing to your
24
- kubernetes ` origin ` fork on GitHub and making a pull request against a
25
- configured remote ` upstream ` that tracks
26
- " https://github.com/kubernetes/kubernetes.git " , including ` GITHUB_USER ` .
27
- - Have ` hub ` installed, which is most easily installed via `go get
28
- github.com/github/hub` assuming you have a standard golang development
29
- environment.
24
+ kubernetes ` origin ` fork on GitHub and making a pull request against a
25
+ configured remote ` upstream ` that tracks
26
+ ` https://github.com/kubernetes/kubernetes.git ` , including ` GITHUB_USER ` .
27
+ - Have ` hub ` installed, which is most easily installed via
28
+ ` go get github.com/github/hub` assuming you have a standard golang
29
+ development environment.
30
30
31
- ## What Kind of PRs are Good for Cherry- Picks
31
+ ## What Kind of PRs are Good for Cherry Picks
32
32
33
33
Compared to the normal master branch's merge volume across time,
34
34
the release branches see one or two orders of magnitude less PRs.
35
35
This is because there is an order or two of magnitude higher scrutiny.
36
- Again the emphasis is on critical bug fixes, e.g.,
36
+ Again, the emphasis is on critical bug fixes, e.g.,
37
37
38
38
- Loss of data
39
39
- Memory corruption
40
40
- Panic, crash, hang
41
41
- Security
42
42
43
- If you are proposing a cherry- pick and it is not a clear and obvious
44
- critical bug fix, please reconsider. If upon reflection you wish to
45
- continue, bolster your case by supplementing your PR with e.g.,
43
+ If you are proposing a cherry pick and it is not a clear and obvious critical
44
+ bug fix, please reconsider. If upon reflection you wish to continue, bolster
45
+ your case by supplementing your PR with e.g.,
46
46
47
47
- A GitHub issue detailing the problem
48
48
@@ -57,20 +57,21 @@ continue, bolster your case by supplementing your PR with e.g.,
57
57
- Key stakeholder SIG reviewers/approvers attesting to their confidence in the
58
58
change being a required backport
59
59
60
- - If the change is in cloud-provider-specific platform code (which is in the
61
- process of being moved out of core Kubernetes), describe the customer impact,
62
- how the issue escaped initial testing, remediation taken to prevent similar
63
- future escapes, and why the change cannot be carried in your downstream
64
- fork of the Kubernetes project branches. It is critical that our full
65
- community is actively engaged on enhancements in the project. If a
66
- released feature was not enabled on a particular provider's platform, this
67
- is a community miss that needs to be resolved in the master branch for
68
- subsequent releases. Such enabling will not be backported to the patch
69
- release branches.
60
+ If the change is in cloud provider-specific platform code (which is in the
61
+ process of being moved out of core Kubernetes), describe the customer impact,
62
+ how the issue escaped initial testing, remediation taken to prevent similar
63
+ future escapes, and why the change cannot be carried in your downstream fork of
64
+ the Kubernetes project branches.
70
65
71
- ## Initiate a Cherry-pick
66
+ It is critical that our full community is actively engaged on enhancements in
67
+ the project. If a released feature was not enabled on a particular provider's
68
+ platform, this is a community miss that needs to be resolved in the ` master `
69
+ branch for subsequent releases. Such enabling will not be backported to the
70
+ patch release branches.
72
71
73
- - Run the [ cherry-pick script] ( https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh )
72
+ ## Initiate a Cherry Pick
73
+
74
+ - Run the [ cherry pick script] [ cherry-pick-script ]
74
75
75
76
This example applies a master branch PR #98765 to the remote branch
76
77
` upstream/release-3.14 ` :
@@ -79,44 +80,45 @@ continue, bolster your case by supplementing your PR with e.g.,
79
80
hack/cherry_pick_pull.sh upstream/release-3.14 98765
80
81
```
81
82
82
- - Be aware the cherry- pick script assumes you have a git remote called
83
+ - Be aware the cherry pick script assumes you have a git remote called
83
84
` upstream ` that points at the Kubernetes github org.
84
85
85
86
Please see our [ recommended Git workflow] ( /contributors/guide/github-workflow.md#workflow ) .
86
87
87
- - You will need to run the cherry- pick script separately for each patch
88
- release you want to cherry- pick to.
88
+ - You will need to run the cherry pick script separately for each patch
89
+ release you want to cherry pick to.
89
90
90
- - Your cherry- pick PR will immediately get the
91
+ - Your cherry pick PR will immediately get the
91
92
` do-not-merge/cherry-pick-not-approved ` label.
92
93
93
94
[ Normal rules apply for code merge] ( /contributors/devel/sig-release/release.md#tldr ) ,
94
95
with some additional caveats outlined in the next section of this document.
95
96
96
- ## Cherry-pick Review
97
+ ## Cherry Pick Review
97
98
98
99
As with any other PR, code OWNERS review (` /lgtm ` ) and approve (` /approve ` ) on
99
- cherry-pick PRs as they deem appropriate.
100
+ cherry pick PRs as they deem appropriate.
101
+
102
+ The same release note requirements apply as normal pull requests, except the
103
+ release note stanza will auto-populate from the master branch pull request from
104
+ which the cherry pick originated.
100
105
101
- The same release note requirements apply as normal pull requests,
102
- except the release note stanza will auto-populate from the master
103
- branch pull request from which the cherry-pick originated. If this
104
- is unsuccessful the ` do-not-merge/release-note-label-needed ` label
105
- will be applied and the cherry-pick author must edit the pull request
106
- description to [ add a release note] ( /contributors/guide/release-notes.md )
107
- or include in a comment the ` /release-note-none ` command.
106
+ If this is unsuccessful, the ` do-not-merge/release-note-label-needed ` label
107
+ will be applied and the cherry pick author must edit the pull request
108
+ description to [ add a release note] ( /contributors/guide/release-notes.md ) or
109
+ include in a comment the ` /release-note-none ` command.
108
110
109
- Cherry- pick pull requests are reviewed slightly differently than normal
110
- pull requests on the master branch in that they:
111
+ Cherry pick pull requests are reviewed slightly differently than normal
112
+ pull requests on the ` master ` branch in that they:
111
113
112
114
- Are by default expected to be ` kind/bug ` and ` priority/critical-urgent ` .
113
115
114
116
- Milestones must be set on the PR reflecting the milestone for the target
115
- release branch (for example, milestone v1.11 for a cherry- pick onto branch
116
- release-1.11). This is normally done for you by automation.
117
+ release branch (for example, milestone v1.11 for a cherry pick onto branch
118
+ ` release-1.11 ` ). This is normally done for you by automation.
117
119
118
120
- Have one additional level of review in that they must be approved
119
- specifically for cherry- pick by branch approvers.
121
+ specifically for cherry pick by branch approvers.
120
122
121
123
The [ Release Managers] [ release-managers ] are the final approvers on release
122
124
branches.
@@ -126,57 +128,50 @@ pull requests on the master branch in that they:
126
128
` do-not-merge/cherry-pick-not-approved ` label and triggers a merge into the
127
129
target branch.
128
130
129
- The team scrubs through incoming cherry- picks on at least a weekly basis,
131
+ The team scrubs through incoming cherry picks on at least a weekly basis,
130
132
daily during burndown ahead of a .0 release. Ahead of point releases,
131
- reminders of the cherry- pick deadline will be sent out to the community.
132
- Cherry- pick PRs are often metered into the release branches to give more
133
- deliberate CI signal across changes. For this reason your cherry- pick must be
134
- ready to merge ahead of the cherry- pick deadline, but those candidates may be
133
+ reminders of the cherry pick deadline will be sent out to the community.
134
+ Cherry pick PRs are often metered into the release branches to give more
135
+ deliberate CI signal across changes. For this reason your cherry pick must be
136
+ ready to merge ahead of the cherry pick deadline, but those candidates may be
135
137
merged during the days between the deadline and release.
136
138
137
- Open cherry-pick PRs which do not land in the current release will
138
- continue to be tracked by the team for consideration for inclusion in a next
139
- patch release.
140
-
141
- If you are concerned about the status of your cherry-pick, err on the
142
- side of overcommunicating and reach out to the branch reviewer(s):
139
+ Open cherry pick PRs which do not land in the current release will continue
140
+ to be tracked by the team for consideration for inclusion in a next patch
141
+ release.
143
142
144
- - During code freeze or after code thaw and ahead of a .0 release, to get
145
- attention on a cherry-pick by the current release team members see the
146
- [ appropriate release folder] ( https://git.k8s.io/sig-release/releases ) for
147
- the target release's team contact information. You may cc them with
148
- ` @<githubusername> ` on your cherry-pick PR.
149
- - For prior branches, check the [ patch release schedule] ( https://git.k8s.io/sig-release/releases/patch-releases.md ) ,
150
- which includes contact information for the patch release team.
143
+ If you are concerned about the status of your cherry pick, err on the
144
+ side of overcommunicating and reach out to the
145
+ [ Release Managers] [ release-managers ] .
151
146
152
- ## Searching for Cherry-picks
147
+ ## Searching for Cherry Picks
153
148
154
149
Examples (based on cherry picks targeting the ` release-1.18 ` branch):
155
150
156
151
- [ ` cherry-pick-approved ` ] ( https://github.com/kubernetes/kubernetes/pulls?q=is%3Aopen+is%3Apr+label%3Acherry-pick-approved+base%3Arelease-1.18 )
157
152
- [ ` do-not-merge/cherry-pick-not-approved ` ] ( https://github.com/kubernetes/kubernetes/pulls?q=is%3Aopen+is%3Apr+label%3Ado-not-merge%2Fcherry-pick-not-approved+base%3Arelease-1.18 )
158
153
159
- ## Troubleshooting Cherry-picks
154
+ ## Troubleshooting Cherry Picks
160
155
161
156
Contributors may encounter some of the following difficulties when initiating a
162
- cherry- pick.
157
+ cherry pick.
163
158
164
- - A cherry- pick PR does not apply cleanly against an old release branch. In
159
+ - A cherry pick PR does not apply cleanly against an old release branch. In
165
160
that case, you will need to manually fix conflicts.
166
161
167
- - The cherry- pick PR includes code that does not pass CI tests. In such a case
162
+ - The cherry pick PR includes code that does not pass CI tests. In such a case
168
163
you will have to fetch the auto-generated branch from your fork, amend the
169
164
problematic commit and force push to the auto-generated branch.
170
165
Alternatively, you can create a new PR, which is noisier.
171
166
172
- ## Cherry-picks for unsupported releases
167
+ ## Cherry Picks for Unsupported Releases
173
168
174
169
The release team only supports & patches ` n-3 ` releases (` n ` being the latest
175
170
release of Kubernetes). In January of 2019 the community discovered a
176
171
regression, that was introduced in a post-release patch, but was currently no
177
172
longer supported.
178
173
179
- As discussed in a sig-release meeting on 2019-01-15, a fix was backported to
174
+ As discussed in a SIG Release meeting on 2019-01-15, a fix was backported to
180
175
the non supported version.
181
176
182
177
Reference PR: [ #72860 ] ( https://github.com/kubernetes/kubernetes/pull/72860 )
@@ -196,4 +191,5 @@ A note about the specific case in [#72860](https://github.com/kubernetes/kuberne
196
191
- Luckily, it was caught shortly after the release was supposed to be
197
192
unsupported
198
193
194
+ [ cherry-pick-script ] : https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh
199
195
[ release-managers ] : https://git.k8s.io/sig-release/release-managers.md
0 commit comments