Skip to content

Commit

Permalink
Merge branch 'main' into update-incremental-merge-for-nullable-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeatty10 committed May 14, 2024
2 parents be915b0 + d831caa commit 2460608
Show file tree
Hide file tree
Showing 210 changed files with 1,128 additions and 402 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`
29 changes: 29 additions & 0 deletions .changes/1.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## dbt-adapter 1.1.0 - May 01, 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
* Cross-database `cast` macro
* Allow adapters to opt out of aliasing the subquery generated by render_limited
* subquery alias generated by render_limited now includes the relation name to mitigate duplicate aliasing

### Fixes

* Fix adapter-specific cast handling for constraint enforcement

### Docs

* Use `dbt-adapters` throughout the contributing guide

### Under the Hood

* Add the option to set the log level of the AdapterRegistered event
* Update dependabot config to cover GHA
* Validate that dbt-core and dbt-adapters remain de-coupled
* remove dbt_version from query comment test fixture

### Dependencies

* add support for py3.12
5 changes: 5 additions & 0 deletions .changes/1.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## dbt-adapter 1.1.1 - May 07, 2024

### Features

* Enable serialization contexts
9 changes: 9 additions & 0 deletions .changes/1.8.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## dbt-adapter 1.8.0 - May 09, 2024

### Features

* Cross-database `date` macro

### Fixes

* Update Clone test to reflect core change removing `deferred` attribute from nodes
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This codeowners file is used to ensure all PRs require reviews from the adapters team

* @dbt-labs/adapters
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 2460608

Please sign in to comment.