Skip to content

Conversation

@aranke
Copy link
Contributor

@aranke aranke commented Dec 25, 2025

Summary

When a test fails and you fix the model code, running dbt retry now also rebuilds the model(s) that the test depends on, not just re-runs the test.

Previously, retry would only re-run the failing test against the stale model, causing the test to fail again even after the model was fixed.

Changes:

  • Detect test nodes (generic, singular, and unit tests) in the retry set
  • Automatically include their parent nodes (models) so they get rebuilt before the test runs

Fixes #10164

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/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

🤖 Generated with Claude Code

When a test fails and you fix the model code, running `dbt retry` now
also rebuilds the model(s) that the test depends on, not just re-runs
the test.

Previously, retry would only re-run the failing test against the stale
model, causing the test to fail again even after the model was fixed.

This fix detects test nodes (generic, singular, and unit tests) in the
retry set and automatically includes their parent nodes (models) so they
get rebuilt before the test runs.

Fixes dbt-labs#10164

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@aranke aranke requested a review from a team as a code owner December 25, 2025 15:45
@cla-bot cla-bot bot added the cla:yes label Dec 25, 2025
@github-actions
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@github-actions github-actions bot added the community This PR is from a community member label Dec 25, 2025
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:yes community This PR is from a community member

Projects

None yet

1 participant