-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
A few final logging touch-ups #4388
Conversation
e7c11a2
to
137ba88
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple more cleanup spots.
core/dbt/task/runnable.py
Outdated
warn_or_error("\nWARNING: Nothing to do. Try checking your model " | ||
with TextOnly(): | ||
fire_event(EmptyLine()) | ||
warn_or_error("WARNING: Nothing to do. Try checking your model " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Take out the "WARNING" text too since we want to remove that duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're no longer including the log level in the CLI output (since #4379), so it's not as duplicative as it used to be. But I can sub this out to use ui.warning_tag
, so at least the logic is consistent/centralized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize I changed warning_tag
to do nothing! Let me change it to do something again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@emmyoop let me know if you hate it!
core/dbt/events/types.py
Outdated
@@ -863,7 +829,7 @@ class InvalidVarsYAML(ErrorLevel, Cli, File): | |||
code: str = "A008" | |||
|
|||
def message(self) -> str: | |||
return "The YAML provided in the --vars argument is not valid.\n" | |||
return "The YAML provided in the --vars argument is not valid." | |||
|
|||
|
|||
# TODO: Remove? (appears to be uncalled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove these too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This highlighted wrong. I'm referring to HandleInternalException
, CatchRunException
, DetailsHandleGenericException
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep can do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also removing MessageHandleGenericException
, since it doesn't have a code and appears to be uncalled
yup. we really should do this. |
137ba88
to
a8ecaf5
Compare
@nathaniel-may I did a very simple, very janky version of this in I imagine the better approach would be to implement |
a8ecaf5
to
d9ae93b
Compare
d9ae93b
to
a9cbdc8
Compare
@@ -62,7 +62,7 @@ class PackageInstallPathDeprecation(DBTDeprecation): | |||
|
|||
class ConfigPathDeprecation(DBTDeprecation): | |||
_description = '''\ | |||
The `{deprecated_path}` config has been deprecated in favor of `{exp_path}`. | |||
The `{deprecated_path}` config has been renamed to `{exp_path}`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the wording updates.
* Rm unused events, per #4104 * More structured ConcurrencyLine * Replace \n prefixes with EmptyLine * Reimplement ui.warning_tag to centralize logic * Use warning_tag for deprecations too * Rm more unused event types * Exclude EmptyLine from json logs * loglines are not always created by events (#4406) Co-authored-by: Nathaniel May <nathaniel.may@fishtownanalytics.com>
* Rm unused events, per #4104 * More structured ConcurrencyLine * Replace \n prefixes with EmptyLine * Reimplement ui.warning_tag to centralize logic * Use warning_tag for deprecations too * Rm more unused event types * Exclude EmptyLine from json logs * loglines are not always created by events (#4406) Co-authored-by: Nathaniel May <nathaniel.may@fishtownanalytics.com>
* A few final logging touch-ups (#4388) * Rm unused events, per #4104 * More structured ConcurrencyLine * Replace \n prefixes with EmptyLine * Reimplement ui.warning_tag to centralize logic * Use warning_tag for deprecations too * Rm more unused event types * Exclude EmptyLine from json logs * loglines are not always created by events (#4406) Co-authored-by: Nathaniel May <nathaniel.may@fishtownanalytics.com> * Rollover + backup for dbt.log (#4405) Co-authored-by: Nathaniel May <nathaniel.may@fishtownanalytics.com>
* Rm unused events, per #4104 * More structured ConcurrencyLine * Replace \n prefixes with EmptyLine * Reimplement ui.warning_tag to centralize logic * Use warning_tag for deprecations too * Rm more unused event types * Exclude EmptyLine from json logs * loglines are not always created by events (#4406) Co-authored-by: Nathaniel May <nathaniel.may@fishtownanalytics.com> automatic commit by git-black, original commits: 8bdaa69 b90ab74
* Rm unused events, per #4104 * More structured ConcurrencyLine * Replace \n prefixes with EmptyLine * Reimplement ui.warning_tag to centralize logic * Use warning_tag for deprecations too * Rm more unused event types * Exclude EmptyLine from json logs * loglines are not always created by events (#4406) Co-authored-by: Nathaniel May <nathaniel.may@fishtownanalytics.com> automatic commit by git-black, original commits: b90ab74
Pick up from things I noticed in #4293. These are tiny non-functional / cosmetic changes only:
ConcurrencyLine
\n
, precede/follow them withEmptyLine()
events. Note: The legacy logger used to wrap these inwith TextOnly()
, in order to avoid writing them to JSON-formatted logs. I don't care too much about the legacy logger, but I bet we could do something very simple to achieve the same behavior with the new event logger, that is, avoid firingEmptyLine()
events when JSON formatting is enabled.Checklist
This PR includes tests, or tests are not required/relevant for this PRI have updated the— centralizing in Changelog entries for rc3 -> final #4389CHANGELOG.md
and added information about my change