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

Fix for dbt_project.yml "tests" config resulting in incorrect state:modified #11166

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

gshank
Copy link
Contributor

@gshank gshank commented Dec 18, 2024

Resolves #11146

Problem

If the data_tests config in dbt_project.yml is named "tests", the unrendered_config for data tests is incorrect, resulting in incorrect state:modified results.

Solution

Rename the "tests" dictionary to "data_tests", so unrendered config is correctly generated.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or 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 includes type annotations for new and modified functions.

@gshank gshank requested a review from a team as a code owner December 18, 2024 16:30
@cla-bot cla-bot bot added the cla:yes label Dec 18, 2024
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.84%. Comparing base (a175793) to head (4bea5f2).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11166      +/-   ##
==========================================
- Coverage   88.88%   88.84%   -0.05%     
==========================================
  Files         187      187              
  Lines       24001    24011      +10     
==========================================
- Hits        21334    21332       -2     
- Misses       2667     2679      +12     
Flag Coverage Δ
integration 86.15% <100.00%> (-0.05%) ⬇️
unit 62.03% <50.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.03% <50.00%> (+0.04%) ⬆️
Integration Tests 86.15% <100.00%> (-0.05%) ⬇️

Copy link
Member

@aranke aranke left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

def test_unrendered_config(self, project):
manifest = run_dbt(["parse"])
assert manifest
print(f"--- nodes: {manifest.nodes.keys()}")
Copy link
Member

Choose a reason for hiding this comment

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

Nit: remove print

@gshank gshank merged commit bf18b59 into main Dec 18, 2024
55 of 56 checks passed
@gshank gshank deleted the generic_test_unrendered_config branch December 18, 2024 22:21
github-actions bot pushed a commit that referenced this pull request Dec 18, 2024
gshank added a commit that referenced this pull request Dec 19, 2024
…odified (#11166) (#11169)

(cherry picked from commit bf18b59)

Co-authored-by: Gerda Shank <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants