diff --git a/.github/ISSUE_TEMPLATE/dbt_minor_release.md b/.github/ISSUE_TEMPLATE/dbt_minor_release.md new file mode 100644 index 00000000..cc270107 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/dbt_minor_release.md @@ -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: '' +--- + + + +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 diff --git a/.github/ISSUE_TEMPLATE/utils_minor_release.md b/.github/ISSUE_TEMPLATE/utils_minor_release.md new file mode 100644 index 00000000..1e56edb8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/utils_minor_release.md @@ -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: '' +--- + + + +## 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) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index b9780fbc..b37437e6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -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 ## 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 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..ae9ba984 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,8 @@ +## dbt-utils v0.6.0 (unreleased) + +## Fixes + +## Features + +## Quality of life +* Improve release process (#251) diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 00000000..3260e2a1 --- /dev/null +++ b/RELEASE.md @@ -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 patch releases. diff --git a/dbt_project.yml b/dbt_project.yml index ffd3100d..03a57409 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -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" diff --git a/integration_tests/ci/sample.profiles.yml b/integration_tests/ci/sample.profiles.yml index 893fbe67..7a026e2c 100644 --- a/integration_tests/ci/sample.profiles.yml +++ b/integration_tests/ci/sample.profiles.yml @@ -14,7 +14,7 @@ integration_tests: host: "{{ env_var('POSTGRES_TEST_HOST') }}" user: "{{ env_var('POSTGRES_TEST_USER') }}" pass: "{{ env_var('POSTGRES_TEST_PASS') }}" - port: "{{ env_var('POSTGRES_TEST_PORT') }}" + port: "{{ env_var('POSTGRES_TEST_PORT') | as_number }}" dbname: "{{ env_var('POSTGRES_TEST_DBNAME') }}" schema: dbt_utils_integration_tests_postgres threads: 1 @@ -25,7 +25,7 @@ integration_tests: user: "{{ env_var('REDSHIFT_TEST_USER') }}" pass: "{{ env_var('REDSHIFT_TEST_PASS') }}" dbname: "{{ env_var('REDSHIFT_TEST_DBNAME') }}" - port: "{{ env_var('REDSHIFT_TEST_PORT') }}" + port: "{{ env_var('REDSHIFT_TEST_PORT') | as_number }}" schema: dbt_utils_integration_tests_redshift threads: 1 @@ -36,7 +36,7 @@ integration_tests: project: "{{ env_var('BIGQUERY_TEST_DATABASE') }}" schema: dbt_utils_integration_tests_bigquery threads: 1 - + snowflake: type: snowflake account: "{{ env_var('SNOWFLAKE_TEST_ACCOUNT') }}" @@ -46,4 +46,4 @@ integration_tests: database: "{{ env_var('SNOWFLAKE_TEST_DATABASE') }}" warehouse: "{{ env_var('SNOWFLAKE_TEST_WAREHOUSE') }}" schema: dbt_utils_integration_tests_snowflake - threads: 1 \ No newline at end of file + threads: 1 diff --git a/run_test.sh b/run_test.sh index 20ceef15..737e571a 100755 --- a/run_test.sh +++ b/run_test.sh @@ -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