Skip to content
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

Remove simple snapshot tests. #158

Closed
wants to merge 2 commits into from

Conversation

VersusFacit
Copy link
Contributor

@VersusFacit VersusFacit commented May 9, 2022

Part 1 of fixing issue CT-600.

Description

After not finding a quick fix and in the interest of long-term optimization, I propose following through on Jerco's call to remove this test. After we remove these tests, we can reinvite them into this repo via the adapter zone.

In a "part 2 PR," I'll make sure the following tests are either accounted for in dbt core. Alternatively, they will be readded with the new framework in a so-called "part 3 PR" back into this repo:

  • tests/integration/simple_snapshot_test/check-snapshots-query-tag-expected/check_query_tag.sql
  • tests/integration/simple_snapshot_test/invalidate_snowflake.sql
  • tests/integration/simple_snapshot_test/test_simple_snapshot.py::TestInvalidNamespacedCustomSnapshotFiles

I traced through every file removed and looked for matches in existing dbt-core code.

Checklist

  • I have signed the CLA
  • 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
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-snowflake next" section.

@cla-bot cla-bot bot added the cla:yes label May 9, 2022
@VersusFacit VersusFacit requested a review from jtcohen6 May 9, 2022 06:14
Comment on lines +44 to +45
#class TestSnapshotCheckColsSnowflake(BaseSnapshotCheckCols):
# pass
Copy link
Contributor

@jtcohen6 jtcohen6 May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok, this is concerning!

I took a deeper dive in, and I see that the snapshots are always running with where TRUE as their row_changed_expr here. That's not right! For check-strategy snasphots, the column_added variable should only return true if a new column is added to the snapshot—which isn't ever true for these failing snapshots.

I took a quick look, and the last PR to touch this code was indeed merged 12 days ago: dbt-labs/dbt-core#4893

We've got a lead, gumshoe!

Copy link
Contributor

@jtcohen6 jtcohen6 May 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates:

Not a substitute for the longer-term work you propose above, which is absolutely still what we should do:

  • remove these tests (test/integration/simple_snapshot_test)
  • reinvite them into this repo via the adapter zone

@leahwicz
Copy link
Contributor

@VersusFacit is this the PR we can close out now as not needed?

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2022

This PR has been marked as Stale because it has been open for 180 days with no activity. If you would like the PR to remain open, please remove the stale label or comment on the PR, or it will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 7, 2022
@github-actions github-actions bot closed this Nov 15, 2022
@mikealfare mikealfare deleted the CT-600/fix_simple_snapshot_test branch February 17, 2023 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants