-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Avoid access to profile when calling str(UnsetProfileConfig) (#5209
) * fix: Avoid access to profile when calling str(UnsetProfileConfig) dbt.config.UnsetProfileConfig inherits __str__ from dbt.config.Project. Moreover, UnsetProfileConfig also raises an exception when attempting to access unset profile attributes. As Project.__str__ ultimately calls to_project_config and accesses said profile attributes, we override to_project_config in UnsetProfileConfig to avoid accessing the attributes that raise an exception. This allows calling str(UnsetProfileConfig) and repr(UnsetProfileConfig). Basic unit testing is also included in commit. * fix: Skip repr for profile fields in UnsetProfileConfig * chore(changie): Add changie file
- Loading branch information
1 parent
7e43f36
commit fc1fc2d
Showing
3 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
kind: Under the Hood | ||
body: 'Fix: Call str and repr for UnsetProfileConfig without a RuntimeException' | ||
time: 2022-05-03T19:52:12.793729384+02:00 | ||
custom: | ||
Author: tomasfarias | ||
Issue: "5081" | ||
PR: "5209" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters