Releases are created from the main repository branch using the version
numbers, including an intermediate version suffix,
defined in .make.versions
.
The following points are important:
- In general, a common version number is used for all published pypi wheels and docker images.
.make.versions
contains the version to be used when publishing the next release.- Whenever
.make.versions
is changed,make set-versions
should be run from the top of the repo.- Corollary:
make set-versions
should ONLY be used from the top of the repo when.make.versions
changes.
- Corollary:
- The main branch always has the version suffix set to .dev<N>, which allows intermediate publishing from the main branch using version X.Y.Z.dev<N>.
- The
scripts/release-branch.sh
script automates creation of a new release branch and tag and version numbers in.make.versions
- Building and publishing is done manually, or soon via a git action, in the branch created by
scripts/release-branch.sh
.- Wheels can only be published once to pypi for a given version.
- Transform and kfp images may be republished to the docker registry.
- Releases done via the
release-branch.sh
script will have their micro version number set to 0 (e.g., 1.2.0) - Intermediate releases that bump the micro version may be done by individual transforms. This can mean
that version X.Y.Z of a transform is equivalent to the X.Y+1.0 release. The latter created when running
the
release-branch.sh
script.
Creating the release involves
- Editing the
release-notes.md
to list major/minor changes and commit to the main branch. - Creating a release branch and updating the main branch versions (using
release-branch.sh
). - Creating a github release and tag from the release branch using the github web UI.
- Building and publishing pypi library wheels and docker registry image.
Each is discussed below.
Make a dummy release on github (see below) to get a listing of all commits. Use this to come up with the items. Commit this to the main branch so it is ready for including in the release branch.
The scripts/release-branch.sh
is currently run manually to create the branch and tags as follows:
- Creates the
releases/vX.Y.Z
from the main branch whereX.Y.Z
are defined in .make.versions - Creates the
pending-releases/vX.Y.Z
branch for PR'ing back into thereleases/vX.Y.Z
branch. - In the new
pending-releases/vX.Y.Z
branch- Nulls out the version suffix in the new branch's
.make.version
file. - Applies the unsuffixed versions to the artifacts published from the repo using
make set-versions
.. - Commits and pushes branch
- Nulls out the version suffix in the new branch's
- Creates the
pending-version-change/vX.Y.Z
branch for PR'ing back into the main branch.- Note: this branch is named with the new release version (i.e. vX.Y.Z), however the version in this branch is actually X.Y+1.0.dev0.
- In the
pending-version-change/vX.Y.Z
branch- Increments the minor version (i.e. Z+1) and resets the suffix to
dev0
in.make.versions
. - Commits and pushes branch
- Increments the minor version (i.e. Z+1) and resets the suffix to
To double-check the version that will be published from the release,
git checkout pending-releases/vX.Y.Z
make show-version
This will print for example, 1.2.3.
To run the script from the top of the repo:
scripts/release-branch.sh
After running the script, you should
- Create a pull request from branch
pending-releases/vX.Y.Z
into thereleases/vX.Y.Z
branch, and merge. - Use the github web UI to create a git release and tag of the
releases/vX.Y.Z
branch - Create a pull request from branch
pending-version-change/vX.Y.Z
into the main branch, and merge.
After running the release-branch.sh
script, to create tag vX.Y.Z
and branch releases/vX.Y.Z
and PRing/merging vX.Y.Z
into releases/vX.Y.Z
.
- Go to the releases page.
- Select
Draft a new release
- Select target branch
releases/vX.Y.Z
- Select
Choose a tag
, type in vX.Y.Z, clickCreate tag
- Press
Generate release notes
- Add a title (e.g., Release X.Y.Z)
- Add any additional relese notes.
- Press
Publish release
After creating the release and tag on github:
- Switch to a release branch (e.g. releases/v1.2.3).
- Be sure you're at the top of the repository (
.../data-prep-kit
) - Optionally,
make show-version
to see the version that will be published - Running the following, either manually or in a git action
make build
make publish
(See credential requirements below)
For docker registry publishing, the following environment variables/credentials are needed:
- DPK_DOCKER_REGISTRY_USER - user used with the registry defined in DOCKER_HOST in
.make.defaults
- DPK_DOCKER_REGISTRY_KEY - key/password for docker registry user.
To publish to pypi, the credentials in ~/.pypirc
file (let us know if there is a way to do
this with environment variables).
See pypi for details.