-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clarify some parts of the cherry pick process #1980
Conversation
PTAL |
contributors/devel/cherry-picks.md
Outdated
#### Individual Cherrypicks | ||
* Run the [cherry pick script](https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh). This example applies a master branch PR #98765 to the remote branch `upstream/release-3.14`: `hack/cherry_pick_pull.sh upstream/release-3.14 98765` | ||
* NOTE: | ||
* For this script to work you need the normal git and GitHub configured shell environment for pushing to your kubernetes `origin` fork on GitHub and making a pull request against a configured remote `upstream` that tracks "http://git.k8s.io/kubernetes". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is http://git.k8s.io/kubernetes
legit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cblecker is this the preferred way to reference it versus https://github.com/kubernetes/kubernetes/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when making a markdown link, using the shortener would be preferred. However, when you're talking about git configuration, you're either tracking https://github.com/kubernetes/kubernetes.git
for HTTPS or git@github.com:kubernetes/kubernetes.git
for SSH.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Amended.
taking a look, untangling how cherry picks actually work is hurting my head I'm also unsure whether we should have this instead document the prow-based cherrypicker that's being worked on |
Please let me know of any pain points or feature requests related to the mungegithub cherrypick mungers. They are due for a revamp and migration to Prow. |
contributors/devel/cherry-picks.md
Outdated
@@ -7,39 +7,42 @@ depending on the point in the release cycle. | |||
## Propose a Cherry Pick | |||
|
|||
1. Cherrypicks are [managed with labels and milestones](/contributors/guide/release-notes.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not that you changed this, but the linked content doesn't really talk about labels nor milestones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof indeed. I should've caught that.
contributors/devel/cherry-picks.md
Outdated
* PRs batched up and merged to the release branch get a `cherrypick-approved` label and lose the `cherrypick-candidate` label. | ||
* PRs that won't be merged to the release branch, lose the `cherrypick-candidate` label. | ||
|
||
There is a helper tool [`branchff`](https://git.k8s.io/release/branchff) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove the mention of branchff
, it's unrelated to cherry picking. Its used to keep the release-1.x
branch in sync with master
while code freeze is in effect. Not exactly a fast-forward merge, but conceptually similar in terms of the commits it picks up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do folks think it would make sense to merge this cherry-pick.md and the https://github.com/kubernetes/release/blob/master/docs/branching.md ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe if you want to rescope into "the lifecycle of a release branch and how commits get into it", which also sorta overlaps with https://github.com/kubernetes/sig-release/blob/master/release-process-documentation/release-team-guides/patch-release-manager-playbook.md and https://github.com/kubernetes/sig-release#during-a-patch-release and help I can't stop why do we have so many docs that also say different versions and facets of the same thing
for now I'd rather see this PR land to fixup this one doc to be the authoritative source for this one mechanical part of the release process
contributors/devel/cherry-picks.md
Outdated
* See the [PR template](https://git.k8s.io/kubernetes/.github/PULL_REQUEST_TEMPLATE.md) for more details. | ||
* PR titles and body comments are mutable and can be modified at any time | ||
prior to the release to reflect a release note friendly message. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more of a note to self as I work through this:
submit-queue
is actually the thing responsible for merging PR's torelease-1.x
submit-queue
won't bother if there is ado-not-merge/cherry-pick-unapproved
label- the
label-pick-unapproved
munger run as part of themisc-mungers
deployment applies this label- it removes the label if there is a
cherrypick-approved
label - it applies the label if a PR is not for
master
- it removes the label if there is a
- the
cherrypick-approved
label can either be applied by a human, or by thecherrypick-auto-approve
munger - the
cherrypick-auto-approve
munger- only looks at PR's not for
master
- skips PR's that have
cherrypick-approved
and a milestone - skips PR's that don't mention other PR's (hereafter called "parents") in their description
- skips PR's that are for
release-1.x
but have milestonev1.y
- skips PR's whose parents don't have the
cherrypick-approved
label - skips PR's that are for
release-1.x
whose parents have milestonev1.y
or none - applies
cherrypick-approved
and milestone1.x
if it's made it this far
- only looks at PR's not for
- various mungers will remove the
cherrypick-candidate
label- from "parent" PR's that have successfully merged
- from "parent" PR's that lack a milestone
- etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts:
- the current auto-approve process assumes one PR to master == one cherrypick, and discounts that some fixes may need to be backported to multiple release branches
- I had to double-check, but it sure looks like
cherrypick-candidate
is just used for display purposes, I'm not sure if there is automation that consumes the cherrypick queue - Given that there is no bot-driven way to apply the
cherrypick-candidate
label, it's more likely a PR author without repo write access would just run the cherypick script themselves
I dislike this whole process and suggest that it's way easier to just get a human to apply the cherrypick-approved
label
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re: multi-branch pick tracking/process, see suggestions in https://groups.google.com/forum/m/#!topic/kubernetes-wg-contribex/XxYn02YQcV0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for reminding me of that thread, replied over there
contributors/devel/cherry-picks.md
Outdated
[branching](https://git.k8s.io/release/docs/branching.md) documentation. | ||
|
||
#### Individual Cherrypicks | ||
* Run the [cherry pick script](https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh). This example applies a master branch PR #98765 to the remote branch `upstream/release-3.14`: `hack/cherry_pick_pull.sh upstream/release-3.14 98765` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would move the description of this script way, way up. AFAICT it's the sole answer for how cherrypick-candidates turn into cherrypick PR's with the current setup. A branch manager looks at the cherry pick queue, and calls this with N PR's for "batch" mode, or PR authors can do this on their own.
contributors/devel/cherry-picks.md
Outdated
|
||
#### Individual Cherrypicks | ||
* Run the [cherry pick script](https://git.k8s.io/kubernetes/hack/cherry_pick_pull.sh). This example applies a master branch PR #98765 to the remote branch `upstream/release-3.14`: `hack/cherry_pick_pull.sh upstream/release-3.14 98765` | ||
* NOTE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the script also needs the GITHUB_USER
environment variable to be set to wherever your fork of kubernetes lives
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the additional info @spiffxp
contributors/devel/cherry-picks.md
Outdated
@@ -7,39 +7,42 @@ depending on the point in the release cycle. | |||
## Propose a Cherry Pick | |||
|
|||
1. Cherrypicks are [managed with labels and milestones](/contributors/guide/release-notes.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof indeed. I should've caught that.
contributors/devel/cherry-picks.md
Outdated
* PRs batched up and merged to the release branch get a `cherrypick-approved` label and lose the `cherrypick-candidate` label. | ||
* PRs that won't be merged to the release branch, lose the `cherrypick-candidate` label. | ||
|
||
There is a helper tool [`branchff`](https://git.k8s.io/release/branchff) and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do folks think it would make sense to merge this cherry-pick.md and the https://github.com/kubernetes/release/blob/master/docs/branching.md ?
This may address #1894 |
contributors/devel/cherry-picks.md
Outdated
`upstream/release-3.14`: `hack/cherry_pick_pull.sh upstream/release-3.14 | ||
98765` | ||
* Your cherrypick PR (targeted to the branch) will immediately get | ||
the `do-not-merge/cherry-pick-not-approved` label. The branch owner |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The branch owner will approve the cherry pick, but they won't LGTM it. Standard lgtm/approval rules still apply, even for cherry picks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm happy the way I updated this doc made the few pieces of original text look like new text too. I hadn't changed this line's contents but it is nevertheless unclear. I've tweaked the text as suggested. Thanks!
contributors/devel/cherry-picks.md
Outdated
`do-not-merge/cherry-pick-not-approved` label. The release branch owner | ||
will triage PRs targeted to the branch. Normal rules apply for code | ||
reviewers applying the `/lgtm` label as appropriate, with the branch | ||
owner applying the `/approve` label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I should have been clearer.. the branch manager will apply "cherrypick-approved", but OWNERS will still need to "/approve" the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that makes sense, but...is that what's actually implemented? I'm not seeing that in prow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cherrypick-approved
label doesn't have an associated prow command. It's added manually by the branch manager.
Example PR that shows the process: kubernetes/kubernetes#62847
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! Amended.
16dc02c
to
15c2679
Compare
contributors/devel/cherry-picks.md
Outdated
will triage PRs targeted to the branch. Normal rules apply for code merge. | ||
Reviewers apply the `/lgtm` label and owners `/approve` as they deem | ||
appropriate. The approving release branch owner is responsible for applying | ||
the `/cherrypick-approved` label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna get real nit picky here.. when you're talking about commands, the command is /lgtm
and the label it applies is label
. So if you're talking about the context of the command someone will use, it's /lgtm
and /approve
, but if you're talking about the labels they apply, it's lgtm
, approve
, and cherrypick-approved
. cherrypick-approved
should never have a slash, as there is no slash command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all not picking. This is important to have clear and consistent, especially here since parts can be done with commands and the cherrypick-approve is not. I inadvertently left the / in the cherrypick-approved and definitely will remove. On the other two: since things are drifting toward bot commands more and more as the normal workflow path would you bias to saying to label with the (non-slash-preceded) label names? Or to giving the command name to trigger the labeling?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It all depends on the context and how you write it. When you say "Reviewers apply the /lgtm
label", this is incorrect because the label is "lgtm". You can either say "Reviewers apply the lgtm
label" or "Reviewers use the /lgtm
command". I don't really have a preference as long as we are consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amended to simplified language on the commands and removed the errant slash on the non-comman cherrypick-approved
label.
The cherry-pick instruction guide was quite out of date. This commit dramatically simplifies the doc. Also, based on watching a new user attempt a cherry pick (a common occurance around release time with the revolving staffing of the release team), a few clarification and setup issues are addressed around the hack/cherry_pick_pull.sh script pre-requisites. This is an interim fix as the doc will need updated again to capture the pending prow based method when that becomes preferred and the file should be merged with the various other branch and release maintenance documents that are out there. Signed-off-by: Tim Pepper <tpepper@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cblecker The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
The cherry-pick instruction guide had some readability issues in
its formatting, with numbered bullet lists not rendering correctly.
It also referenced an issue which was resolved, so I've added links
to the resulting tools and information. Finally, based on watching
a new user attempt a cherry pick (a common occurance around release
time with the revolving staffing of the release team) a few
clarification and setup issues are described around the
hack/cherry_pick_pull.sh script.
Signed-off-by: Tim Pepper tpepper@vmware.com