Skip to content

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
clrcrl committed Jul 30, 2020
1 parent f824abc commit e4a11c0
Show file tree
Hide file tree
Showing 7 changed files with 128 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/dbt_minor_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: dbt Minor Release Follow-Up
about: A checklist of tasks to complete after a minor release is made to dbt
title: 'dbt Minor Release Follow up for dbt v0.x.0'
labels:
assignees: ''
---

<!---
This template is to be used once a new dbt minor release is available on pypi.
In the future, we will consider doing pre-releases.
-->

First, check if this is a breaking change
- [ ] Increase the upper bound of the `require-dbt-version` config in the `dbt_project.yml`
- [ ] Increase the upper bound of the dbt version in `run_test.sh`
- [ ] Create a PR against the `main` branch to see if tests pass

If test pass, this is _not_ a breaking change. You should:
- [ ] Merge into `main`
- [ ] Create a patch release

If tests fail, this _is_ a breaking change. You'll need to create a minor release:
- [ ] Change the PR base to be against the next `dev` branch.
- [ ] Increase the lower bound to the current dbt minor version in both the `dbt_project.yml` and `run_test.sh` files
- [ ] Fix any errors
- [ ] Merge `dev` into `main`
- [ ] Create a minor release
- [ ] Once the release is available on hub, [create a new issue](https://github.com/fishtown-analytics/dbt-utils/issues/new/choose) using the "dbt-utils Minor Release Checklist" template
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/utils_minor_release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: dbt-utils Minor Release Follow-up
about: A checklist of tasks to complete after making a dbt-utils minor release
title: 'dbt Minor Release Follow up for dbt-utils v0.x.0'
labels:
assignees: ''
---

<!---
This template is to be used once a new dbt-utils release is available on hub.
In the future, we will consider automating this.
-->

## Process for each dependent package
First, check if this is a breaking change
- [ ] Increase the upper bound of the `dbt-utils` `version:` config in the `packages.yml` of the dependent package, e.g.:
```yml
# packages.yml
packages:
- package: fishtown-analytics/dbt_utils
version: [">=0.4.0", "<0.6.0"]

```
- [ ] Push to a new branch to see if tests pass

If this is _not_ a breaking change:
- [ ] Create a patch release

If this _is_ a breaking change:
- [ ] Fix any breaking changes
- [ ] Increase the lower bound to the current dbt-utils minor version
- [ ] Create a minor release for the package

## Checklist of dependent packages
- [ ] [audit-helper](https://github.com/fishtown-analytics/dbt-audit-helper)
- [ ] [codegen](https://github.com/fishtown-analytics/dbt-codegen)
- [ ] [redshift](https://github.com/fishtown-analytics/redshift)
- [ ] [event-logging](https://github.com/fishtown-analytics/dbt-event-logging)
- [ ] [snowplow](https://github.com/fishtown-analytics/snowplow)
- [ ] [external-tables](https://github.com/fishtown-analytics/dbt-external-tables)
- [ ] [segment](https://github.com/fishtown-analytics/segment)
- [ ] [facebook-ads](https://github.com/fishtown-analytics/facebook-ads)
- [ ] [stitch-utils](https://github.com/fishtown-analytics/stitch-utils)
12 changes: 11 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
This is a:
- [ ] bug fix PR with no breaking changes (please change the base branch to `main`)
- [ ] new functionality
- [ ] a breaking change

## Description & motivation
<!---
Describe your changes, and why you're making them.
-->

## Checklist
- [ ] I have verified that these changes work locally
- [ ] I have verified that these changes work locally on the following warehouses (Note: it's okay if you do not have access to all warehouses, this helps us understand what has been covered)
- [ ] BigQuery
- [ ] Postgres
- [ ] Redshift
- [ ] Snowflake
- [ ] I have updated the README.md (if applicable)
- [ ] I have added tests & descriptions to my models (and macros if applicable)
- [ ] I have added an entry to the changelog
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## dbt-utils v0.6.0 (unreleased)

## Fixes

## Features

## Quality of life
* Improve release process (#251)
35 changes: 35 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# dbt-utils releases

## When do we release?
There's a few scenarios that might prompt a release:

| Scenario | Release type |
|--------------------------------------------|--------------|
| New functionality¹ | minor |
| Breaking changes to existing macros | minor |
| Fixes to existing macros | patch |
| dbt minor release with no breaking changes | patch |
| dbt minor release with breaking changes | minor |

¹New macros were previously considered patch releases — we have brought them up to minor releases to make versioning for dependencies clearer.

## Branching strategy

At any point, there should be two long-lived branches:
- `main`: This reflects the most recent release of dbt-utils
- `dev/0.x.0`: This reflects the next minor release, where `x` will be replaced with the minor version number

The `dev/` branch should be merged into `main` branch when new minor releases are created.

## Process for minor releases
e.g. for releasing `0.6.0`
1. Create the PR to merge `dev/0.6.0` into `main`. Also update the `Changelog` as part of this PR, and merge it
2. Create the GitHub release
3. Delete the `dev/0.6.0` branch, and create a new branch `dev/0.7.0` from `main`, setting it as the default branch in GitHub.
4. [Create a new issue](https://github.com/fishtown-analytics/dbt-utils/issues/new/choose) from the "dbt-utils Minor Release Follow-Up" template to also update any dependencies

## Process for patch releases
1. Create the release
2. Then rebase the current `dev/` branch on top of the `main` branch so that any fixes will be included in the next minor release

No dependencies need to be updated for minor releases.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: 'dbt_utils'
version: '0.1.0'

require-dbt-version: ">=0.17.0"
require-dbt-version: [">=0.17.0", "<0.18.0"]
config-version: 2

target-path: "target"
Expand Down
2 changes: 1 addition & 1 deletion run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ ! -f $VENV ]]; then
. $VENV

pip install --upgrade pip setuptools
pip install dbt
pip install "dbt>=0.17.0,<0.18.0"
fi

. $VENV
Expand Down

0 comments on commit e4a11c0

Please sign in to comment.