-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: column comparison logic for check-strategy snapshots #5223
Merged
jtcohen6
merged 3 commits into
main
from
fix/column-comparison-snapshot_check_all_get_existing_columns
May 10, 2022
Merged
Fix: column comparison logic for check-strategy snapshots #5223
jtcohen6
merged 3 commits into
main
from
fix/column-comparison-snapshot_check_all_get_existing_columns
May 10, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 tasks
gshank
approved these changes
May 9, 2022
@jtcohen6 this is what is causing the failed scheduled test runs for us? |
@leahwicz I believe so. I'll kick off a Update: All checks passing in dbt-labs/dbt-snowflake#159 (CI) |
jtcohen6
deleted the
fix/column-comparison-snapshot_check_all_get_existing_columns
branch
May 10, 2022 09:05
Hi @jtcohen6, seems like this commit broke
|
2 tasks
@ueshin You're totally right. I'm digging in now. |
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #5222
resolves dbt-labs/dbt-snowflake#154
Description
The logic in
snapshot_check_all_get_existing_columns
added by #4893 doesn't account for cases where the user-configuredcheck_cols
doesn't match the database's column quoting/casing.This is almost always true on Snowflake, which is where we've been seeing test failures. The snapshot doesn't fail explicitly, but it always considers the column schema to have changed, so it adds new records every single time it runs.
I added a new test case, on top of the one added in #4893. It fails without the changes to the macro in this PR, and passes with them.
For a longer-term resolution, and to ensure this doesn't happen again, let's:
tests/functional/simple_snapshot
into the "adapter zone" and get it running on Snowflakedbt-core
changes against one/all adapter(s): [CT-449] Make it easy to run integration tests in an adapter plugin against a dbt-core PR #4988That's out of scope for the current PR, which is just trying to fix the nightly tests in
dbt-snowflake
, and preclude an unintended regression in v1.2.Checklist
changie new
to create a changelog entry