Skip to content

Commit

Permalink
Merge branch 'main' into snapshot_time_data_type
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt authored Sep 20, 2024
2 parents e2705a1 + 084674f commit 4056345
Show file tree
Hide file tree
Showing 26 changed files with 535 additions and 104 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240911-001806.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Add support for Iceberg table materializations.
time: 2024-09-11T00:18:06.780586-07:00
custom:
Author: versusfacit
Issue: "321"
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240913-215416.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Microbatch incremental strategy
time: 2024-09-13T21:54:16.492885-04:00
custom:
Author: michelleark
Issue: "1182"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240719-125618.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Remove `freezegun` as a testing dependency; this package is no longer used
time: 2024-07-19T12:56:18.957049-04:00
custom:
Author: mikealfare
Issue: "1136"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240722-143114.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Add support for Python 3.12
time: 2024-07-22T14:31:14.024865-07:00
custom:
Author: versusfacit
Issue: "903"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240806-215935.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Isolating distribution testing
time: 2024-08-06T21:59:35.284641-04:00
custom:
Author: leahwicz
Issue: "1130"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240917-181147.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Change behavior flag semantics to log iceberg flag warnings..
time: 2024-09-17T18:11:47.525026-07:00
custom:
Author: versusfacit
Issue: "321"
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,25 @@ updates:
schedule:
interval: "daily"
rebase-strategy: "disabled"
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-patch
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
rebase-strategy: "disabled"
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-patch
- package-ecosystem: "docker"
directory: "/docker"
schedule:
interval: "weekly"
rebase-strategy: "disabled"
ignore:
- dependency-name: "*"
update-types:
- version-update:semver-patch
2 changes: 1 addition & 1 deletion .github/scripts/integration-test-matrix.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = ({ context }) => {
const defaultPythonVersion = "3.8";
const supportedPythonVersions = ["3.8", "3.9", "3.10", "3.11"];
const supportedPythonVersions = ["3.8", "3.9", "3.10", "3.11", "3.12"];
const supportedAdapters = ["snowflake"];

// if PR, generate matrix based on files changed and PR labels
Expand Down
20 changes: 0 additions & 20 deletions .github/scripts/update_dbt_core_branch.sh

This file was deleted.

21 changes: 21 additions & 0 deletions .github/scripts/update_dev_dependency_branches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -e
set -e


dbt_adapters_branch=$1
dbt_core_branch=$2
dbt_common_branch=$3
target_req_file="dev-requirements.txt"
core_req_sed_pattern="s|dbt-core.git.*#egg=dbt-core|dbt-core.git@${dbt_core_branch}#egg=dbt-core|g"
adapters_req_sed_pattern="s|dbt-adapters.git|dbt-adapters.git@${dbt_adapters_branch}|g"
common_req_sed_pattern="s|dbt-common.git|dbt-common.git@${dbt_common_branch}|g"
if [[ "$OSTYPE" == darwin* ]]; then
# mac ships with a different version of sed that requires a delimiter arg
sed -i "" "$adapters_req_sed_pattern" $target_req_file
sed -i "" "$core_req_sed_pattern" $target_req_file
sed -i "" "$common_req_sed_pattern" $target_req_file
else
sed -i "$adapters_req_sed_pattern" $target_req_file
sed -i "$core_req_sed_pattern" $target_req_file
sed -i "$common_req_sed_pattern" $target_req_file
fi
65 changes: 49 additions & 16 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

name: Adapter Integration Tests

run-name: "${{ (contains(github.event_name, 'workflow_') && inputs.name) || github.event_name }}: ${{ (contains(github.event_name, 'workflow_') && inputs.adapter_branch) || github.ref_name }} by @${{ github.actor }}"

on:
# pushes to release branches
push:
Expand All @@ -34,10 +36,31 @@ on:
# manual trigger
workflow_dispatch:
inputs:
dbt-core-branch:
description: "branch of dbt-core to use in dev-requirements.txt"
name:
description: "Name to associate with run (example: 'dbt-adapters-242')"
required: false
type: string
default: "Adapter Integration Tests"
adapter_branch:
description: "The branch of this adapter repository to use"
type: string
required: false
default: "main"
dbt_adapters_branch:
description: "The branch of dbt-adapters to use"
type: string
required: false
default: "main"
dbt_core_branch:
description: "The branch of dbt-core to use"
type: string
required: false
default: "main"
dbt_common_branch:
description: "The branch of dbt-common to use"
type: string
required: false
default: "main"

# explicitly turn off permissions for `GITHUB_TOKEN`
permissions: read-all
Expand Down Expand Up @@ -141,12 +164,19 @@ jobs:

steps:
- name: Check out the repository
if: github.event_name != 'pull_request_target'
if: github.event_name == 'push'
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Check out the repository (workflow_dispatch)
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ inputs.adapter_branch }}

