Skip to content

Commit

Permalink
[Misc] Sync fork with upstream (#15)
Browse files Browse the repository at this point in the history
* Comment appropriate lines in `test.env.example` (dbt-labs#367)

* Bump upper bound on `cryptography` to `<39.0.0` (dbt-labs#360)

Co-authored-by: colin-rogers-dbt <111200756+colin-rogers-dbt@users.noreply.github.com>

* Consistent capitalization for `CONTRIBUTING.md` (dbt-labs#369)

* [CT-1707] snowflake local testing fix (dbt-labs#372)

* testing temp fix for local testing by lowering pin for snowlfake-python-connector

* updating to main

* rolling back snowflake-connector-python to 2.8.1 while we look into file lock issue

* add changelog entry

* add setup.py to integration test filter

* Revert "add setup.py to integration test filter"

This reverts commit 0bd88c0.

Co-authored-by: Colin <colin.rogers@dbtlabs.com>

* Ct 443/strip sensitive data from logs (dbt-labs#378)

* Strip potentially sensitive data from error response if present

When a merge statement fails on Snowflake with a duplicate row,
Snowflake will return the data from the row that failed in the format:

Duplicate row detected during DML action
Row Values: [12345, "col_a_value", "col_b_value", "col_c_value", "etc"...]

This can potentially result in sensitive data from the warehouse being written to stdout (often captured by orchestrators) and dbt.log

Resolves dbt-labs#123 / CT-443

* Add changelog generated by changie

* Generalize solution to all possible row value leaks. Add test.

* Get rid of now useless if gaurd.

* Compile regex.

Co-authored-by: Dean Verhey <deanverhey@gmail.com>
Co-authored-by: Anders <anders.swanson@dbtlabs.com>
Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>

* Add 1.3.latest to the scheduled test runs. (dbt-labs#381)

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>

* Have snowflake build incremental model optimized _tmp tables with temporary views. (dbt-labs#379)

* Add temporary key to temporary view creation macro.

* add changelog

* Rearrange things to work in a more general case

* Add prefix to avoid name collisions and open door to future compatibility.

* Cleanup methods using Jinja's extended parameter rules

* Go back to a wrapped solution

* Change boolean value name to reflect its type

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>

* fix release.yml pypi steps (dbt-labs#385)

* rename exceptions (dbt-labs#384)

* rename exceptions

* changelog

* point back to main

* Update Under the Hood-20230110-084413.yaml

* Bumping version to 1.5.0a1 and generate changelog (dbt-labs#391)

* Bumping version to 1.5.0a1 and generate CHANGELOG

* update changelog for 1.5.0a1

Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>

* Only run at 7:00 am est (before folks get into the office) (dbt-labs#390)

* Only run at 7:00 am est (before folks get into the office)

* Split jobs and adjust timestamps.

* Trim comments.

* Update .github/workflows/release-branch-tests.yml

Add 1.4.latest to testing now that it exists.

Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>
Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>

* Mp/reduce ci daily run intervals (dbt-labs#392)

* Only run at 7:00 am est (before folks get into the office)

* Split jobs and adjust timestamps.

* Trim comments.

* Need both workflows on each job.

Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>

* Update build-test-package.yml

* Revert "Update build-test-package.yml"

This reverts commit a637482.

* Create test_commit_to_protected_branches.yml

* Update test_commit_to_protected_branches.yml

* Update test_commit_to_protected_branches.yml

* Revert "Update test_commit_to_protected_branches.yml"

This reverts commit 6d7c129.

* Revert "Update test_commit_to_protected_branches.yml"

This reverts commit cb7abab.

* Revert "Create test_commit_to_protected_branches.yml"

This reverts commit b0969d0.

* Revert "Revert "Update build-test-package.yml""

This reverts commit 7f571c8.

* Revert "Update build-test-package.yml"

This reverts commit a637482.

Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
Co-authored-by: colin-rogers-dbt <111200756+colin-rogers-dbt@users.noreply.github.com>
Co-authored-by: Matthew McKnight <91097623+McKnight-42@users.noreply.github.com>
Co-authored-by: Colin <colin.rogers@dbtlabs.com>
Co-authored-by: Mila Page <67295367+VersusFacit@users.noreply.github.com>
Co-authored-by: Dean Verhey <deanverhey@gmail.com>
Co-authored-by: Anders <anders.swanson@dbtlabs.com>
Co-authored-by: Mila Page <versusfacit@users.noreply.github.com>
Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Github Build Bot <buildbot@fishtownanalytics.com>
  • Loading branch information
12 people authored Jan 17, 2023
1 parent f354a2f commit fd5ad0a
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.4.0b1
current_version = 1.5.0a1
parse = (?P<major>\d+)
\.(?P<minor>\d+)
\.(?P<patch>\d+)
Expand Down
1 change: 1 addition & 0 deletions .changes/0.0.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## Previous Releases
For information on prior major and minor releases, see their changelogs:
- [1.4](https://github.com/dbt-labs/dbt-snowflake/blob/1.4.latest/CHANGELOG.md)
- [1.3](https://github.com/dbt-labs/dbt-snowflake/blob/1.3.latest/CHANGELOG.md)
- [1.2](https://github.com/dbt-labs/dbt-snowflake/blob/1.2.latest/CHANGELOG.md)
- [1.1](https://github.com/dbt-labs/dbt-snowflake/blob/1.1.latest/CHANGELOG.md)
Expand Down
17 changes: 0 additions & 17 deletions .changes/1.4.0-b1.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Dependency-20220928-100113.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Feature-20220923-112314.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .changes/1.4.0/Features-20221011-144200.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Features-20221130-114307.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Fixes-20221209-114620.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/1.4.0/Fixes-20221209-125606.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .changes/1.4.0/Under the Hood-20221202-010112.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions .changes/unreleased/Features-20221128-134212.yaml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/main-branch-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# **what?**
# The purpose of this workflow is to trigger CI to run for main on a regular
# cadence. If the CI workflow fails for a branch, it will post to
# dev-core-alerts to raise awareness. The 'aurelien-baudet/workflow-dispatch'

# **why?**
# Ensures main is always shippable and not broken. Also, can catch any
# dependencies shifting beneath us that might introduce breaking changes
# (could also impact Cloud).

# **when?**
# Mainly on a schedule of 9:00, 13:00, 18:00 UTC everyday.
# Manual trigger can also test on demand

name: Main branch scheduled testing

on:
schedule:
- cron: '0 9,13,18 * * *' # 9:00, 13:00, 18:00 UTC

workflow_dispatch: # for manual triggering

# no special access is needed
permissions: read-all

jobs:
kick-off-ci:
name: Kick-off CI
runs-on: ubuntu-latest

strategy:
# must run CI 1 branch at a time b/c the workflow-dispatch Action polls for
# latest run for results and it gets confused when we kick off multiple runs
# at once. There is a race condition so we will just run in sequential order.
max-parallel: 1
fail-fast: false
matrix:
branch: [main]
workflow_name: [main.yml, integration.yml]

steps:
- name: Call CI workflow for ${{ matrix.branch }} branch
id: trigger-step
uses: aurelien-baudet/workflow-dispatch@v2.1.1
with:
workflow: ${{ matrix.workflow_name }}
ref: ${{ matrix.branch }}
token: ${{ secrets.FISHTOWN_BOT_PAT }}

- name: Post failure to Slack
uses: ravsamhq/notify-slack-action@v1
if: ${{ always() && !contains(steps.trigger-step.outputs.workflow-conclusion,'success') }}
with:
status: ${{ job.status }}
notification_title: 'dbt-snowflake scheduled run of ${{ matrix.workflow_name }} on "${{ matrix.branch }}" branch not successful'
message_format: ':x: ${{ matrix.workflow_name }} CI on branch "${{ matrix.branch }}" ${{ steps.trigger-step.outputs.workflow-conclusion }}'
footer: 'Linked failed CI run ${{ steps.trigger-step.outputs.workflow-url }}'
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_CORE_ALERTS }}
17 changes: 8 additions & 9 deletions .github/workflows/release-branch-tests.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
# **what?**
# The purpose of this workflow is to trigger CI to run for each
# release branch and main branch on a regular cadence. If the CI workflow
# fails for a branch, it will post to dev-core-alerts to raise awareness.
# The 'aurelien-baudet/workflow-dispatch' Action triggers the existing
# The purpose of this workflow is to trigger CI to run for each release
# branch on a regular cadence. If the CI workflow fails for a branch, it
# will post to dev-core-alerts to raise awareness. The
# 'aurelien-baudet/workflow-dispatch' Action triggers the existing
# CI worklow file on the given branch to run so that even if we change the
# CI workflow file in the future, the one that is tailored for the given
# release branch will be used.

# **why?**
# Ensures release branches and main are always shippable and not broken.
# Ensures release branches are always shippable and not broken.
# Also, can catch any dependencies shifting beneath us that might
# introduce breaking changes (could also impact Cloud).

# **when?**
# Mainly on a schedule of 9:00, 13:00, 18:00 UTC everyday.
# Manual trigger can also test on demand
# Once each morning. Manual trigger can also test on demand

name: Release branch scheduled testing

on:
schedule:
- cron: '0 9,13,18 * * *' # 9:00, 13:00, 18:00 UTC
- cron: '0 12 * * *' # 12:00 UTC

workflow_dispatch: # for manual triggering

Expand All @@ -39,7 +38,7 @@ jobs:
max-parallel: 1
fail-fast: false
matrix:
branch: [1.0.latest, 1.1.latest, 1.2.latest, 1.3.latest, main]
branch: [1.0.latest, 1.1.latest, 1.2.latest, 1.3.latest, 1.4.latest]
workflow_name: [main.yml, integration.yml]

steps:
Expand Down
18 changes: 1 addition & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,9 @@
- Changes are listed under the (pre)release in which they first appear. Subsequent releases include changes from previous releases.
- "Breaking changes" listed under a version may require action from end users or external maintainers when upgrading to that version.
- Do not edit this file directly. This file is auto-generated using [changie](https://github.com/miniscruff/changie). For details on how to document a change, see [the contributing guide](https://github.com/dbt-labs/dbt-snowflake/blob/main/CONTRIBUTING.md#adding-changelog-entry)
## dbt-snowflake 1.4.0-b1 - December 15, 2022
### Features
- change when query_tag is set to cut down number of connections needed to increase performance at long distances to conversation with databases ([#199](https://github.com/dbt-labs/dbt-snowflake/issues/199), [#294](https://github.com/dbt-labs/dbt-snowflake/pull/294))
- change to anonymous sprocs as the default ([#305](https://github.com/dbt-labs/dbt-snowflake/issues/305), [#334](https://github.com/dbt-labs/dbt-snowflake/pull/334))
### Fixes
- Update the Makefile command for `dev` ([#340](https://github.com/dbt-labs/dbt-snowflake/issues/340), [#349](https://github.com/dbt-labs/dbt-snowflake/pull/349))
- change quote policy dataclass field to conform to 3.11 typing ([#351](https://github.com/dbt-labs/dbt-snowflake/issues/351), [#350](https://github.com/dbt-labs/dbt-snowflake/pull/350))
### Under the Hood
- changing python_model test configs to take into account swap for anonymous_sproc as new default ([#305](https://github.com/dbt-labs/dbt-snowflake/issues/305), [#337](https://github.com/dbt-labs/dbt-snowflake/pull/337))
### Feature
- Migrate dbt-utils current_timestamp macros into core + adapters ([#276](https://github.com/dbt-labs/dbt-snowflake/issues/276), [#273](https://github.com/dbt-labs/dbt-snowflake/pull/273))
### Dependency
- Bump SCP upper bound to <2.9 ([#216](https://github.com/dbt-labs/dbt-snowflake/issues/216), [#280](https://github.com/dbt-labs/dbt-snowflake/pull/280))

### Contributors
- [@b-per](https://github.com/b-per) ([#349](https://github.com/dbt-labs/dbt-snowflake/pull/349))
- [@joshuataylor](https://github.com/joshuataylor) ([#294](https://github.com/dbt-labs/dbt-snowflake/pull/294))
## Previous Releases
For information on prior major and minor releases, see their changelogs:
- [1.4](https://github.com/dbt-labs/dbt-snowflake/blob/1.4.latest/CHANGELOG.md)
- [1.3](https://github.com/dbt-labs/dbt-snowflake/blob/1.3.latest/CHANGELOG.md)
- [1.2](https://github.com/dbt-labs/dbt-snowflake/blob/1.2.latest/CHANGELOG.md)
- [1.1](https://github.com/dbt-labs/dbt-snowflake/blob/1.1.latest/CHANGELOG.md)
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/snowflake/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.4.0b1"
version = "1.5.0a1"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _get_dbt_core_version():


package_name = "dbt-snowflake"
package_version = "1.4.0b1"
package_version = "1.5.0a1"
dbt_core_version = _get_dbt_core_version()
description = """The Snowflake adapter plugin for dbt"""

Expand Down

0 comments on commit fd5ad0a

Please sign in to comment.