Release Process#
“Release candidates” are releases of dd-trace-py that are tagged with version strings including rc and marked in GitHub as “pre-releases”. Most of the time spent “running the release” is actually spent creating and testing release candidates. We create a release candidate, test it, and repeat until the test shows no errors or regressions.
Release candidates are based on the main branch.
The procedure described here can also be used to create patch releases (those that increment the patch version number in the major.minor.patch SemVer framework).
Prerequisites#
Figure out the version of the library that you’re working on releasing.
Ensure the CI is green on the branch on which the release will be based.
Instructions#
Ensure you have followed the prerequisite steps above.
Draft a new GitHub release https://github.com/DataDog/dd-trace-py/releases/new
If release >=x.x.1 and release branch does not exist, create the release branch:
$ git pull
$ git checkout -b X.Y vX.Y.0
$ git push -u origin X.Y
Set the target commit on the GitHub release draft. For release candidates, this should generally be the latest commit on main. For minor releases where the version ends with .0, the target commit must exactly match the commit of the latest relevant release candidate. For patch releases, the target should usually be the current head of the release branch.
Generate release notes from the relevant branch. For release candidates, this is usually main, and for patch releases it’s usually the x.y release branch. Copy and paste the latest section into the release’s description.
$ git pull
$ git checkout <branch>
$ reno report --branch=origin/<branch> | pandoc -f rst -t gfm | less
Make sure the “Set as pre-release” box is CHECKED and the “Set as latest release” box is UNCHECKED. Click “save draft”.
Share the link to the GitHub draft release with someone who can confirm it’s correct
Click the the green “Publish release” button on the draft release. Double check that you have the correct check boxes checked and unchecked based on the release you’re about to publish. Wait for build and publish to succeed. The GitHub release will trigger the GitLab workflow that builds wheels and publishes to PyPI.
Check PyPI for the release.