Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into paw/record
Browse files Browse the repository at this point in the history
  • Loading branch information
peterallenwebb committed Apr 25, 2024
2 parents 456c0f5 + 6d097ee commit a6f2b58
Show file tree
Hide file tree
Showing 214 changed files with 1,038 additions and 375 deletions.
24 changes: 0 additions & 24 deletions .changes/0.1.0-a8.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"
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: 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: 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"
22 changes: 20 additions & 2 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 @@ -59,6 +59,24 @@ body:
validations:
required: false

- type: textarea
attributes:
label: Documentation
description: |
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
value: |
```[tasklist]
- [ ] Task
```
validations:
required: false

- type: textarea
attributes:
label: Consequences
Expand Down
23 changes: 17 additions & 6 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 @@ -54,11 +54,11 @@ body:

- type: textarea
attributes:
label: Suggested tests
label: Testing
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,16 +68,27 @@ body:
```
validations:
required: true

- type: textarea
attributes:
label: Are there any security concerns with these changes?
label: Security
description: |
Are there any security concerns with these changes?
When in doubt, run it by the security team.
placeholder: |
Example: Logging sensitive data
validations:
required: true
required: true

- type: textarea
attributes:
label: Docs
description: |
Are there any docs the will need to be added or updated?
placeholder: |
Example: We need to document how to configure this new authentication method.
validations:
required: true

- type: textarea
attributes:
Expand Down
7 changes: 4 additions & 3 deletions .github/actions/build-hatch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ inputs:
working-dir:
description: Where to run commands from, supports namespace packaging
default: "./"
artifacts-dir:
archive-name:
description: Where to upload the artifacts
default: "dist"
required: true

runs:
using: composite
Expand All @@ -32,5 +32,6 @@ runs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifacts-dir}}
name: ${{ inputs.archive-name }}
path: ${{ inputs.working-dir }}dist/
retention-days: 3
10 changes: 7 additions & 3 deletions .github/actions/publish-pypi/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish - PyPI
description: Publish artifacts saved during build step to PyPI

inputs:
artifacts-dir-name:
archive-name:
description: Where to download the artifacts from
required: true
repository-url:
Expand All @@ -16,8 +16,12 @@ runs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifacts-dir }}
path: .
name: ${{ inputs.archive-name }}
path: dist/

- name: "[DEBUG]"
run : ls -R
shell: bash

- name: Publish artifacts to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
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"
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ resolves #
### Checklist

- [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-adapter/blob/main/CONTRIBUTING.md) and understand what's expected of me
- [ ] I have run this code in development and it appears to resolve the stated issue
- [ ] I have run this code in development, and it appears to resolve the stated issue
- [ ] This PR includes tests, or tests are not required/relevant for this PR
- [ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
- [ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX
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
Loading

0 comments on commit a6f2b58

Please sign in to comment.