|
| 1 | +# SIG Node Cherry-Pick Management Process |
| 2 | + |
| 3 | +Kubernetes supports [multiple release versions] simultaneously. How do new |
| 4 | +fixes make it into earlier versions, when we only develop against one version |
| 5 | +at a time? |
| 6 | + |
| 7 | +We [cherry-pick] them! |
| 8 | + |
| 9 | +To assist the Release Team, a member of SIG Node can volunteer to oversee |
| 10 | +Node's cherry-picks. This guide is intended to document that person's |
| 11 | +responsibilities. |
| 12 | + |
| 13 | +[multiple release versions]: https://kubernetes.io/docs/setup/release/version-skew-policy/ |
| 14 | +[cherry-pick]: /contributors/devel/sig-release/cherry-picks.md |
| 15 | + |
| 16 | +## Release timeline |
| 17 | + |
| 18 | +SIG Release regularly (on a ~monthly cadence) ships [patch releases]. Every |
| 19 | +release, the Release Team publishes a list of [target dates] with **cherry-pick |
| 20 | +deadlines**. |
| 21 | + |
| 22 | +SIG Node's responsibility is to ensure that all patches that we want |
| 23 | +cherry-picked to previous releases must be [triaged], prioritized, LGTM'd, and |
| 24 | +approved by the deadline. |
| 25 | + |
| 26 | +[patch releases]: https://github.com/kubernetes/sig-release/blob/master/release-engineering/versioning.md#patch-releases |
| 27 | +[target dates]: https://github.com/kubernetes/sig-release/blob/master/releases/patch-releases.md#upcoming-monthly-releases |
| 28 | +[triaged]: triage.md |
| 29 | + |
| 30 | +## Monthly cherry-pick process |
| 31 | + |
| 32 | +Throughout the release cycle, merged bugfixes should be evaluated for inclusion |
| 33 | +as cherry-picks. Any bugs marked **critical-urgent** should be considered. Some |
| 34 | +**important-soon** bugs may also be considered if they are sufficiently |
| 35 | +contained and meet the criteria above. |
| 36 | + |
| 37 | +**Only** bug fixes should be considered for backports. Patches should be merged |
| 38 | +and soaked in CI for at least a week. |
| 39 | + |
| 40 | +To create a cherry-pick PR, you can use the `./hack/cherry_pick_pull.sh` |
| 41 | +script. Read through the [cherry pick documentation][cherry-pick] for details |
| 42 | +on that process. |
| 43 | + |
| 44 | +## Preparing the SIG's patches |
| 45 | + |
| 46 | +The week of the cherry-pick deadline, create a Slack thread ([example |
| 47 | +thread]) in the [#sig-node] channel to track the cherry-picks. |
| 48 | + |
| 49 | +To determine what fixes need to be cherry-picked, you can use the [SIG Node PR |
| 50 | +Board with the cherry-pick filter view]. Track each change considered for |
| 51 | +inclusion individually. |
| 52 | + |
| 53 | +Release branches are typically kept in sync. This means that bugfixes should be |
| 54 | +backported to all applicable supported branches. The [cherry pick |
| 55 | +schedule][target dates] will include a list of all supported releases and their |
| 56 | +end-of-life (EOL) dates. |
| 57 | + |
| 58 | +In the first comment in the Slack thread, track each patch and the status of |
| 59 | +backports to each branch. Some examples of what you might write are available |
| 60 | +below for reference. You can use the rest of the Slack thread for discussion. |
| 61 | + |
| 62 | +Typically, we will backport 2-3 patches per monthly cycle. |
| 63 | + |
| 64 | +[example thread]: https://kubernetes.slack.com/archives/C0BP8PW9G/p1617919799137500 |
| 65 | +[#sig-node]: https://kubernetes.slack.com/messages/sig-node |
| 66 | +[SIG Node PR Board with the cherry-pick filter view]: https://github.com/orgs/kubernetes/projects/49?card_filter_query=label%3Ado-not-merge%2Fcherry-pick-not-approved |
| 67 | + |
| 68 | +### Example cherry-pick: all supported branches |
| 69 | + |
| 70 | +Consider the following PR to backport: |
| 71 | +https://github.com/kubernetes/kubernetes/pull/99600 |
| 72 | + |
| 73 | +This fixes broken accounting in a beta feature that has been beta for the past |
| 74 | +three releases. |
| 75 | + |
| 76 | +Since it is a **critical-urgent** fix, it is eligible to be backported to all |
| 77 | +affected releases. During the 1.21 cycle, that means 1.18 through 1.20. |
| 78 | + |
| 79 | +Thus, our Slack update should look like the following: |
| 80 | + |
| 81 | +> Count pod overhead as an entity's resource usage https://github.com/kubernetes/kubernetes/pull/99600 |
| 82 | +> - 1.18 https://github.com/kubernetes/kubernetes/pull/100039 |
| 83 | +> - 1.19 https://github.com/kubernetes/kubernetes/pull/100038 |
| 84 | +> - 1.20 https://github.com/kubernetes/kubernetes/pull/100037 |
| 85 | +
|
| 86 | +You can use this list and the Node Triage board to ensure all PRs have LGTMs |
| 87 | +and approvals, so they are ready for the Release Team by the cherry-pick |
| 88 | +deadline. |
| 89 | + |
| 90 | +### Example cherry-pick: limited release support |
| 91 | + |
| 92 | +Consider the following PR to backport: |
| 93 | +https://github.com/kubernetes/kubernetes/pull/98088 |
| 94 | + |
| 95 | +This fixes an issue with an alpha feature introduced in 1.20, so it is only |
| 96 | +eligible to backport to 1.20 during the 1.21 cycle. |
| 97 | + |
| 98 | +In this case, |
| 99 | + |
| 100 | +- the fix only affects feature-gated code |
| 101 | +- the fix addresses a serious bug (repeatedly acquiring a lock unnecessarily) |
| 102 | +- the fix is small |
| 103 | + |
| 104 | +Hence, we included it in our backport. |
| 105 | + |
| 106 | +Thus, our Slack update should look like the following: |
| 107 | + |
| 108 | +> Fix repeatedly acquire the inhibit lock https://github.com/kubernetes/kubernetes/pull/98088 |
| 109 | +> - 1.18 N/A, only affects 1.20+ |
| 110 | +> - 1.19 N/A, only affects 1.20+ |
| 111 | +> - 1.20 https://github.com/kubernetes/kubernetes/pull/99255 |
| 112 | +
|
| 113 | +### Example cherry-pick: rejected |
| 114 | + |
| 115 | +Consider the following PR to backport: |
| 116 | +https://github.com/kubernetes/kubernetes/pull/98376 |
| 117 | + |
| 118 | +In this case, |
| 119 | + |
| 120 | +- the fix is a relatively involved refactor |
| 121 | +- the fix caused a known test regression |
| 122 | +- the regression fix is not being backported |
| 123 | +- the priority of the fix was **important-longterm** |
| 124 | + |
| 125 | +Hence, this would **not** be an appropriate patch to cherry-pick. SIG Node |
| 126 | +chose to close its cherry-pick PRs. |
0 commit comments