Skip to content

Commit

Permalink
Merge branch 'main' into dbeatty/contributing-136
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt authored Apr 29, 2024
2 parents 43fb389 + 6d097ee commit 652e0b7
Show file tree
Hide file tree
Showing 64 changed files with 522 additions and 319 deletions.
24 changes: 0 additions & 24 deletions .changes/0.1.0-a8.md

This file was deleted.

1 change: 0 additions & 1 deletion .changes/1.0.0-b1.md

This file was deleted.

15 changes: 15 additions & 0 deletions .changes/1.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## dbt-adapter 1.0.0 - April 01, 2024

### Fixes

* Add field wrapper to BaseRelation members that were missing it.
* Add "description" and "meta" fields to RelationConfig protocol

### Under the Hood

* Lazy load agate to improve dbt-core performance
* add BaseAdapater.MAX_SCHEMA_METADATA_RELATIONS

### Security

* Pin `black>=24.3` in `pyproject.toml`
12 changes: 12 additions & 0 deletions .changes/1.1.0-rc1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## dbt-adapter 1.1.0-rc1 - April 17, 2024

### Features

* Debug log when `type_code` fails to convert to a `data_type`
* Introduce TableLastModifiedMetadataBatch and implement BaseAdapter.calculate_freshness_from_metadata_batch
* Support for sql fixtures in unit testing

### Under the Hood

* Add the option to set the log level of the AdapterRegistered event
* Update dependabot config to cover GHA
6 changes: 6 additions & 0 deletions .changes/1.1.0/Features-20240323-160251.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Debug log when `type_code` fails to convert to a `data_type`
time: 2024-03-23T16:02:51.306658-06:00
custom:
Author: dbeatty10
Issue: "8912"
6 changes: 6 additions & 0 deletions .changes/1.1.0/Features-20240325-180611.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Introduce TableLastModifiedMetadataBatch and implement BaseAdapter.calculate_freshness_from_metadata_batch
time: 2024-03-25T18:06:11.816163-04:00
custom:
Author: michelleark
Issue: "138"
6 changes: 6 additions & 0 deletions .changes/1.1.0/Features-20240409-084844.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Support for sql fixtures in unit testing
time: 2024-04-09T08:48:44.441106-04:00
custom:
Author: gshank
Issue: "148"
6 changes: 6 additions & 0 deletions .changes/1.1.0/Under the Hood-20240329-093307.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Add the option to set the log level of the AdapterRegistered event
time: 2024-03-29T09:33:07.737464-05:00
custom:
Author: emmyoop
Issue: "141"
6 changes: 6 additions & 0 deletions .changes/1.1.0/Under the Hood-20240410-184109.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Update dependabot config to cover GHA
time: 2024-04-10T18:41:09.719652-04:00
custom:
Author: mikealfare
Issue: "161"
1 change: 0 additions & 1 deletion .changes/1.8.0-a2.md

This file was deleted.

