Skip to content

Commit 87e220b

Browse files
committed
UPSTREAM: <carry>: update rebase doc
1 parent 63daf06 commit 87e220b

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

REBASE.openshift.md

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ should be true:
3838
- [ ] `make test` executes without error
3939
- [ ] The upstream tag is pushed to `openshift/kubernetes` to ensure that
4040
build artifacts are versioned correctly
41-
- Upstream tooling uses the value of the most recent tag (e.g. `v1.20.0`)
41+
- Upstream tooling uses the value of the most recent tag (e.g. `v1.25.0`)
4242
in the branch history as the version of the binaries it builds.
4343
- Pushing the tag is easy as
4444
```
45-
git push [email protected]:openshift/kubernetes.git refs/tags/v1.20.0
45+
git push [email protected]:openshift/kubernetes.git refs/tags/v1.25.0
4646
```
4747

4848
Details to include in the description of the PR:
@@ -123,14 +123,14 @@ git remote add --fetch openshift https://github.com/openshift/kubernetes
123123

124124
## Creating a new local branch for the new rebase
125125

126-
- Branch the target `k8s.io/kubernetes` release tag (e.g. `v1.20.0`) to a new
126+
- Branch the target `k8s.io/kubernetes` release tag (e.g. `v1.25.0`) to a new
127127
local branch
128128

129129
```
130-
git checkout -b rebase-1.20.0 v1.20.0
130+
git checkout -b rebase-1.25.0 v1.25.0
131131
```
132132

133-
- Merge `openshift(master)` branch into the `rebase-1.20.0` branch with merge
133+
- Merge `openshift(master)` branch into the `rebase-1.25.0` branch with merge
134134
strategy `ours`. It discards all changes from the other branch (`openshift/master`)
135135
and create a merge commit. This leaves the content of your branch unchanged,
136136
and when you next merge with the other branch, Git will only consider changes made
@@ -143,21 +143,21 @@ git merge -s ours openshift/master
143143

144144
## Creating a spreadsheet of carry commits from the previous release
145145

146-
Given the upstream tag (e.g. `v1.19.2`) of the most recent rebase and the name
146+
Given the upstream tag (e.g. `v1.24.2`) of the most recent rebase and the name
147147
of the branch that is targeted for rebase (e.g. `openshift/master`), generate a tsv file
148148
containing the set of carry commits that need to be considered for picking:
149149

150150
```
151-
echo 'Comment Sha\tAction\tClean\tSummary\tCommit link\tPR link' > ~/Documents/v1.19.2.tsv
151+
echo 'Comment Sha\tAction\tClean\tSummary\tCommit link\tPR link' > ~/Documents/v1.24.2.tsv
152152
```
153153
```
154-
git log $( git merge-base openshift/master v1.19.2 )..openshift/master --ancestry-path --reverse --no-merges --pretty='tformat:%x09%h%x09%x09%x09%s%x09https://github.com/openshift/kubernetes/commit/%h?w=1' | grep -E $'\t''UPSTREAM: .*'$'\t' | sed -E 's~UPSTREAM: ([0-9]+)(:.*)~UPSTREAM: \1\2\thttps://github.com/kubernetes/kubernetes/pull/\1~' >> ~/Documents/v1.19.2.tsv
154+
git log $( git merge-base openshift/master v1.24.2 )..openshift/master --ancestry-path --reverse --no-merges --pretty='tformat:%x09%h%x09%x09%x09%s%x09https://github.com/openshift/kubernetes/commit/%h?w=1' | grep -E $'\t''UPSTREAM: .*'$'\t' | sed -E 's~UPSTREAM: ([0-9]+)(:.*)~UPSTREAM: \1\2\thttps://github.com/kubernetes/kubernetes/pull/\1~' >> ~/Documents/v1.24.2.tsv
155155
```
156156

