Open jeremyyeo opened 3 months ago
Thanks for finding this and writing it up @swhite-dbt and @jeremyyeo
I think this is a special case of #10323. For that ticket we'd probably have to re-parse every node with a warning since it would be difficult to handle different cases for different warnings, so if the schema entry with the warning was re-parsed, it would connect to the just-added node.
Is this a new bug in dbt-core?
Current Behavior
If you wrote a test first, parse the project, then wrote the model, dbt will not actually run the test due to partial parsing.
Expected Behavior
Even with partial parsing, dbt should know to run the test even if written prior to the model file.
Steps To Reproduce
target/
:^ Notice no "test" was identified.
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
postgres
Additional Context
In dbt Cloud, every save action does a parse. So if a user was practicing TDD - I guess write the test first :P then they could run into this scenario.
https://dbt-labs.slack.com/archives/C02SRNY2EQ4/p1721245567642059