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 #10988: Validate manifest has group_map during group_lookup init #10995

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

aranke
Copy link
Member

@aranke aranke commented Nov 13, 2024

Resolves #10988

Problem

dbt build --no-write-json was failing if there was no group map.

Solution

Validate manifest.group_map exists and add a test for the same.

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.

@aranke aranke requested a review from a team as a code owner November 13, 2024 17:15
@cla-bot cla-bot bot added the cla:yes label Nov 13, 2024
Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 89.06%. Comparing base (6e1f64f) to head (9920ce4).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10995      +/-   ##
==========================================
- Coverage   89.12%   89.06%   -0.06%     
==========================================
  Files         183      183              
  Lines       23626    23630       +4     
==========================================
- Hits        21057    21047      -10     
- Misses       2569     2583      +14     
Flag Coverage Δ
integration 86.36% <75.00%> (-0.13%) ⬇️
unit 62.78% <0.00%> (-0.02%) ⬇️

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

Components Coverage Δ
Unit Tests 62.78% <0.00%> (-0.02%) ⬇️
Integration Tests 86.36% <75.00%> (-0.13%) ⬇️

Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

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

You're not actually checking that "group_map" exists, you're checking that "groups" exists. And "group_map" isn't actually an attribute of the Manifest, only the WritableManifest (it probably ought to be, along with parent_map and child_map, but let's do a followup for that). So you should check that "group_map" exists and if it doesn't, built it with "build_group_map".

@aranke
Copy link
Member Author

aranke commented Nov 14, 2024

You're not actually checking that "group_map" exists, you're checking that "groups" exists. And "group_map" isn't actually an attribute of the Manifest, only the WritableManifest (it probably ought to be, along with parent_map and child_map, but let's do a followup for that). So you should check that "group_map" exists and if it doesn't, built it with "build_group_map".

I'm not sure I follow here, will set up some time to chat about this sync today.

@aranke aranke requested a review from gshank November 14, 2024 15:37
@gshank gshank merged commit 2c43af8 into main Nov 14, 2024
57 of 60 checks passed
@gshank gshank deleted the fix_10988 branch November 14, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] --no-write-json causes 'Manifest' object has no attribute 'group_map' error in 1.9 beta
2 participants