From 4c738fb7b229e0d3ad6e947f53626a0934e7c6ec Mon Sep 17 00:00:00 2001 From: Min RK Date: Wed, 9 Oct 2024 11:25:44 +0200 Subject: [PATCH] [doc] update prerelease process --- docs/source/dev-guide.md | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/docs/source/dev-guide.md b/docs/source/dev-guide.md index 92ebbdb..69b0f26 100644 --- a/docs/source/dev-guide.md +++ b/docs/source/dev-guide.md @@ -87,25 +87,38 @@ You'll might want to log in and create a token at http://localhost:8000/hub/toke These are the current steps that it takes to cut a new release of `kbatch`. ### Release new version of `kbatch`/`kbatch-proxy`: -1. Update the version in the following files: - - [`kbatch/setup.cfg`](https://github.com/kbatch-dev/kbatch/blob/main/kbatch/setup.cfg#L7) - - [`kbatch/kbatch/__init__.py`](https://github.com/kbatch-dev/kbatch/blob/main/kbatch/kbatch/__init__.py#L17) - - [`kbatch-proxy/setup.cfg`](https://github.com/kbatch-dev/kbatch/blob/main/kbatch-proxy/setup.cfg#L7) - - [`docs/source/conf.py`](https://github.com/kbatch-dev/kbatch/blob/main/docs/source/conf.py#L25) -3. Update any relevant docs and merge these changes into the codebase. -2. [Draft a release on the `kbatch` GitHub repo.](https://github.com/kbatch-dev/kbatch/releases). + +1. Update any relevant docs via pull request +2. tag a new (PEP440) version with `tbump`: + ``` + tbump NEW_VERSION # e.g. tbump 0.5.0a1 + ``` +3. [Draft a release on the `kbatch` GitHub repo](https://github.com/kbatch-dev/kbatch/releases), referencing the tag just created. - This triggers the [`publish-image.yaml`](https://github.com/kbatch-dev/kbatch/blob/main/.github/workflows/publish-image.yaml) workflow which: - publishes a container image for `kbatch-proxy` to the [GitHub container registry](https://github.com/kbatch-dev/kbatch/pkgs/container/kbatch-proxy). - publish `kbatch` and `kbatch-proxy` python libraries to PyPI. +#### Update appVersion in helm chart + +Once the image is published, you can bump the version of kbatch-proxy in the helm chart to match. +This is stored in `appVersion` in [kbatch/Chart.yaml](https://github.com/kbatch-dev/helm-chart/blob/HEAD/kbatch/Chart.yaml) +and `kbatch_version` in [chartpress.yaml](https://github.com/kbatch-dev/helm-chart/blob/main/chartpress.yaml). +Updating appVersion _probably_ means a chart release is in order, but not necessarily. ### Release new version of `helm-chart`: -1. Once the container image and libraries have been successfully published, update the version of the `helm-chart` to match this new version of `kbatch`: - - [`kbatch/Chart.yaml`](https://github.com/kbatch-dev/helm-chart/blob/main/kbatch/Chart.yaml#L6) + +The helm chart version and kbatch version are versioned separately, +though their versions may be the same or similar. +The latest version of the chart should probably reference the latest version of kbatch-proxy, +but chart releases can be made without needing updates to the Python packages if there are changes to the chart labels, options, etc. + +1. make sure the `appVersion` is up to date in Chart.yaml and in sync with `kbatch_version` in chartpress.yaml. 2. Update any relevant docs and merge these changes into the codebase. -3. [Draft a release on the `helm-chart` GitHub repo.](https://github.com/kbatch-dev/helm-chart/releases) +3. [Draft a release on the `helm-chart` GitHub repo](https://github.com/kbatch-dev/helm-chart/releases), creating a new tag. - This triggers the [`publish-chart.yaml`](https://github.com/kbatch-dev/helm-chart/blob/main/.github/workflows/publish-charts.yml) workflow which: - publishes a Helm chart to the [GitHub Pages site](https://kbatch-dev.github.io/helm-chart/) for this repo. -> NOTE: there are known limitations to the pre-release process outlined [here](https://github.com/kbatch-dev/kbatch/issues/42). +Note about prereleases: helm has strict semver requirements, so prerelease tags on the helm chart should look like e.g. `0.5.0-alpha.1`, +while the Python packages use pep440 so the same version would be `0.5.0a1` for `kbatch` itself. +This is what would appear in the chart's `appVersion`.