Skip to content

Commit 193d47e

Browse files
authored
docs: rewrite RELEASE.md as the runbook for the tag-driven release process (#749)
Fixes #640. Part of the release-process section of #606. RELEASE.md was untouched kubernetes-template boilerplate. The actual process is tag-driven: pushing `vX.Y.Z` runs `publish-on-release.yml`, which builds the changelog and publishes the GitHub Release, PyPI package, quay image, and Helm chart. This replaces it with a runbook for what a maintainer does before, during, and after the tag, plus short cadence and versioning sections. The runbook requires the TestPyPI dry run, so this also fixes it.
1 parent a4a81e1 commit 193d47e

2 files changed

Lines changed: 60 additions & 8 deletions

File tree

.github/workflows/test-release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ jobs:
2424
2525
- name: Update version for testing
2626
run: |
27-
sed -i 's/version = ".*"/version = "0.0.1-dev0"/' pyproject.toml
27+
# TestPyPI rejects a re-upload of an existing file, so give every run its own
28+
# dev version derived from the version currently in pyproject.toml.
29+
BASE_VERSION=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
30+
VERSION="${BASE_VERSION}.dev${{ github.run_number }}"
31+
echo "Updating version to: $VERSION"
32+
sed -i 's/version = ".*"/version = "'$VERSION'"/' pyproject.toml
2833
2934
- name: Build package
3035
run: python -m build
@@ -33,4 +38,4 @@ jobs:
3338
env:
3439
TWINE_USERNAME: __token__
3540
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
36-
run: python -m twine upload --repository testpypi dist/*
41+
run: python -m twine upload --repository testpypi --skip-existing dist/*

RELEASE.md

Lines changed: 53 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,56 @@
11
# Release Process
22

3-
The Kubernetes Template Project is released on an as-needed basis. The process is as follows:
3+
Releases are tag-driven. Pushing a `vX.Y.Z` tag runs
4+
[`publish-on-release.yml`](.github/workflows/publish-on-release.yml), which creates the GitHub
5+
Release, publishes to PyPI, pushes the image to quay.io, and packages the Helm chart.
46

5-
1. An issue is proposing a new release with a changelog since the last release
6-
1. All [OWNERS](OWNERS) must LGTM this release
7-
1. An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION`
8-
1. The release issue is closed
9-
1. An announcement email is sent to `dev@kubernetes.io` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released`
7+
## 1. Before the cut
8+
9+
1. Close the milestone. Every open item is either merged, deferred, or closed with reason.
10+
1. Merge a PR bumping `version` in `pyproject.toml` and `version` and `appVersion` in
11+
`deploy/inference-perf/Chart.yaml` to `X.Y.Z`.
12+
1. Optional: Label every PR that belongs in the changelog with one of the categories in
13+
[`.github/changelog-config.json`](.github/changelog-config.json).
14+
1. Confirm the commit you will tag is green on `main`: linting and type checks, unit tests,
15+
coverage, and `E2E Test on change`. Tag only a merged commit on `main`.
16+
1. Run [`test-release.yml`](.github/workflows/test-release.yml) by `workflow_dispatch` on `main`.
17+
It builds the package and uploads it to TestPyPI under a dev version. Fix any failure before
18+
tagging.
19+
1. Optional: Draft the summary of features, fixes, and improvements that goes above the generated
20+
changelog.
21+
22+
## 2. Cut
23+
24+
A maintainer with write access pushes the tag. There is no release PR.
25+
26+
```sh
27+
git fetch upstream
28+
git tag vX.Y.Z upstream/main
29+
git push upstream vX.Y.Z
30+
git push upstream upstream/main:refs/heads/release-vX.Y.Z # one branch per release, at the tag
31+
```
32+
33+
Drafting and publishing a release in the GitHub UI creates the same tag and triggers the same
34+
workflow.
35+
36+
## 3. What the automation does
37+
38+
- `build-and-publish` builds the changelog from labelled PRs since the previous tag and creates
39+
the GitHub Release.
40+
- `python-package` sets `version` from the tag, builds the package, and uploads it to PyPI.
41+
- `docker` builds `linux/amd64` and tags it `vX.Y.Z` and `latest`.
42+
- `helm-chart` packages `deploy/inference-perf` and pushes it to
43+
`oci://quay.io/inference-perf/charts/inference-perf`.
44+
45+
Watch the run under Actions, "Release Processing". The release notes advertise every artifact, so
46+
fix and re-run any failed job before announcing.
47+
48+
## 4. After the cut
49+
50+
- Put the written summary above the generated changelog in the release body.
51+
- Verify each artifact:
52+
`pip install inference-perf==X.Y.Z`,
53+
`docker pull quay.io/inference-perf/inference-perf:vX.Y.Z`,
54+
`helm show chart oci://quay.io/inference-perf/charts/inference-perf --version X.Y.Z`.
55+
- Announce in [#inference-perf](https://kubernetes.slack.com/?redir=%2Fmessages%2Finference-perf)
56+
on Kubernetes Slack and link the release page.

0 commit comments

Comments
 (0)