1 change: 0 additions & 1 deletion .changes/1.8.0-b1.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changes/unreleased/Dependencies-20240424-140142.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Dependencies
body: add support for py3.12
time: 2024-04-24T14:01:42.576383-07:00
custom:
Author: colin-rogers-dbt
Issue: "57"
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240412-192040.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Cross-database `cast` macro
time: 2024-04-12T19:20:40.904842-06:00
custom:
Author: MichelleArk dbeatty10
Issue: "84"
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240418-155123.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Allow adapters to opt out of aliasing the subquery generated by render_limited
time: 2024-04-18T15:51:23.584295-07:00
custom:
Author: colin-rogers-dbt
Issue: "124"
7 changes: 7 additions & 0 deletions .changes/unreleased/Features-20240418-155531.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
kind: Features
body: subquery alias generated by render_limited now includes the relation name to
mitigate duplicate aliasing
time: 2024-04-18T15:55:31.826729-07:00
custom:
Author: colin-rogers-dbt
Issue: ' 124'
6 changes: 0 additions & 6 deletions .changes/unreleased/Fixes-20240226-224046.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/unreleased/Fixes-20240229-163014.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240411-185203.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix adapter-specific cast handling for constraint enforcement
time: 2024-04-11T18:52:03.960202-07:00
custom:
Author: michelleark
Issue: "166"
6 changes: 0 additions & 6 deletions .changes/unreleased/Under the Hood-20240309-150639.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/unreleased/Under the Hood-20240312-170057.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240417-192843.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Validate that dbt-core and dbt-adapters remain de-coupled
time: 2024-04-17T19:28:43.400023-04:00
custom:
Author: mikealfare
Issue: "144"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240423-094843.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: remove dbt_version from query comment test fixture
time: 2024-04-23T09:48:43.208035-07:00
custom:
Author: colin-rogers-dbt
Issue: "184"
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/internal-epic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ body:
label: Objectives
description: |
What are the high level goals we are trying to achieve? Provide use cases if available.
Example:
- [ ] Allow adapter maintainers to support custom materializations
- [ ] Reduce maintenance burden for incremental users by offering materialized views
Expand All @@ -48,7 +48,7 @@ body:
Provide a list of GH issues that will build out this functionality.
This may start empty, or as a checklist of items.
However, it should eventually become a list of Feature Implementation tickets.
Example:
- [ ] Create new macro to select warehouse
- [ ] https://github.com/dbt-labs/dbt-adapters/issues/42
Expand All @@ -66,7 +66,7 @@ body:
Provide a list of relevant documentation. Is there a proof of concept?
Does this require and RFCs, ADRs, etc.?
If the documentation exists, link it; if it does not exist yet, reference it descriptively.
Example:
- [ ] RFC for updating connection interface to accept new parameters
- [ ] POC: https://github.com/dbt-labs/dbt-adapters/pull/42
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/internal-feature-implementation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ body:
label: Acceptance criteria
description: |
What is the definition of done for this feature? Include any relevant edge cases and/or test cases.
Example:
- [ ] If there are no config changes, don't alter the materialized view
- [ ] If the materialized view is scheduled to refresh, a manual refresh should not be issued
Expand All @@ -58,7 +58,7 @@ body:
description: |
Provide scenarios to test. Include both positive and negative tests if possible.
Link to existing similar tests if appropriate.
Example:
- [ ] Test with no `materialized` field in the model config. Expect pass.
- [ ] Test with a `materialized` field in the model config that is not valid. Expect ConfigError.
Expand All @@ -68,7 +68,7 @@ body:
```
validations:
required: true

- type: textarea
attributes:
label: Security
Expand Down
8 changes: 8 additions & 0 deletions .github/actions/setup-hatch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,13 @@ runs:
python-version: ${{ inputs.python-version }}

- name: Install dev dependencies
shell: bash
run: ${{ inputs.setup-command }}

- name: Add brew to the PATH
shell: bash
run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH

- name: Install pre-commit
shell: bash
run: brew install pre-commit
11 changes: 10 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
version: 2
updates:
# python dependencies
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
rebase-strategy: "disabled"
- package-ecosystem: "pip"
directory: "/dbt-tests-adapter"
schedule:
interval: "daily"
rebase-strategy: "disabled"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
rebase-strategy: "disabled"
14 changes: 4 additions & 10 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,13 @@ on:

permissions: read-all

defaults:
run:
shell: bash

# will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ contains(github.event_name, 'pull_request') && github.event.pull_request.head.ref || github.sha }}
cancel-in-progress: true

jobs:
lint:
code-quality:
name: Code Quality
runs-on: ubuntu-latest

Expand All @@ -33,8 +29,6 @@ jobs:
- name: Setup `hatch`
uses: ./.github/actions/setup-hatch

- name: Run linters
run: hatch run lint:all

- name: Run typechecks
run: hatch run typecheck:all
- name: Run code quality
shell: bash
run: hatch run code-quality
4 changes: 2 additions & 2 deletions .github/workflows/github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
uses: actions/download-artifact@v3
with:
name: ${{ inputs.archive_name }}
path: .
path: dist/

- name: "[DEBUG] Display Structure Of Expected Files"
run: |
Expand Down Expand Up @@ -256,4 +256,4 @@ jobs:
RELEASE_NOTES: ${{ inputs.changelog_path }}
COMMIT: ${{ inputs.sha }}
PRERELEASE: ${{ steps.release_type.outputs.prerelease }}
DRAFT: ${{ steps.draft.outputs.draft }}
DRAFT: ${{ steps.draft.outputs.draft }}
2 changes: 1 addition & 1 deletion .github/workflows/release_prep_hatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -539,4 +539,4 @@ jobs:
- name: "Remove Temp Branch - ${{ needs.create-temp-branch.outputs.branch_name }}"
if: ${{ inputs.deploy_to == 'prod' && inputs.nightly_release == 'false' && needs.create-temp-branch.outputs.branch_name != '' }}
run: |
git push origin -d ${{ needs.create-temp-branch.outputs.branch_name }}
git push origin -d ${{ needs.create-temp-branch.outputs.branch_name }}
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,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"]

steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ dmypy.json
cython_debug/

# PyCharm
.idea/
.idea/
Loading

0 comments on commit 652e0b7

Please sign in to comment.