Skip to content

Latest commit

 

History

History
143 lines (92 loc) · 5.44 KB

RELEASING.rst

File metadata and controls

143 lines (92 loc) · 5.44 KB

How to release?

Decide on the new version number

You need to increment the version number according to SemVer. The rules for incrementing are as follows:

  • Major: Backwards-incompatible / breaking changes, or headline new features.
  • Minor: Changes that do not require DAG changes and adds new features like adding new Operators/Sensors/Hooks to the package.
  • Patch: Anything else, mainly bug-fixes and security fixes.

Minor and Patch versions should not contain any breaking changes.

Update metadata and create a pull request to main

This includes the following steps which are detailed below.

  1. Create a new release branch from main
  2. Update the version number
  3. Write the changelog

Or you can use make target prepare-release (make sure you're on the main branch and have the latest tag on your local machine)

make ASTRO_PROVIDER_VERSION=<RELEASE_VERSION> prepare-release

It creates the release branch, checkout to it, bump the version number, extract all the commit messages between the previous release to the latest commit and write them in to CHANGELOG.rst. The only thing you need to do is updating CHANGELOG.rst manually.

Create a new release branch from main

Create a new release branch from main branch with the name release-<version>. e.g. If you want to release version 1.17.6, you can create a new branch called release-1-17-6 cut from main branch.

Note: It is important to prefix your release branch name with release-. This is because we run a CircleCI job to generate the constraints files only on such branches and the main branch.

Update the version number

You will need to update it in:

  • setup.cfg - in version key of [metadata] section
  • docs/conf.py - release variable
  • astronomer/providers/package.py - get_provider_info method return value versions

You can also use commitizen (version >= 3.4.0 is required) to update the version in these files

Install commitizen on mac

brew install commitizen

Bump versions locally

make ASTRO_PROVIDER_VERSION=<RELEASE_VERSION> bump-version

Note: <RELEASE_VERSION> is the software version you want to release.

Compare the commits introduced since the last release to aid building the CHANGELOG

You can use the following link to compare the commits introduced since the last release (e.g. 1.15.4)

https://github.com/astronomer/astronomer-providers/compare/1.15.4...main

Note: Make sure to replace the last release version in the above URL

Write the changelog

Add the new release to CHANGELOG.rst, along with as many release notes as you can (more information is always better than less, though try to group it with larger changes at the top).

Commit the release

Bundle up these changes into a single commit with the message in the format "Release 1.2.1". Submit a pull request for this commit and wait for approval unless you are releasing an urgent security fix.

Tag and push the commit

Once the release branch has been approved and merged to main, checkout to the main branch. It will trigger the GitHub Actions to tag that commit with a tag that matches the version number (git tag 1.2.1 <latest commit sha>), and then push the tag (git push origin 1.2.1).

CircleCI will handle the rest - building, testing, and pushing the resulting artifacts to PyPI. Keep an eye out for test failures, though.

Create a new release on GitHub

Create a new release on GitHub by clicking on this link. Choose the tag you just created, and fill in the release notes or click on Auto-generate release notes.

Use 1.1.0 release notes as an example.

Verify Docs are Published

Verify that new docs are published on ReadTheDocs site. The stable version of the docs should be the same as the version number of the release. You can verify this checking the changelog entries.

Close the Milestone

Close the milestone on GitHub for that particular version. Example: https://github.com/astronomer/astronomer-providers/milestone/2

Make an announcement to the releases channel on Astronomer Slack

Make an announcement to the releases channel on Astronomer Slack by referring to the template from one of the previous releases.:

Create Stable Branch

If you are releasing a new major release, then you should make a new branch called x-0-stable for the previous release from the last commit on main for that release.

Bump the astronomer-providers version for new development

Create a PR to bump the astronomer-providers version to the next minor dev version.e.g. If you just released 1.15.6, then the next version should be 1.16.0-dev1. This PR should be merged to main branch.