Skip to content

Commit

Permalink
Adjust 1.1.latest branch to backport convention
Browse files Browse the repository at this point in the history
  • Loading branch information
damian3031 committed Feb 28, 2023
1 parent 36c7215 commit 50fec3e
Show file tree
Hide file tree
Showing 14 changed files with 262 additions and 93 deletions.
5 changes: 5 additions & 0 deletions .changes/0.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Previous Releases

For information on prior major and minor releases, see their changelogs:

* [1.0 and earlier](https://github.com/starburstdata/dbt-trino/blob/1.0.latest/CHANGELOG.md)
6 changes: 6 additions & 0 deletions .changes/header.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# dbt-trino Changelog

- This file provides a full account of all changes to `dbt-trino`
- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases.
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/starburstdata/dbt-trino/blob/master/CONTRIBUTING.md#adding-changelog-entry)
Empty file added .changes/unreleased/.gitkeep
Empty file.
7 changes: 7 additions & 0 deletions .changes/unreleased/Under the Hood-20230227-123234.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Under the Hood
body: Adjust 1.1.latest branch to backport convention
time: 2023-02-27T12:32:34.381989+01:00
custom:
Author: damian3031
Issue: "231"
PR: "238"
20 changes: 20 additions & 0 deletions .changes/v1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## dbt-trino 1.1.0 (May 9, 2022)

### Features
- Add support for `on_table_exists` in table materialization ([#26](https://github.com/starburstdata/dbt-trino/issues/26), [#54](https://github.com/starburstdata/dbt-trino/pull/54))
- Adds support for OAuth2 authentication using web browser ([#40](https://github.com/starburstdata/dbt-trino/issues/40), [#41](https://github.com/starburstdata/dbt-trino/pull/41))
- Add `view_security` to define security mode for views ([#65](https://github.com/starburstdata/dbt-trino/pull/65))
- Support for dbt source freshness ([#28](https://github.com/starburstdata/dbt-trino/issues/28), [#61](https://github.com/starburstdata/dbt-trino/pull/61))

### Fixes
- Add support for future versions of dbt-core ([#55](https://github.com/starburstdata/dbt-trino/issues/55), [#65](https://github.com/starburstdata/dbt-trino/pull/65))

### Under the hood
- Add PostgreSQL docker container for testing ([#66](https://github.com/starburstdata/dbt-trino/issues/66), [#67](https://github.com/starburstdata/dbt-trino/pull/67))
- Migrate to new adapter testing framework ([#57](https://github.com/starburstdata/dbt-trino/issues/57), [#65](https://github.com/starburstdata/dbt-trino/pull/65))
- Implement trino-python-client's prepared statements using `experimental_python_types` ([#61](https://github.com/starburstdata/dbt-trino/pull/61))

Contributors:
* [@hovaesco](https://github.com/hovaesco) ([#54](https://github.com/starburstdata/dbt-trino/pull/54), [#65](https://github.com/starburstdata/dbt-trino/pull/65), [#67](https://github.com/starburstdata/dbt-trino/pull/67))
* [@smith-m](https://github.com/smith-m) ([#65](https://github.com/starburstdata/dbt-trino/pull/65))
* [@mdesmet](https://github.com/mdesmet) ([#41](https://github.com/starburstdata/dbt-trino/pull/41), [#61](https://github.com/starburstdata/dbt-trino/pull/61))
9 changes: 9 additions & 0 deletions .changes/v1.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## dbt-trino 1.1.1 (June 20, 2022)

### Fixes
- Enable setting session properties per dbt model when `session_properties` is not defined in the dbt profile ([#71](https://github.com/starburstdata/dbt-trino/pull/71))
- Support impersonation with JWT, certificate and OAuth authentication ([#73](https://github.com/starburstdata/dbt-trino/issues/73), [#74](https://github.com/starburstdata/dbt-trino/pull/74))

Contributors:
* [@findinpath](https://github.com/findinpath) ([#71](https://github.com/starburstdata/dbt-trino/pull/71))
* [@mdesmet](https://github.com/mdesmet) ([#74](https://github.com/starburstdata/dbt-trino/pull/74))
65 changes: 65 additions & 0 deletions .changie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
changesDir: .changes
unreleasedDir: unreleased
headerPath: header.tpl.md
versionHeaderPath: ""
changelogPath: CHANGELOG.md
versionExt: md
versionFormat: '## dbt-trino {{.Version}} - {{.Time.Format "January 02, 2006"}}'
kindFormat: '### {{.Kind}}'
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/starburstdata/dbt-trino/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/starburstdata/dbt-trino/pull/{{.Custom.PR}}))'

kinds:
- label: Breaking Changes
- label: Features
- label: Fixes
- label: Under the Hood
- label: Dependencies
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/starburstdata/dbt-trino/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/starburstdata/dbt-trino/pull/{{.Custom.PR}}))'
- label: Security
changeFormat: '- {{.Body}} ({{if ne .Custom.Issue ""}}[#{{.Custom.Issue}}](https://github.com/starburstdata/dbt-trino/issues/{{.Custom.Issue}}), {{end}}[#{{.Custom.PR}}](https://github.com/starburstdata/dbt-trino/pull/{{.Custom.PR}}))'

newlines:
beforeChangelogHeader: 1

custom:
- key: Author
label: GitHub Username(s) (separated by a single space if multiple)
type: string
minLength: 3
- key: Issue
label: GitHub Issue Number
type: int
minInt: 1
optional: true
- key: PR
label: GitHub Pull Request Number
type: int
minInt: 1

footerFormat: |
{{- $contributorDict := dict }}
{{- range $change := .Changes }}
{{- $authorList := splitList " " $change.Custom.Author }}
{{- /* loop through all authors for a PR */}}
{{- range $author := $authorList }}
{{- $authorLower := lower $author }}
{{- $prLink := $change.Kind }}
{{- $prLink = "[#pr](https://github.com/starburstdata/dbt-trino/pull/pr)" | replace "pr" $change.Custom.PR }}
{{- /* check if this contributor has other PRs associated with them already */}}
{{- if hasKey $contributorDict $author }}
{{- $prList := get $contributorDict $author }}
{{- $prList = append $prList $prLink }}
{{- $contributorDict := set $contributorDict $author $prList }}
{{- else }}
{{- $prList := list $prLink }}
{{- $contributorDict := set $contributorDict $author $prList }}
{{- end }}
{{- end}}
{{- end }}
{{- /* no indentation here for formatting so the final markdown doesn't have unneeded indentations */}}
{{- if $contributorDict}}
### Contributors
{{- range $k,$v := $contributorDict }}
- [@{{$k}}](https://github.com/{{$k}}) ({{ range $index, $element := $v }}{{if $index}}, {{end}}{{$element}}{{end}})
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ on:
push:
branches:
- master
- "*.*.latest"
paths-ignore:
- "**/*.md"
pull_request:
branches:
- master
- "*.*.latest"
paths-ignore:
- "**/*.md"

Expand All @@ -28,7 +30,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9.5"
python-version: "3.9"

- name: Run dbt-trino tests against ${{ matrix.type }}
run: make dbt-${{ matrix.type }}-tests
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9.5"
python-version: "3.9"

- name: Test release
run: |
Expand All @@ -37,10 +37,10 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9.5"
python-version: "3.9"

- name: Get dbt-trino version
run: echo "version_number=$(cat .bumpversion.cfg | grep current_version | cut -d " " -f3)" >> $GITHUB_ENV
run: echo "version_number=$(cat dbt/adapters/trino/__version__.py | sed -n 's/version = "\(.*\)\"/\1/p')" >> $GITHUB_ENV

# Need to set an output variable because env variables can't be taken as input
# This is needed for the next step with releasing to GitHub
Expand Down Expand Up @@ -78,10 +78,10 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: "3.9.5"
python-version: "3.9"

- name: Get dbt-trino version
run: echo "version_number=$(cat .bumpversion.cfg | grep current_version | cut -d " " -f3)" >> $GITHUB_ENV
run: echo "version_number=$(cat dbt/adapters/trino/__version__.py | sed -n 's/version = "\(.*\)\"/\1/p')" >> $GITHUB_ENV

- name: Release to pypi
env:
Expand Down
106 changes: 106 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# **what?**
# This workflow will take the new version number to bump to. With that
# it will run versionbump to update the version number everywhere in the
# code base and then run changie to create the corresponding changelog.
# A PR will be created with the changes that can be reviewed before committing.

# **why?**
# This is to aid in releasing dbt-trino and making sure we have updated
# the version in all places and generated the changelog.

# **when?**
# This is triggered manually

name: Version Bump

on:
workflow_dispatch:
inputs:
version_number:
description: 'The version number to bump to (ex. 1.2.0, 1.3.0b1)'
required: true

jobs:
bump:
runs-on: ubuntu-latest
steps:
- name: "[DEBUG] Print Variables"
run: |
echo "all variables defined as inputs"
echo The version_number: ${{ github.event.inputs.version_number }}
- name: Check out the repository
uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.8"

- name: Install brew
run: |
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
- name: Install python dependencies
run: |
python3 -m venv env
source env/bin/activate
pip install --upgrade pip
- name: Audit Version and Parse Into Parts
id: semver
uses: dbt-labs/actions/parse-semver@v1
with:
version: ${{ github.event.inputs.version_number }}

- name: Set branch value
id: variables
run: |
echo "BRANCH_NAME=prep-release/${{ github.event.inputs.version_number }}_$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- name: Create PR branch
run: |
git checkout -b ${{ steps.variables.outputs.BRANCH_NAME }}
git push origin ${{ steps.variables.outputs.BRANCH_NAME }}
git branch --set-upstream-to=origin/${{ steps.variables.outputs.BRANCH_NAME }} ${{ steps.variables.outputs.BRANCH_NAME }}
- name: Bump version
run: |
echo -en "version = \"${{ github.event.inputs.version_number }}\"\n" > dbt/adapters/trino/__version__.py
git status
- name: Run changie
run: |
brew tap miniscruff/changie https://github.com/miniscruff/changie
brew install changie
if [[ ${{ steps.semver.outputs.is-pre-release }} -eq 1 ]]
then
changie batch ${{ steps.semver.outputs.base-version }} --move-dir '${{ steps.semver.outputs.base-version }}' --prerelease '${{ steps.semver.outputs.pre-release }}'
else
if [[ -d ".changes/${{ steps.semver.outputs.base-version }}" ]]
then
changie batch ${{ steps.semver.outputs.base-version }} --include '${{ steps.semver.outputs.base-version }}' --remove-prereleases
else
changie batch ${{ steps.semver.outputs.base-version }} --move-dir '${{ steps.semver.outputs.base-version }}'
fi
fi
changie merge
git status
- name: Commit version bump to branch
uses: EndBug/add-and-commit@v7
with:
author_name: 'Github Build Bot'
author_email: 'automation@starburstdata.com'
message: 'Bumping version to ${{ github.event.inputs.version_number }} and generate CHANGELOG'
branch: '${{ steps.variables.outputs.BRANCH_NAME }}'
push: 'origin origin/${{ steps.variables.outputs.BRANCH_NAME }}'

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
author: 'Github Build Bot <automation@starburstdata.com>'
base: ${{github.ref}}
title: 'Bumping version to ${{ github.event.inputs.version_number }} and generate changelog'
branch: '${{ steps.variables.outputs.BRANCH_NAME }}'
labels: |
Skip Changelog
79 changes: 10 additions & 69 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
## dbt-trino TBD (TBD)
# dbt-trino Changelog

### Features
- This file provides a full account of all changes to `dbt-trino`
- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases.
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/starburstdata/dbt-trino/blob/master/CONTRIBUTING.md#adding-changelog-entry)
## dbt-trino 1.1.1 (June 20, 2022)

### Fixes

- Enable setting session properties per dbt model when `session_properties` is not defined in the dbt profile ([#71](https://github.com/starburstdata/dbt-trino/pull/71))
- Support impersonation with JWT, certificate and OAuth authentication ([#73](https://github.com/starburstdata/dbt-trino/issues/73), [#74](https://github.com/starburstdata/dbt-trino/pull/74))

### Under the hood

Contributors:
* [@findinpath](https://github.com/findinpath) ([#71](https://github.com/starburstdata/dbt-trino/pull/71))
* [@mdesmet](https://github.com/mdesmet) ([#74](https://github.com/starburstdata/dbt-trino/pull/74))

## dbt-trino 1.1.0 (May 9, 2022)

### Features
Expand All @@ -28,73 +28,14 @@ Contributors:
- Add PostgreSQL docker container for testing ([#66](https://github.com/starburstdata/dbt-trino/issues/66), [#67](https://github.com/starburstdata/dbt-trino/pull/67))
- Migrate to new adapter testing framework ([#57](https://github.com/starburstdata/dbt-trino/issues/57), [#65](https://github.com/starburstdata/dbt-trino/pull/65))
- Implement trino-python-client's prepared statements using `experimental_python_types` ([#61](https://github.com/starburstdata/dbt-trino/pull/61))

Contributors:
* [@hovaesco](https://github.com/hovaesco) ([#54](https://github.com/starburstdata/dbt-trino/pull/54), [#65](https://github.com/starburstdata/dbt-trino/pull/65), [#67](https://github.com/starburstdata/dbt-trino/pull/67))
* [@smith-m](https://github.com/smith-m) ([#65](https://github.com/starburstdata/dbt-trino/pull/65))
* [@mdesmet](https://github.com/mdesmet) ([#41](https://github.com/starburstdata/dbt-trino/pull/41), [#61](https://github.com/starburstdata/dbt-trino/pull/61))
## Previous Releases

## dbt-trino 1.0.3 (March 2, 2022)

### Features
- Adds support for Trino certificate authentication ([#45](https://github.com/starburstdata/dbt-trino/pull/45))

### Fixes
- Supporting custom schemas in incremental models ([#17](https://github.com/starburstdata/dbt-trino/issues/17), [#39](https://github.com/starburstdata/dbt-trino/pull/39))
- Supporting column type overrides in seeds ([#42](https://github.com/starburstdata/dbt-trino/issues/42)), ([#44](https://github.com/starburstdata/dbt-trino/pull/44))

### Under the hood
- Add missing tests to Makefile ([#43](https://github.com/starburstdata/dbt-trino/pull/43))
- Introduce PR template and `CHANGELOG.md` ([#47](https://github.com/starburstdata/dbt-trino/pull/47))

Contributors:
* [@hovaesco](https://github.com/hovaesco) ([#43](https://github.com/starburstdata/dbt-trino/pull/43), [#47](https://github.com/starburstdata/dbt-trino/pull/47))
* [@austenLacy](https://github.com/austenLacy) ([#45](https://github.com/starburstdata/dbt-trino/pull/45))
* [@rahulj51](https://github.com/rahulj51) ([#39](https://github.com/starburstdata/dbt-trino/pull/39))
* [@mdesmet](https://github.com/mdesmet) ([#44](https://github.com/starburstdata/dbt-trino/pull/44))

## dbt-trino 1.0.1 (January 24, 2022)

### Features
- Add support for JWT authentication ([#31](https://github.com/starburstdata/dbt-trino/issues/31), [#32](https://github.com/starburstdata/dbt-trino/pull/32))
- Adds certificate authentication as an optional credential parameter ([#23](https://github.com/starburstdata/dbt-trino/issues/23), [#24](https://github.com/starburstdata/dbt-trino/pull/24))

### Fixes
- Drop redundant transaction queries ([#20](https://github.com/starburstdata/dbt-trino/issues/20), [#30](https://github.com/starburstdata/dbt-trino/pull/30))

### Under the hood
- Upgrade to dbt-core 1.0.1 ([#34](https://github.com/starburstdata/dbt-trino/pull/34))

Contributors:
* [@Haunfelder](https://github.com/Haunfelder) ([#24](https://github.com/starburstdata/dbt-trino/pull/24))
* [@hovaesco](https://github.com/hovaesco) ([#30](https://github.com/starburstdata/dbt-trino/pull/30), [#32](https://github.com/starburstdata/dbt-trino/pull/32), [#34](https://github.com/starburstdata/dbt-trino/pull/34))

## dbt-trino 1.0.0 (December 20, 2021)
For information on prior major and minor releases, see their changelogs:

### Features
- Add support for dbt `current_timestamp()` macro ([#15](https://github.com/starburstdata/dbt-trino/pull/15))

### Fixes
- Change default batch size to 1000 ([#16](https://github.com/starburstdata/dbt-trino/issues/16), [#18](https://github.com/starburstdata/dbt-trino/pull/18))

### Under the hood
- Add CI for Trino and Starburst ([#14](https://github.com/starburstdata/dbt-trino/pull/14))
- Add release pipeline ([#21](https://github.com/starburstdata/dbt-trino/pull/21))
- Upgrade to dbt-core 1.0.0 and variety of adjustments ([#25](https://github.com/starburstdata/dbt-trino/pull/25))

Contributors:
* [@findinpath](https://github.com/findinpath) ([#15](https://github.com/starburstdata/dbt-trino/pull/15))
* [@hovaesco](https://github.com/hovaesco) ([#14](https://github.com/starburstdata/dbt-trino/pull/14), [#18](https://github.com/starburstdata/dbt-trino/pull/18), [#21](https://github.com/starburstdata/dbt-trino/pull/21), [#25](https://github.com/starburstdata/dbt-trino/pull/25))

## dbt-trino 0.21.0 (October 8, 2021)

### Features
- Adding support for incremental models append strategy ([#1](https://github.com/starburstdata/dbt-trino/issues/1), [#10](https://github.com/starburstdata/dbt-trino/pull/10))

### Under the hood
- Upgrade to dbt-core 0.21.0 ([#11](https://github.com/starburstdata/dbt-trino/pull/11))


Contributors:
* [@findinpath](https://github.com/findinpath) ([#10](https://github.com/starburstdata/dbt-trino/pull/10))
* [@hovaesco](https://github.com/hovaesco) ([#11](https://github.com/starburstdata/dbt-trino/pull/11))
* [1.0 and earlier](https://github.com/starburstdata/dbt-trino/blob/1.0.latest/CHANGELOG.md)
2 changes: 1 addition & 1 deletion docker/dbt/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ADD README.md ${DBT_DIR}
ADD docker/dbt/jaffle_shop /jaffle_shop
ADD docker/dbt/profiles.yml /root/.dbt/profiles.yml
WORKDIR ${DBT_DIR}
RUN python3 setup.py install
RUN pip3 install .

WORKDIR /usr/app

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dbt-core==1.1.1
dbt-core~=1.1.1
trino==0.313.0
Loading

0 comments on commit 50fec3e

Please sign in to comment.