Conversation
| @dataclass | ||
| class ProfileLoadError(ShowException, DebugLevel, CliEventABC): | ||
| exc: Exception = Exception('') | ||
|
|
||
| def cli_msg(self) -> str: | ||
| return f"Profile not loaded due to error: {self.exc}" |
There was a problem hiding this comment.
@nathaniel-may I'm not sure this was the intention or is I'm missing something. Because ShowException has defaults it throws a Fields without default values cannot appear after fields with default values error unless a default is provided for any fields in the type. Is this how we want to handle it? Or is there something I'm missing?
There was a problem hiding this comment.
I tried to recreate locally, and the code you have here passes mypy checks and runs fine for me when I create an instance of this class. How did you get that exception to throw?
There was a problem hiding this comment.
@iknox-fa figured it out. The lib we use for 3.6 compat with dataclasses is the issue. We probably will have to set all the values to their defaults again in the subclasses until we drop support for 3.6. Let's TODO setting these defaults to remove them after dropping 3.6.
|
@iknox-fa is going to fix our |
Fixed! |
* update config use structured logging * WIP * minor cleanup * fixed merge error * added in ShowException * added todo to remove defaults after dropping 3.6 * removed todo that is obsolete
* update config use structured logging * WIP * minor cleanup * fixed merge error * added in ShowException * added todo to remove defaults after dropping 3.6 * removed todo that is obsolete
* update config use structured logging * WIP * minor cleanup * fixed merge error * added in ShowException * added todo to remove defaults after dropping 3.6 * removed todo that is obsolete
* update config use structured logging * WIP * minor cleanup * fixed merge error * added in ShowException * added todo to remove defaults after dropping 3.6 * removed todo that is obsolete
* update config use structured logging * WIP * minor cleanup * fixed merge error * added in ShowException * added todo to remove defaults after dropping 3.6 * removed todo that is obsolete automatic commit by git-black, original commits: 6b36b18
Description
Modifying call sites for structured logging in core/dbt/config
Checklist
CHANGELOG.mdand added information about my change