Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/github-scr…
Browse files Browse the repository at this point in the history
…ipt-7
  • Loading branch information
mikealfare authored Apr 25, 2024
2 parents 3bd63c6 + 5596f57 commit 9b333f6
Show file tree
Hide file tree
Showing 37 changed files with 426 additions and 216 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.8.0b2
current_version = 1.8.0b3
parse = (?P<major>[\d]+) # major version number
\.(?P<minor>[\d]+) # minor version number
\.(?P<patch>[\d]+) # patch version number
Expand Down
17 changes: 17 additions & 0 deletions .changes/1.8.0-b3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## dbt-snowflake 1.8.0-b3 - April 17, 2024

### Features

- Add external_access_integration and secret to python models ([#955](https://github.com/dbt-labs/dbt-snowflake/issues/955))
- Support TableLastModifiedMetadataBatch capability ([#965](https://github.com/dbt-labs/dbt-snowflake/issues/965))

### Fixes

- skipping a test that provides a false condition ([#976](https://github.com/dbt-labs/dbt-snowflake/issues/976))

### Under the Hood

- Update dependabot to cover GHA ([#967](https://github.com/dbt-labs/dbt-snowflake/issues/967))

### Contributors
- [@Lindblomsebastian](https://github.com/Lindblomsebastian) ([#955](https://github.com/dbt-labs/dbt-snowflake/issues/955))
6 changes: 6 additions & 0 deletions .changes/1.8.0/Features-20240404-171704.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Support TableLastModifiedMetadataBatch capability
time: 2024-04-04T17:17:04.853047-07:00
custom:
Author: michelleark
Issue: "965"
6 changes: 6 additions & 0 deletions .changes/1.8.0/Fixes-20240416-203625.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: skipping a test that provides a false condition
time: 2024-04-16T20:36:25.449409-05:00
custom:
Author: McKnight-42
Issue: "976"
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20240412-155923.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump dorny/paths-filter from 2 to 3"
time: 2024-04-12T15:59:23.00000Z
custom:
Author: dependabot[bot]
PR: 972
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20240412-160019.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump actions/setup-python from 4 to 5"
time: 2024-04-12T16:00:19.00000Z
custom:
Author: dependabot[bot]
PR: 973
6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20240412-160023.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: "Dependencies"
body: "Bump actions/checkout from 3 to 4"
time: 2024-04-12T16:00:23.00000Z
custom:
Author: dependabot[bot]
PR: 974
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240412-094507.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: 'test contract enforcement for GEOGRAPHY and GEOMETRY types '
time: 2024-04-12T09:45:07.55962-07:00
custom:
Author: michelleark
Issue: "894"
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240418-160240.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix duplicate alias being added when running a model with inline refs and `--empty`
time: 2024-04-18T16:02:40.488967-07:00
custom:
Author: colin-rogers-dbt
Issue: "980"
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ updates:
schedule:
interval: "weekly"
rebase-strategy: "disabled"
- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "weekly"
rebase-strategy: "disabled"
4 changes: 2 additions & 2 deletions .github/scripts/integration-test-matrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module.exports = ({ context }) => {

if (labels.includes("test macos") || testAllLabel) {
include.push({
os: "macos-latest",
os: "macos-12",
adapter,
"python-version": pythonVersion,
});
Expand Down Expand Up @@ -78,7 +78,7 @@ module.exports = ({ context }) => {
// additionally include runs for all adapters, on macos and windows,
// but only for the default python version
for (const adapter of supportedAdapters) {
for (const operatingSystem of ["windows-latest", "macos-latest"]) {
for (const operatingSystem of ["windows-latest", "macos-12"]) {
include.push({
os: operatingSystem,
adapter: adapter,
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ jobs:
steps:
- name: Check out the repository (non-PR)
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Check out the repository (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
Expand All @@ -86,7 +86,7 @@ jobs:
# 'false' - if none of changed files matches any of filter rules
# also, returns:
# `changes` - JSON array with names of all filters matching any of the changed files
uses: dorny/paths-filter@v2
uses: dorny/paths-filter@v3
id: get-changes
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -139,21 +139,21 @@ jobs:
steps:
- name: Check out the repository
if: github.event_name != 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

# explicity checkout the branch for the PR,
# this is necessary for the `pull_request_target` event
- name: Check out the repository (PR)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'

Expand Down Expand Up @@ -80,12 +80,12 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -120,12 +120,12 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'

Expand Down Expand Up @@ -173,12 +173,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-12, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/nightly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:

permissions:
contents: write # this is the permission that allows creating a new release
packages: write # this is the permission that allows pushing Docker images

defaults:
run:
Expand All @@ -39,7 +40,7 @@ jobs:

steps:
- name: "Checkout ${{ github.repository }} Branch ${{ env.RELEASE_BRANCH }}"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.RELEASE_BRANCH }}

Expand Down
54 changes: 28 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#
# **when?**
# This workflow can be run manually on demand or can be called by other workflows
name: Release to GitHub and PyPI
name: "Release to GitHub, PyPI, and Docker"
run-name: "Release ${{ inputs.version_number }} to GitHub, PyPI, and Docker"

on:
workflow_dispatch:
Expand Down Expand Up @@ -60,6 +61,11 @@ on:
type: boolean
default: false
required: false
only_docker:
description: "Only release Docker image, skip GitHub & PyPI"
type: boolean
default: false
required: false
workflow_call:
inputs:
sha:
Expand Down Expand Up @@ -128,30 +134,25 @@ jobs:
echo Package test command: ${{ inputs.package_test_command }}
echo Test run: ${{ inputs.test_run }}
echo Nightly release: ${{ inputs.nightly_release }}
echo Only Docker: ${{ inputs.only_docker }}
bump-version-generate-changelog:
name: Bump package version, Generate changelog

uses: dbt-labs/dbt-release/.github/workflows/release-prep.yml@main

with:
sha: ${{ inputs.sha }}
version_number: ${{ inputs.version_number }}
target_branch: ${{ inputs.target_branch }}
env_setup_script_path: ${{ inputs.env_setup_script_path }}
test_run: ${{ inputs.test_run }}
nightly_release: ${{ inputs.nightly_release }}

secrets: inherit

log-outputs-bump-version-generate-changelog:
name: "[Log output] Bump package version, Generate changelog"
if: ${{ !failure() && !cancelled() }}

if: ${{ !failure() && !cancelled() && !inputs.only_docker }}
needs: [bump-version-generate-changelog]

runs-on: ubuntu-latest

steps:
- name: Print variables
run: |
Expand All @@ -160,11 +161,9 @@ jobs:
build-test-package:
name: Build, Test, Package
if: ${{ !failure() && !cancelled() }}
if: ${{ !failure() && !cancelled() && !inputs.only_docker }}
needs: [bump-version-generate-changelog]

uses: dbt-labs/dbt-release/.github/workflows/build.yml@main

with:
sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }}
version_number: ${{ inputs.version_number }}
Expand All @@ -174,19 +173,15 @@ jobs:
package_test_command: ${{ inputs.package_test_command }}
test_run: ${{ inputs.test_run }}
nightly_release: ${{ inputs.nightly_release }}

secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

github-release:
name: GitHub Release
if: ${{ !failure() && !cancelled() }}

if: ${{ !failure() && !cancelled() && !inputs.only_docker }}
needs: [bump-version-generate-changelog, build-test-package]

uses: dbt-labs/dbt-release/.github/workflows/github-release.yml@main

with:
sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }}
version_number: ${{ inputs.version_number }}
Expand All @@ -195,34 +190,41 @@ jobs:

pypi-release:
name: PyPI Release

needs: [github-release]

if: ${{ !failure() && !cancelled() && !inputs.only_docker }}
needs: [bump-version-generate-changelog, build-test-package]
uses: dbt-labs/dbt-release/.github/workflows/pypi-release.yml@main

with:
version_number: ${{ inputs.version_number }}
test_run: ${{ inputs.test_run }}

secrets:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}

docker-release:
name: "Docker Release"
# We cannot release to docker on a test run because it uses the tag in GitHub as
# what we need to release but draft releases don't actually tag the commit so it
# finds nothing to release
if: ${{ !failure() && !cancelled() && (!inputs.test_run || inputs.only_docker) }}
needs: [bump-version-generate-changelog, build-test-package, github-release]
permissions:
packages: write
uses: dbt-labs/dbt-release/.github/workflows/release-docker.yml@main
with:
version_number: ${{ inputs.version_number }}
test_run: ${{ inputs.test_run }}

slack-notification:
name: Slack Notification
if: ${{ failure() && (!inputs.test_run || inputs.nightly_release) }}

needs:
[
bump-version-generate-changelog,
build-test-package,
github-release,
pypi-release,
docker-release,
]

uses: dbt-labs/dbt-release/.github/workflows/slack-post-notification.yml@main
with:
status: "failure"

secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_ADAPTER_ALERTS }}
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/dbt-labs/pre-commit-hooks
rev: v0.1.0a1
hooks:
- id: dbt-core-in-adapters-check
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
Expand Down
Loading

0 comments on commit 9b333f6

Please sign in to comment.