Open taylorterwin opened 3 days ago
I'm missing it in the description; is it necessary for there to be bidirectional dependencies to see the bug, or is it just transitive dependencies? The project graph you describe sounds like this to me;
flowchart LR
A --> B --> C
Where a model has versioning added in A, and the error appears in the build of C (until B has been rebuilt).
@schicks for the purpose of reproduction this was just A>B>C, however in the customer case where this was first reported it's several projects that all depend on each other. So it occurs in both.
@taylorterwin Thanks for opening!
@schicks Good callout. I don't think this is exclusive to bidirectional dependencies, but that setup does make it trickier to debug and "self-heal." In the A → B → C setup, project C stops seeing this error once project B has a successful run, (after A introduces versioning in the model).
Is this a new bug in dbt-core?
Current Behavior
When adding a versioned model to Project A, whereas Project B references that model via cross-project ref, and Project C includes both Project A & Project B dependencies.yml we can confirm that Project C will error once Project A has deployed the version model change to production, but Project B has not yet reran the cross-project ref within Project B's production environment. This causes production runs to fail downstream, without having those dependencies included in the jobs, due to the publication artifact not being updated with the latest node.
We try to inject dependencies among public models in upstream projects, so that downstream projects can see if one of their upstream parents depends on another of their upstream parents so a project that depends on two other projects (e.g. Project A + Project B) could see this error, even if it doesn't depend on either of those models directly - and this error might happen if a public model that was an upstream dependency of another public model, has its access changed (no longer public) or is disabled/deleted/missing.
Expected Behavior
Options:
Steps To Reproduce
select * from {{ ref(project_a, model_x) }}
note: Running project_b production build job will update the manifest and grab the latest version/updated node, whereas then project_c production build will successfully complete without error.
Relevant log output
Environment
Which database adapter are you using with dbt?
No response
Additional Context
No response