Skip to content

Commit 36b1095

Browse files
authored
Merge pull request #4856 from justaugustus/release-links
devel/sig-release: Fixup links, Markdown warnings, minor content tweaks
2 parents 42e7ac5 + d9797ed commit 36b1095

File tree

3 files changed

+555
-398
lines changed

3 files changed

+555
-398
lines changed
Lines changed: 139 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,181 +1,195 @@
11
# Overview
22

3-
This document explains how cherry-picks are managed on release branches within
4-
the kubernetes/kubernetes repository.
5-
A common use case for this task is backporting PRs from master to release
3+
This document explains how cherry picks are managed on release branches within
4+
the `kubernetes/kubernetes` repository.
5+
A common use case for this task is backporting PRs from master to release
66
branches.
77

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)
15-
16-
---
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)
1715

1816
## Prerequisites
19-
* [Contributor License Agreement](http://git.k8s.io/community/CLA.md) is
20-
considered implicit for all code within cherry-pick pull requests,
21-
**unless there is a large conflict**.
22-
* A pull request merged against the master branch.
23-
* [Release branch](https://git.k8s.io/release/docs/branching.md) exists.
24-
* The normal git and GitHub configured shell environment for pushing to your
25-
kubernetes `origin` fork on GitHub and making a pull request against a
26-
configured remote `upstream` that tracks
27-
"https://github.com/kubernetes/kubernetes.git", including `GITHUB_USER`.
28-
* Have `hub` installed, which is most easily installed via `go get
29-
github.com/github/hub` assuming you have a standard golang development
30-
environment.
31-
32-
33-
## What Kind of PRs are Good for Cherry-Picks
17+
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.
22+
- The release branch exists (example: [`release-1.18`](https://github.com/kubernetes/kubernetes/tree/release-1.18))
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
28+
`go get github.com/github/hub` assuming you have a standard golang
29+
development environment.
30+
31+
## What Kind of PRs are Good for Cherry Picks
3432

3533
Compared to the normal master branch's merge volume across time,
3634
the release branches see one or two orders of magnitude less PRs.
3735
This is because there is an order or two of magnitude higher scrutiny.
38-
Again the emphasis is on critical bug fixes, eg:
39-
* Loss of data
40-
* Memory corruption
41-
* Panic, crash, hang
42-
* Security
36+
Again, the emphasis is on critical bug fixes, e.g.,
4337

44-
If you are proposing a cherry-pick and it is not a clear and obvious
45-
critical bug fix, please reconsider. If upon reflection you wish to
46-
continue, bolster your case by supplementing your PR with, eg:
38+
- Loss of data
39+
- Memory corruption
40+
- Panic, crash, hang
41+
- Security
4742

48-
* A GitHub issue detailing the problem
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.,
4946

50-
* Scope of the change
47+
- A GitHub issue detailing the problem
5148

52-
* Risks of adding a change
49+
- Scope of the change
5350

54-
* Risks of associated regression
51+
- Risks of adding a change
5552

56-
* Testing performed, test cases added
53+
- Risks of associated regression
5754

58-
* Key stakeholder SIG reviewers/approvers attesting to their confidence in the
59-
change being a required backport
55+
- Testing performed, test cases added
6056

61-
* If the change is in cloud-provider-specific platform code (which is in the
62-
process of being moved out of core Kubernetes), describe the customer impact,
63-
how the issue escaped initial testing, remediation taken to prevent similar
64-
future escapes, and why the change cannot be carried in your downstream
65-
fork of the Kubernetes project branches. It is critical that our full
66-
community is actively engaged on enhancements in the project. If a
67-
released feature was not enabled on a particular provider's platform, this
68-
is a community miss that needs to be resolved in the master branch for
69-
subsequent releases. Such enabling will not be backported to the patch
70-
release branches.
57+
- Key stakeholder SIG reviewers/approvers attesting to their confidence in the
58+
change being a required backport
7159

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

73-
## Initiate a Cherry-pick
74-
* Run the [cherry-pick
75-
script](https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh).
76-
This example applies a master branch PR #98765 to the remote branch
77-
`upstream/release-3.14`: `hack/cherry_pick_pull.sh upstream/release-3.14
78-
98765`
79-
* Be aware the cherry-pick script assumes you have a git remote called
80-
`upstream` that points at the Kubernetes github org.
81-
Please see our [recommended Git workflow](https://git.k8s.io/community/contributors/guide/github-workflow.md#workflow).
82-
* You will need to run the cherry-pick script separately for each patch release you want to cherry-pick to.
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.
8371

84-
* Your cherry-pick PR will immediately get the `do-not-merge/cherry-pick-not-approved` label.
85-
[Normal rules apply for code merge](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-release/release.md#tldr),
86-
with some additional caveats outlined in the next section of this document.
72+
## Initiate a Cherry Pick
8773

88-
## Cherry-pick Review
74+
- Run the [cherry pick script][cherry-pick-script]
8975

90-
As with any other PR, code OWNERS review (`/lgtm`) and approve (`/approve`) on
91-
cherry-pick PRs as they deem appropriate.
76+
This example applies a master branch PR #98765 to the remote branch
77+
`upstream/release-3.14`:
9278

93-
The same release note requirements apply as normal pull requests,
94-
except the release note stanza will auto-populate from the master
95-
branch pull request from which the cherry-pick originated. If this
96-
is unsuccessful the `do-not-merge/release-note-label-needed` label
97-
will be applied and the cherry-pick author must edit the pull request
98-
description to [add a release note](https://git.k8s.io/community/contributors/guide/release-notes.md)
99-
or include in a comment the `/release-note-none` command.
79+
```shell
80+
hack/cherry_pick_pull.sh upstream/release-3.14 98765
81+
```
10082

101-
Cherry-pick pull requests are reviewed slightly differently than normal
102-
pull requests on the master branch in that they:
83+
- Be aware the cherry pick script assumes you have a git remote called
84+
`upstream` that points at the Kubernetes github org.
10385

104-
* Are by default expected to be `kind/bug` and `priority/critical-urgent`.
86+
Please see our [recommended Git workflow](/contributors/guide/github-workflow.md#workflow).
10587

106-
* Milestones must be set on the PR reflecting the milestone for the target
107-
release branch (for example, milestone v1.11 for a cherry-pick onto branch
108-
release-1.11). This is normally done for you by automation.
88+
- You will need to run the cherry pick script separately for each patch
89+
release you want to cherry pick to.
10990

110-
* Have one additional level of review in that they must be approved specifically
111-
for cherry-pick by branch approvers.
91+
- Your cherry pick PR will immediately get the
92+
`do-not-merge/cherry-pick-not-approved` label.
11293

113-
The [Branch Manager](https://git.k8s.io/sig-release/release-team/role-handbooks/branch-manager)
114-
will triage PRs targeted to the next .0 minor release branch up until the
115-
release, while the [Patch Release Team](https://git.k8s.io/sig-release/release-team/role-handbooks/patch-release-manager)
116-
will handle all cherry-picks to patch releases.
94+
[Normal rules apply for code merge](/contributors/devel/sig-release/release.md#tldr),
95+
with some additional caveats outlined in the next section of this document.
96+
97+
## Cherry Pick Review
98+
99+
As with any other PR, code OWNERS review (`/lgtm`) and approve (`/approve`) on
100+
cherry pick PRs as they deem appropriate.
117101

118-
The [Branch Manager](https://git.k8s.io/sig-release/release-team/role-handbooks/branch-manager)
119-
or the [Patch Release Team](https://git.k8s.io/sig-release/release-team/role-handbooks/patch-release-manager)
120-
are the final authority on branch approval by removing the `do-not-merge/cherry-pick-not-approved`
121-
label and triggering a merge into the target branch.
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.
122105

123-
The team scrubs through incoming cherry-picks on at least a weekly basis, daily during
124-
burndown ahead of a .0 release. Ahead of point releases, reminders of the
125-
cherry-pick deadline will be sent out to the community. Cherry-pick PRs are
126-
often metered into the release branches to give more deliberate CI signal across
127-
changes. For this reason your cherry-pick must be ready to merge ahead of
128-
the cherry-pick deadline, but those candidates may be merged during the days
129-
between the deadline and release.
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.
130110

131-
Open cherry-pick PRs which do not land in the current release will
132-
continue to be tracked by the team for consideration for inclusion in a next
133-
patch release.
111+
Cherry pick pull requests are reviewed slightly differently than normal
112+
pull requests on the `master` branch in that they:
134113

135-
If you are concerned about the status of your cherry-pick, err on the
136-
side of overcommunicating and reach out to the branch reviewer(s):
114+
- Are by default expected to be `kind/bug` and `priority/critical-urgent`.
137115

138-
* During code freeze or after code thaw and ahead of a .0 release, to get attention on a cherry-pick by the current
139-
release team members see the [appropriate release folder](https://git.k8s.io/sig-release/releases)
140-
for the target release's team contact information. You may cc them with
141-
`@<githubusername>` on your cherry-pick PR.
116+
- Milestones must be set on the PR reflecting the milestone for the target
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.
142119

143-
* For prior branches, check the [patch release schedule](https://git.k8s.io/sig-release/releases/patch-releases.md), which includes contact information for the patch release team.
120+
- Have one additional level of review in that they must be approved
121+
specifically for cherry pick by branch approvers.
144122

145-
## Searching for Cherry-picks
123+
The [Release Managers][release-managers] are the final approvers on release
124+
branches.
146125

147-
- [A sample search on kubernetes/kubernetes pull requests that are labeled as `cherry-pick-approved`](https://github.com/kubernetes/kubernetes/pulls?q=is%3Aopen+is%3Apr+label%3Acherry-pick-approved)
126+
Approval is signified by a Release Manager manually applying the
127+
`cherry-pick-approved` label. This action removes the
128+
`do-not-merge/cherry-pick-not-approved` label and triggers a merge into the
129+
target branch.
148130

149-
- [A sample search on kubernetes/kubernetes pull requests that are labeled as `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)
131+
The team scrubs through incoming cherry picks on at least a weekly basis,
132+
daily during burndown ahead of a .0 release. Ahead of point releases,
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
137+
merged during the days between the deadline and release.
150138

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

152-
## Troubleshooting Cherry-picks
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].
153146

154-
Contributors may encounter some of the following difficulties when initiating a cherry-pick.
147+
## Searching for Cherry Picks
155148

156-
- A cherry-pick PR does not apply cleanly against an old release branch.
157-
In that case, you will need to manually fix conflicts.
149+
Examples (based on cherry picks targeting the `release-1.18` branch):
158150

159-
- The cherry-pick PR includes code that does not pass CI tests.
160-
In such a case you will have to fetch the auto-generated branch from your fork, amend the problematic commit and force push to the auto-generated branch.
161-
Alternatively, you can create a new PR, which is noisier.
151+
- [`cherry-pick-approved`](https://github.com/kubernetes/kubernetes/pulls?q=is%3Aopen+is%3Apr+label%3Acherry-pick-approved+base%3Arelease-1.18)
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)
162153

163-
## Cherry-picks for unsupported releases
154+
## Troubleshooting Cherry Picks
164155

165-
The release team only supports & patches `n-3` releases (`n` being the latest release of Kubernetes). In January of 2019 the community discovered a regression, that was introduced in a post-release patch, but was currently no longer supported.
156+
Contributors may encounter some of the following difficulties when initiating a
157+
cherry pick.
166158

167-
As discussed in a sig-release meeting on 2019-01-15, a fix was backported to the non supported version.
159+
- A cherry pick PR does not apply cleanly against an old release branch. In
160+
that case, you will need to manually fix conflicts.
168161

169-
Reference PR: [#72860](https://github.com/kubernetes/kubernetes/pull/72860#issuecomment-454072746)
162+
- The cherry pick PR includes code that does not pass CI tests. In such a case
163+
you will have to fetch the auto-generated branch from your fork, amend the
164+
problematic commit and force push to the auto-generated branch.
165+
Alternatively, you can create a new PR, which is noisier.
166+
167+
## Cherry Picks for Unsupported Releases
168+
169+
The release team only supports & patches `n-3` releases (`n` being the latest
170+
release of Kubernetes). In January of 2019 the community discovered a
171+
regression, that was introduced in a post-release patch, but was currently no
172+
longer supported.
173+
174+
As discussed in a SIG Release meeting on 2019-01-15, a fix was backported to
175+
the non supported version.
176+
177+
Reference PR: [#72860](https://github.com/kubernetes/kubernetes/pull/72860)
170178

171179
The specific criteria driving the decision was:
172180

173181
- CI was still available for the version
174-
- The regression was introduced as a patch (and not part of the official release)
182+
- The regression was introduced as a patch (and not part of the official
183+
release)
175184
- The issue being fixed is of sufficient **[severity & impact](#what-kind-of-prs-are-good-for-cherry-picks)**
176-
- The fix is well understood and contained (doesn’t introduce risk of additional regressions)
185+
- The fix is well understood and contained (doesn’t introduce risk of
186+
additional regressions)
177187

178188
A note about the specific case in [#72860](https://github.com/kubernetes/kubernetes/pull/72860#issuecomment-454072746):
179189

180190
- The patch was exceedingly tiny and very unlikely to introduce new problems
181-
- Luckily, it was caught shortly after the release was supposed to be unsupported
191+
- Luckily, it was caught shortly after the release was supposed to be
192+
unsupported
193+
194+
[cherry-pick-script]: https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh
195+
[release-managers]: https://git.k8s.io/sig-release/release-managers.md

0 commit comments

Comments
 (0)