Skip to content
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

Create pre-release process #42

Open
iameskild opened this issue Jun 16, 2022 · 3 comments · May be fixed by #88
Open

Create pre-release process #42

iameskild opened this issue Jun 16, 2022 · 3 comments · May be fixed by #88

Comments

@iameskild
Copy link
Collaborator

At the moment, working through a pre-release process can be a little tricky given the differences between how Python and Helm handle pre-releases. Helm enforces a strict SemVer versioning scheme thus in order to cut a non-production (i.e. alpha/beta/RC) release, you must specify a pre-release in the following format:

<version core> "-" <pre-release>` 

For example, 0.4.0-rc1.

This conflicts with how Python handles pre-releases. Python PEP 440 outlines the particular syntax that should be followed which also includes a discussion on version "normalization". According to Python PEP 440, pre-releases are normalized as follows: 0.4.0-rc1 becomes 0.4.0rc1.

Now because of these differences and the fact that the docker image is tagged using the python release version syntax, when the helm chart of the same pre-release version is pulled and installed, the container.image in deployment.yaml is unable to find this version. It's looking for 0.4.0-rc1 when it needs 0.4.0rc1.

To get this to work more smoothly, we can either add/update the tag using the docker/metadata-action or find a way to specify the tag in container.image in deployment.yaml.

@iameskild iameskild reopened this Jun 22, 2022
@minrk
Copy link
Contributor

minrk commented Oct 3, 2024

Looking into this, two ways I see this being easier:

  1. version chart independently of Python package, then there's no need for tagging to match
  2. build kbatch-proxy image in the chart instead of (or in addition to) in the Python package repo

If we build both, the image in the chart could start out as a one-line Dockerfile, ensuring the right version:

FROM kbatch-dev/kbatch-proxy:$version

The main reason I see for building an image in the Python repo is continuous publishing, which we haven't done (though #82 introduces it). If we're not doing that, I think there's little reason to build the image in the Python repo as opposed to the chart repo.

This could all be fairly straightforward by adding chartpress to the helm chart.

WDYT, @yuvipanda ?

@minrk
Copy link
Contributor

minrk commented Oct 7, 2024

Just created 0.5.0a1 with the new process, and it worked fine. Assuming making a kbatch-proxy package and chart release (not required to do together)

  1. tag kbatch repo with tbump, e.g. tbump 0.5.0a1
  2. publish a release via github Releases UI with autogen changelog (this is what triggers image tagging, push to PyPI)
  3. update appVersion in chart repo (use pep440 '0.5.0a1')
  4. publish helm-style semver tag on the chart repo (git tag -am "release 0.5.0 alpha 1" 0.5.0-alpha.1; git push origin 0.5.0-alpha.1)

Not all of these steps are required unless making a prerelease of the Python package and propagating it through to a release of the chart all at the same time. 1-2 publish a Python package release, 3 updates the chart, 4 tags the chart (chart version does not need to match appVersion).
1-2

@minrk
Copy link
Contributor

minrk commented Oct 7, 2024

Leaving this open only until I write that down in the docs, which I'll try to do tomorrow.

@minrk minrk linked a pull request Oct 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants