Skip to content

Latest commit

 

History

History
96 lines (55 loc) · 5.1 KB

RELEASE.md

File metadata and controls

96 lines (55 loc) · 5.1 KB

Releases

This page describes the release process and the currently planned schedule for upcoming releases.

Release schedule

To be discussed. Currently, there is no specific schedule or cadence for releases.

How to cut a new release

This guide is strongly based on the Prometheus release instructions.

Branch management and versioning strategy

We use Semantic Versioning.

We maintain a separate branch for each minor release, named release-<major>.<minor>, e.g. release-1.1, release-2.0.

The usual flow is to merge new features and changes into the main branch and to merge bug fixes into the latest release branch. Bug fixes are then merged into main from the latest release branch. The main branch should always contain all commits from the latest release branch.

If a bug fix got accidentally merged into main, cherry-pick commits have to be created in the latest release branch, which then have to be merged back into main. Try to avoid that situation.

Maintaining the release branches for older minor releases happens on a best effort basis.

Prepare your release

The process formally starts with the initial pre-release, but some preparations should be done a few days in advance.

For a new major or minor release, work from the main branch. For a patch release, work in the branch of the minor release you want to patch (e.g. release-0.3 if you're releasing v0.3.2).

We aim to keep the main branch in a working state as much as possible. In principle, it should be possible to cut a release from main at any time. In practice, things might not work out as nicely. A few days before the release is scheduled, the releaser should check the state of main. Following their best judgement, the releaser should try to expedite bug fixes that are still in progress but should make it into the release. On the other hand, the releaser may hold back merging last-minute invasive and risky changes that are better suited for the next minor release.

Publish a new pre-release

Suppose the releaser thinks the latest changes in the main could create unpredictable behavior on the platform besides the tested ones, or the release needs further testing. In that case, they could choose to cut a release candidate.

  • The first pre-release (using the suffix -rc.0) and creates a new branch called release-<major>.<minor> starting at the commit tagged for the pre-release. In general, a pre-release is considered a release candidate (that's what rc stands for) and should therefore not contain any known bugs that are planned to be fixed in the final release.
  • With the pre-release, the releaser is responsible for running and monitoring a benchmark run of the pre-release for 1 day (https://demo.parca.dev should be used), after which, if successful, the pre-release is promoted to a stable release.
  • If regressions or critical bugs are detected, they need to get fixed before cutting a new pre-release (called -rc.1, -rc.2, etc.).

Publish a new release

For new minor and major releases, create the release-<major>.<minor> branch starting at the PR merge commit.

From now on, all work happens on the release-<major>.<minor> branch.

Via GitHub's UI

Go to https://github.com/parca-dev/parca-agent/releases/new and click on "Choose a tag" where you can type the new tag name.

Click on "Create new tag" in the dropdown and make sure main is selected for a new major or minor release or the release-<major>.<minor> branch for a patch release.

The title of the release is the tag itself.

You can generate the changelog and then add additional contents from previous a release (like social media links and more).

Via CLI

Alternatively, you can do the tagging on the commandline:

Tag the new release with a tag named v<major>.<minor>.<patch>, e.g. v2.1.3. Note the v prefix.

git tag -s "v2.1.3" -m "v2.1.3"
git push origin "v2.1.3"

Signed tag with a GPG key is appreciated, but in case you can't add a GPG key to your Github account using the following procedure, you can replace the -s flag by -a flag of the git tag command to only annotate the tag without signing.

Final steps

Our CI pipeline will automatically push the container images to ghcr.io.

Go to https://github.com/parca-dev/parca-dev/releases and check the created release.

For patch releases, submit a pull request to merge back the release branch into the main branch.

Take a breath. You're done releasing.

Generating Snapcraft tokens

The pipeline is configured to release Snap packages automatically to snapcraft.io.

The token for the store has a limited life. It can be regenerated like so (replace date placeholders!):

snapcraft export-login \
  --snaps=parca-agent \
  --acls package_access,package_push,package_update,package_release \
  --expires "YYYY-MM-DD" \
  /tmp/parca_agent_snap_token

The contents of /tmp/parca_agent_snap_token should then be added to a Github Secret called SNAPCRAFT_STORE_CREDENTIALS.