157157
This tsv file can be imported into a google sheets spreadsheet to track the
158158
progress of picking commits to the new rebase branch. The spreadsheet can also
159159
be a way of communicating with rebase reviewers. For an example of this
160-
communication, please see the [the spreadsheet used for the 1.19
160+
communication, please see the [the spreadsheet used for the 1.24
161161
rebase](https://docs.google.com/spreadsheets/d/10KYptJkDB1z8_RYCQVBYDjdTlRfyoXILMa0Fg8tnNlY/edit).
162162

163163
## Picking commits from the previous rebase branch to the new branch
@@ -185,7 +185,7 @@ Commits carried on rebase branches have commit messages prefixed as follows:
185185
- A commit with this message should only be picked into the subsequent rebase branch
186186
if the commits of the referenced PR are not included in the upstream branch.
187187
- To check if a given commit is included in the upstream branch, open the referenced
188-
upstream PR and check any of its commits for the release tag (e.g. `v.1.20.0`)
188+
upstream PR and check any of its commits for the release tag (e.g. `v.1.25.0`)
189189
targeted by the new rebase branch. For example:
190190
- <img src="openshift-hack/commit-tag.png">
191191

@@ -304,7 +304,7 @@ regression in behavior) can often be skipped and addressed post-merge.
304304
- Alternatively, run it in the same container as CI is using for build_root that already has
305305
the etcd at correct version
306306
```
307-
podman run -it --rm -v $( pwd ):/go/k8s.io/kubernetes:Z --workdir=/go/k8s.io/kubernetes registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.16-openshift-4.8 make update OS_RUN_WITHOUT_DOCKER=yes
307+
podman run -it --rm -v $( pwd ):/go/k8s.io/kubernetes:Z --workdir=/go/k8s.io/kubernetes registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.19-openshift-4.12 make update OS_RUN_WITHOUT_DOCKER=yes
308308
```
309309
- Commit the resulting changes as `UPSTREAM: <drop>: make update`.
310310

@@ -327,10 +327,10 @@ merged to the targeted openshift/kubernetes branch after the rebase is
327327
underway. The following strategy is suggested to minimize the cost of incorporating
328328
these new commits:
329329

330-
- rename existing rebase branch (e.g. 1.20.0-beta.2 -> 1.20.0-beta.2-old)
330+
- rename existing rebase branch (e.g. 1.25.0-beta.2 -> 1.25.0-beta.2-old)
331331
- create new rebase branch from HEAD of master
332-
- merge the target upstream tag (e.g. 1.20.0-beta.2) with strategy ours
333-
- pick all carries from renamed rebase branch (e.g. 1.20.0-beta.2-old)
332+
- merge the target upstream tag (e.g. 1.25.0-beta.2) with strategy ours
333+
- pick all carries from renamed rebase branch (e.g. 1.25.0-beta.2-old)
334334
- pick new carries from the openshift/kubernetes target branch
335335
- add details of the new carries to the spreadsheet
336336
- update generated files
@@ -403,7 +403,7 @@ them as the highest priority and release blockers for your team:
403403
## Followup work
404404

405405
1. Update cluster-kube-apiserver-operator `pre-release-lifecycle` alert's
406-
`removed_release` version similarly to https://github.com/openshift/cluster-kube-apiserver-operator/pull/1092.
406+
`removed_release` version similarly to https://github.com/openshift/cluster-kube-apiserver-operator/pull/1382.
407407

408408
## Updating with `git merge`
409409

@@ -415,10 +415,10 @@ to newer released version using `git merge`. To do that follow these steps:
415415

416416
1. Verify upstream changes:
417417
```
418-
git log v1.21.1..v1.21.2 --ancestry-path --reverse --no-merges
418+
git log v1.25.0..v1.25.2 --ancestry-path --reverse --no-merges
419419
```
420420
2. Revert any commits that were merged into kubernetes between previous update and current one.
421-
3. `git merge <new_version>`, example `git merge v1.21.2`.
421+
3. `git merge <new_version>`, example `git merge v1.25.2`.
422422
Most likely you'll encounter conflicts, but most are around go.sum and go.mod,
423423
coming from newer versions. Manually verify them, and in most cases pick the
424424
newer versions of deps. This will be properly update when re-running
@@ -428,6 +428,9 @@ git log v1.21.1..v1.21.2 --ancestry-path --reverse --no-merges
428428
5. Update openshift dependencies and re-run `hack/update-vendor.sh`.
429429
6. Update kubernetes version in `openshift-hack/images/hyperkube/Dockerfile.rhel`.
430430
7. Run `make update` see [Updating generated files](#updating-generated-files).
431+
NOTE: Starting from 4.10, there's a problem running `make update`, so before
432+
running that `podman` command, edit `staging/src/k8s.io/code-generator/go.mod`
433+
file removing this line: `k8s.io/code-generator => ../code-generator`.
431434

432435

433436
## Updating with `rebase.sh` (experimental)
@@ -443,7 +446,7 @@ Here are the steps:
443446
3. This script requires `jq`, `git`, `podman` and `bash`, `gh` is optional.
444447
4. In the root dir of that fork run:
445448
```
446-
openshift-hack/rebase.sh --k8s-tag=v1.21.2 --openshift-release=release-4.8 --bugzilla-id=2003027
449+
openshift-hack/rebase.sh --k8s-tag=v1.25.2 --openshift-release=release-4.12 --bugzilla-id=2003027
447450
```
448451

449452
where `k8s-tag` is the [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes/) release tag, the `openshift-release`

0 commit comments

Comments
 (0)