# explicity checkout the branch for the PR,
# explicitly 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'
Expand All @@ -160,19 +190,22 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Update Adapters and Core branches (update dev_requirements.txt)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
./.github/scripts/update_dev_dependency_branches.sh \
${{ inputs.dbt_adapters_branch }} \
${{ inputs.dbt_core_branch }} \
${{ inputs.dbt_common_branch }}
cat dev-requirements.txt
- name: Install python dependencies
run: |
python -m pip install --user --upgrade pip
python -m pip install tox
python -m pip --version
tox --version
- name: Update dev_requirements.txt
if: inputs.dbt-core-branch != ''
run: |
pip install bumpversion
./.github/scripts/update_dbt_core_branch.sh ${{ inputs.dbt-core-branch }}
- name: Run tox (snowflake)
if: matrix.adapter == 'snowflake'
env:
Expand All @@ -195,18 +228,18 @@ jobs:
DBT_TEST_USER_3: dbt_test_role_3
run: tox -- --ddtrace

- name: Get current date
if: always()
id: date
run: echo "date=$(date +'%Y-%m-%dT%H_%M_%S')" >> $GITHUB_OUTPUT #no colons allowed for artifacts

- uses: actions/upload-artifact@v4
if: always()
with:
name: logs
name: logs_${{ matrix.python-version }}_${{ matrix.os }}_${{ matrix.adapter }}-${{ steps.date.outputs.date }}
path: ./logs
overwrite: true

- name: Get current date
if: always()
id: date
run: echo "date=$(date +'%Y-%m-%dT%H_%M_%S')" >> $GITHUB_OUTPUT #no colons allowed for artifacts

- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

env:
TOXENV: "unit"
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
overwrite: true

test-build:
name: verify packages / python ${{ matrix.python-version }} / ${{ matrix.os }}
name: verify packages / python ${{ matrix.python-version }} / ${{ matrix.os }} / ${{ matrix.dist-type }}

if: needs.build.outputs.is_alpha == 0

Expand All @@ -175,7 +175,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
dist-type: ['whl', 'gz']

steps:
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -197,18 +198,10 @@ jobs:
- name: Show distributions
run: ls -lh dist/

- name: Install wheel distributions
- name: Install ${{ matrix.dist-type }} distributions
run: |
find ./dist/*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
find ./dist/*.${{ matrix.dist-type }} -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
- name: Check wheel distributions
run: |
python -c "import dbt.adapters.snowflake"
- name: Install source distributions
run: |
find ./dist/*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
- name: Check source distributions
- name: Check ${{ matrix.dist-type }} distributions
run: |
python -c "import dbt.adapters.snowflake"
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ repos:
- --target-version=py39
- --target-version=py310
- --target-version=py311
- --target-version=py312
additional_dependencies: [flaky]

- repo: https://github.com/pycqa/flake8
Expand Down
Loading

0 comments on commit 4056345

Please sign in to comment.