Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/agate-approx-eq-1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
emmyoop authored Feb 23, 2024
2 parents 44abe50 + c61d318 commit 5af59aa
Show file tree
Hide file tree
Showing 111 changed files with 3,236 additions and 596 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240131-152923.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Cache static objects between tests to accelerate integration runs.
time: 2024-01-31T15:29:23.951857-05:00
custom:
Author: peterallenwebb
Issue: "55"
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240201-101851.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Add dataclass utility `Mergeable`
time: 2024-02-01T10:18:51.474231-08:00
custom:
Author: QMalcolm
Issue: "58"
6 changes: 6 additions & 0 deletions .changes/unreleased/Features-20240201-104437.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Added a new InvocationContext class for application context management.
time: 2024-02-01T10:44:37.161298-05:00
custom:
Author: peterallenwebb
Issue: "57"
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240206-160231.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Make invocation contexts more reliable in testing scenarios.
time: 2024-02-06T16:02:31.81842-05:00
custom:
Author: peterallenwebb
Issue: "52"
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240221-200204.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix the unset_contextvars function in events/contextvars.py
time: 2024-02-21T20:02:04.341681-05:00
custom:
Author: gshank
Issue: "82"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240122-163546.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Clean up macro contexts.
time: 2024-01-22T16:35:46.907999-05:00
custom:
Author: peterallenwebb
Issue: "35"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240123-161107.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Inject TagIterator into BlockIterator for greater flexibility.
time: 2024-01-23T16:11:07.24321-05:00
custom:
Author: peterallenwebb
Issue: "38"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240123-194242.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Change metadata_vars \`if not\` to \`if ... is None\`
time: 2024-01-23T19:42:42.95727089Z
custom:
Author: truls-p
Issue: "6073"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240206-081323.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Remove `fire_event_if_test` method
time: 2024-02-06T08:13:23.722615-06:00
custom:
Author: emmyoop
Issue: "66"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240208-100709.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Add Invocation Context Support to MultiThreadedExecutor
time: 2024-02-08T10:07:09.584747-05:00
custom:
Author: peterallenwebb
Issue: "75"
6 changes: 6 additions & 0 deletions .changes/unreleased/Under the Hood-20240221-104344.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Under the Hood
body: Restrict protobuf library to major version 4.
time: 2024-02-21T10:43:44.642458-05:00
custom:
Author: peterallenwebb
Issue: "9566"
14 changes: 0 additions & 14 deletions .flake8

This file was deleted.

14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file contains the code owners for the dbt-common repo.
# PRs will be require review from the associated
# team(s) or person(s) that touches any files that are mapped to them.
#
# A statement takes precedence over the statements above it so more general
# assignments are found at the top with specific assignments being lower in
# the ordering (i.e. catch all assignment should be the first item)
#
# Consult GitHub documentation for formatting guidelines:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file

# As a default for areas with no assignment,
# the core team as a whole will be assigned
* @dbt-labs/core-team
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/implementation-ticket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ body:
What is the definition of done for this ticket? Include any relevant edge cases and/or test cases
validations:
required: true
- type: textarea
attributes:
label: Suggested Tests
description: |
Provide scenarios to test. Link to existing similar tests if appropriate.
placeholder: |
1. Test with no version specified in the schema file and use selection logic on a versioned model for a specific version. Expect pass.
2. Test with a version specified in the schema file that is no valid. Expect ParsingError.
validations:
required: true
- type: textarea
attributes:
label: Impact to Other Teams
Expand Down
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/slash-command-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Short description

<!-- Describe the scope of the ticket, a high-level implementation approach and any tradeoffs to consider -->

## Acceptance criteria

<!-- What is the definition of done for this ticket? Include any relevant edge cases and/or test cases -->

## Suggested Tests

<!-- Provide scenarios to test. Link to existing similar tests if appropriate. -->

## Impact to Other Teams

<!-- Will this change impact other teams? Include details of the kinds of changes required (new tests, code changes, related tickets) and _add the relevant `Impact:[team]` label_. -->

## Will backports be required?

<!-- Will this change need to be backported to previous versions? Add details, possible blockers to backporting and _add the relevant backport labels `backport 1.x.latest`_ -->

## Context

<!-- Provide the "why", motivation, and alternative approaches considered -- linking to previous refinement issues, spikes, docs as appropriate -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/tasklist-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: TaskList Template
about: Template for issues created off tasklists
title: ''
labels: ''
assignees: ''

---

## Short description

<!-- Describe the scope of the ticket, a high-level implementation approach and any tradeoffs to consider -->

## Acceptance criteria

<!-- What is the definition of done for this ticket? Include any relevant edge cases and/or test cases -->

## Suggested Tests

<!-- Provide scenarios to test. Link to existing similar tests if appropriate. -->

## Impact to Other Teams

<!-- Will this change impact other teams? Include details of the kinds of changes required (new tests, code changes, related tickets) and _add the relevant `Impact:[team]` label_. -->

## Context

<!-- Provide the "why", motivation, and alternative approaches considered -- linking to previous refinement issues, spikes, docs as appropriate -->
20 changes: 20 additions & 0 deletions .github/actions/setup-python-hatch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Setup Python env
description: Install Python & Hatch
inputs:
python-version:
description: 'Version of Python to Install'
required: true
default: '3.9'
runs:
using: "composite"
steps:
- name: "Set up Python ${{ inputs.python-version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ inputs.python-version }}"

- name: Install Hatch
shell: bash
run: |
python -m pip install --user --upgrade pip
python -m pip install hatch
51 changes: 9 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ on:
branches:
- "main"
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch:
workflow_call:

permissions: read-all

Expand All @@ -38,52 +41,16 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- name: "Set up Python & Hatch - 3.11"
uses: ./.github/actions/setup-python-hatch
with:
python-version: '3.11'

- name: "Install build specific python dependencies"
run: |
python -m pip install --user --upgrade pip
python -m pip install --upgrade wheel twine check-wheel-contents
python -m pip --version
- name: "Install Hatch"
shell: bash
run: pip3 install hatch
python-version: "3.11"

- name: "Build Python Package"
run: |
hatch build
- name: "Show distributions"
run: ls -lh dist/

- name: "Check distribution descriptions"
run: |
twine check dist/*
- name: "Check wheel contents"
run: |
check-wheel-contents dist/*.whl --ignore W007,W008
- name: "Install wheel distributions"
run: |
find ./dist/dbt_common-*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
# TODO: how to validate here? we did dbt --version previously. this checks it's there, but not that it can do anything. maybe it's enough?
- name: "Check wheel distributions"
run: |
pip freeze | grep dbt-common
- name: "Install source distributions"
run: |
find ./dist/dbt_common-*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/
# TODO: how to validate here? we did dbt --version previously. this checks it's there, but not that it can do anything. maybe it's enough?
- name: "Check source distributions"
run: |
pip freeze | grep dbt-common
- name: "Check build"
run: hatch run build:check-all
40 changes: 40 additions & 0 deletions .github/workflows/changelog-existence.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# **what?**
# Checks that a file has been committed under the /.changes directory
# as a new CHANGELOG entry. Cannot check for a specific filename as
# it is dynamically generated by change type and timestamp.
# This workflow runs on pull_request_target because it requires
# secrets to post comments.

# **why?**
# Ensure code change gets reflected in the CHANGELOG.

# **when?**
# This will run for all PRs going into main. It will
# run when they are opened, reopened, when any label is added or removed
# and when new code is pushed to the branch. The action will get
# skipped if the 'Skip Changelog' label is present is any of the labels.

name: Check Changelog Entry

on:
pull_request_target:
types: [opened, reopened, labeled, unlabeled, synchronize]
paths-ignore: ['.changes/**', '.github/**', 'tests/**', 'third-party-stubs/**', '**.md', '**.yml']

workflow_dispatch:

defaults:
run:
shell: bash

permissions:
contents: read
pull-requests: write

jobs:
changelog:
uses: dbt-labs/actions/.github/workflows/changelog-existence.yml@main
with:
changelog_comment: 'Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-common/blob/main/CONTRIBUTING.md#adding-changelog-entry).'
skip_label: 'Skip Changelog'
secrets: inherit
16 changes: 9 additions & 7 deletions .github/workflows/ci_code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ on:
branches:
- "main"
pull_request:
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions: read-all
Expand All @@ -38,16 +40,16 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
- name: "Set up Python & Hatch - 3.11"
uses: ./.github/actions/setup-python-hatch
with:
python-version: '3.11'
python-version: "3.11"

- name: Install Hatch
- name: Install pre-commit
shell: bash
run: pip3 install hatch
run: pip3 install pre-commit

- name: Run Pre-commit Hooks
run: hatch run dev-env:pre-commit run --show-diff-on-failure --color=always --all-files
run: pre-commit run --show-diff-on-failure --color=always --all-files
Loading

0 comments on commit 5af59aa

Please sign in to comment.