[Bug] Projects with restrict-access: true
cannot leverage generic tests on private models
#10134
Labels
bug
Something isn't working
Medium Severity
bug with minor impact that does not have resolution timeframe requirement
model_groups_access
Issues related to groups
multi_project
Is this a new bug in dbt-core?
Current Behavior
Suppose you have a dbt project with
restrict-access: true
, preventing other projects from importing this project and leveraging protected models. Now suppose you have a model with agroup
defined andaccess
set toprivate
, and a column with a generic test -- let's say anot_null
test for the sake of example. With this combination of settings in place, compilation will raise aDbtReferenceError
on the test since the test itself is not part of thegroup
.__models.yml
dbt_project.yml
Output
The specific defect can be resolved in
manifest.py
in theManifest.is_invalid_private_ref
method. This method should be updated to valuate tofalse
then the callingnode
'sresource_type
isNodeType.Test
.Expected Behavior
I would expect a dbt test Node to not be beholden to
private
ref checks when derived from a generic test.Steps To Reproduce
See description
Relevant log output
Environment
Which database adapter are you using with dbt?
snowflake, other (mention it in "Additional Context")
Additional Context
Specific cause of the defect is here:
dbt-core/core/dbt/contracts/graph/manifest.py
Line 1434 in 8fe7d65
This issue is related to #8248
The text was updated successfully, but these errors were encountered: