Skip to content

Conversation

@mattogburke
Copy link
Contributor

Resolves #12223

Problem

The change in #12055 (backported to v1.10.14 in #12060) is missing a guard on the type of a test when attempting to partial parse.

GenericTests have attached_node attributes, but SingularTests do not.

Solution

Similar to other cases in the codebase (

if isinstance(node, GenericTestNode) and node.attached_node:
) guard the attached_node call with a check that we are dealing with GenericTests only.

I've included a test case which fails under the old code, and shows the issue is resolved by the change.

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.

@mattogburke mattogburke requested a review from a team as a code owner November 28, 2025 10:25
@cla-bot cla-bot bot added the cla:yes label Nov 28, 2025
@github-actions github-actions bot added the community This PR is from a community member label Nov 28, 2025
@MichelleArk MichelleArk self-assigned this Dec 1, 2025
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.93%. Comparing base (bbd0780) to head (7e04309).
⚠️ Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12224      +/-   ##
==========================================
- Coverage   92.00%   91.93%   -0.08%     
==========================================
  Files         203      203              
  Lines       24946    24965      +19     
==========================================
  Hits        22952    22952              
- Misses       1994     2013      +19     
Flag Coverage Δ
integration 88.82% <100.00%> (-0.14%) ⬇️
unit 65.18% <50.00%> (+0.12%) ⬆️

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

Components Coverage Δ
Unit Tests 65.18% <50.00%> (+0.12%) ⬆️
Integration Tests 88.82% <100.00%> (-0.14%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MichelleArk
Copy link
Contributor

Thank you for this contribution!

@MichelleArk MichelleArk merged commit d74b58a into dbt-labs:main Dec 2, 2025
51 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.11.latest cla:yes community This PR is from a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] partial parsing error when updating a model (with a schema file) which is used in a singular test (new in v1.10.14)

2 participants