Skip to content

Commit d9797ed

Browse files
committed
devel/sig-release: Update cherry-picks.md
Signed-off-by: Stephen Augustus <[email protected]>
1 parent f1d7d8a commit d9797ed

File tree

1 file changed

+73
-77
lines changed

1 file changed

+73
-77
lines changed
Lines changed: 73 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
# Overview
22

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.
55
A common use case for this task is backporting PRs from master to release
66
branches.
77

88
- [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)
1515

1616
## Prerequisites
1717

1818
- [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.
2222
- The release branch exists (example: [`release-1.18`](https://github.com/kubernetes/kubernetes/tree/release-1.18))
2323
- 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.
3030

31-
## What Kind of PRs are Good for Cherry-Picks
31+
## What Kind of PRs are Good for Cherry Picks
3232

3333
Compared to the normal master branch's merge volume across time,
3434
the release branches see one or two orders of magnitude less PRs.
3535
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.,
3737

3838
- Loss of data
3939
- Memory corruption
4040
- Panic, crash, hang
4141
- Security
4242

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.,
4646

4747
- A GitHub issue detailing the problem
4848

@@ -57,20 +57,21 @@ continue, bolster your case by supplementing your PR with e.g.,
5757
- Key stakeholder SIG reviewers/approvers attesting to their confidence in the
5858
change being a required backport
5959

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

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

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]
7475

7576
This example applies a master branch PR #98765 to the remote branch
7677
`upstream/release-3.14`:
@@ -79,44 +80,45 @@ continue, bolster your case by supplementing your PR with e.g.,
7980
hack/cherry_pick_pull.sh upstream/release-3.14 98765
8081
```
8182

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
8384
`upstream` that points at the Kubernetes github org.
8485

8586
Please see our [recommended Git workflow](/contributors/guide/github-workflow.md#workflow).
8687

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

90-
- Your cherry-pick PR will immediately get the
91+
- Your cherry pick PR will immediately get the
9192
`do-not-merge/cherry-pick-not-approved` label.
9293

9394
[Normal rules apply for code merge](/contributors/devel/sig-release/release.md#tldr),
9495
with some additional caveats outlined in the next section of this document.
9596

96-
## Cherry-pick Review
97+
## Cherry Pick Review
9798

9899
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.
100105

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

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:
111113

112114
- Are by default expected to be `kind/bug` and `priority/critical-urgent`.
113115

114116
- 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.
117119

118120
- 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.
120122

121123
The [Release Managers][release-managers] are the final approvers on release
122124
branches.
@@ -126,57 +128,50 @@ pull requests on the master branch in that they:
126128
`do-not-merge/cherry-pick-not-approved` label and triggers a merge into the
127129
target branch.
128130

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,
130132
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
135137
merged during the days between the deadline and release.
136138

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

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].
151146

152-
## Searching for Cherry-picks
147+
## Searching for Cherry Picks
153148

154149
Examples (based on cherry picks targeting the `release-1.18` branch):
155150

156151
- [`cherry-pick-approved`](https://github.com/kubernetes/kubernetes/pulls?q=is%3Aopen+is%3Apr+label%3Acherry-pick-approved+base%3Arelease-1.18)
157152
- [`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)
158153

159-
## Troubleshooting Cherry-picks
154+
## Troubleshooting Cherry Picks
160155

161156
Contributors may encounter some of the following difficulties when initiating a
162-
cherry-pick.
157+
cherry pick.
163158

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
165160
that case, you will need to manually fix conflicts.
166161

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
168163
you will have to fetch the auto-generated branch from your fork, amend the
169164
problematic commit and force push to the auto-generated branch.
170165
Alternatively, you can create a new PR, which is noisier.
171166

172-
## Cherry-picks for unsupported releases
167+
## Cherry Picks for Unsupported Releases
173168

174169
The release team only supports & patches `n-3` releases (`n` being the latest
175170
release of Kubernetes). In January of 2019 the community discovered a
176171
regression, that was introduced in a post-release patch, but was currently no
177172
longer supported.
178173

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
180175
the non supported version.
181176

182177
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
196191
- Luckily, it was caught shortly after the release was supposed to be
197192
unsupported
198193

194+
[cherry-pick-script]: https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh
199195
[release-managers]: https://git.k8s.io/sig-release/release-managers.md

0 commit comments

Comments
 (0)