Skip to content

[Bug] private model referenced by model in different group should be a PARSE error (currently only errors at runtime) #12271

@graciegoheen

Description

@graciegoheen

Is this a new bug in dbt-core?

  • I believe this is a new bug in dbt-core
  • I have searched the existing issues, and I could not find an existing issue for this bug

Description

I have a staging model that I have marked as a private model, assigned to a particular group. This model feeds into 2 downstream models, none of which have been assigned to the same group. When I saved the staging.yml file, I expect dbt parsing to immediately fail and flag the issue with me that some models are referencing a private model without being in the same group.

However, when I nest the access key under config, dbt continues to parse successfully. This is true for both the automatic parsing that happens after you save a change in the Studio IDE as well as when you run dbt parse manually.

The dbt build still fails as expected, but I believe the appropriate behaviour is for the parsing to fail as well.

When I move the access key to the same level as config, dbt immediately tells me that there is an error, as expected. Manual dbt parse command also fails as expected.

I think the experience is a little awkward as it is now. Our docs pointed that users need to nest the access key under config but then we don't immediately notify users.

We document that this is a parse error:
Image

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions