Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CT-2464] [Bug] DbtReferenceError again at runtime #7437

Closed
jtcohen6 opened this issue Apr 22, 2023 · 0 comments · Fixed by #7438
Closed

[CT-2464] [Bug] DbtReferenceError again at runtime #7437

jtcohen6 opened this issue Apr 22, 2023 · 0 comments · Fixed by #7438
Assignees
Labels
bug Something isn't working model_groups_access Issues related to groups
Milestone

Comments

@jtcohen6
Copy link
Contributor

We raise a DbtReferenceError at parse time if a private model (access: private) is referenced from outside its group:

class DbtReferenceError(ParsingError):
def __init__(self, unique_id: str, ref_unique_id: str, group: str):
self.unique_id = unique_id
self.ref_unique_id = ref_unique_id
self.group = group
super().__init__(msg=self.get_message())
def get_message(self) -> str:
return (
f"Node {self.unique_id} attempted to reference node {self.ref_unique_id}, "
f"which is not allowed because the referenced node is private to the {self.group} group."
)

Out of an abundance of caution, and to avoid weird edge cases, we should raise it again (or a similar exception) while resolving refs at runtime. Probably within the RuntimeRefResolver.

@jtcohen6 jtcohen6 added bug Something isn't working model_groups_access Issues related to groups labels Apr 22, 2023
@github-actions github-actions bot changed the title [Bug] DbtReferenceError again at runtime [CT-2464] [Bug] DbtReferenceError again at runtime Apr 22, 2023
@jtcohen6 jtcohen6 added this to the v1.5.x milestone Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working model_groups_access Issues related to groups
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants