-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Feat(result logs): Use three logging levels #2723
Conversation
Thanks for this contribution, @tpilewicz! I'm going to hold off on merging this into the This is a good change; what's less clear to me is whether it'd be a breaking change for users who deploy dbt via orchestration tools, such as Airflow, that have native behavior corresponding to log levels. Should we wait to merge this until the next minor version (0.19), or would it be okay to include in a patch release? @beckjake I'd be curious to hear your thoughts here. |
Well, first of all, does this actually have any significant change in log level, in the sense of "an error was logged"? I assume that's what airflow looks at. This adds an error log if there is an I think saying that log levels can only be changed in minor/major revs is a really inconvenient precedent to set. Where does it end? Can we rev dependencies? Change print output? Change error handling? |
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 looks good to me! When we figure out the merge situation and get this pointed at appropriate branch, I will ask you to add yourself+this PR to a new Contributors
section for that release.
Cool, let's pull this into v0.18.1. |
Great, thanks for your review guys 😄 |
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.
Looks + works great! Thanks for the contribution @tpilewicz
CHANGELOG.md
Outdated
@@ -30,6 +30,7 @@ | |||
- Macros in the current project can override internal dbt macros that are called through `execute_macros`. ([#2301](https://github.com/fishtown-analytics/dbt/issues/2301), [#2686](https://github.com/fishtown-analytics/dbt/pull/2686)) | |||
- Add state:modified and state:new selectors ([#2641](https://github.com/fishtown-analytics/dbt/issues/2641), [#2695](https://github.com/fishtown-analytics/dbt/pull/2695)) | |||
- Add two new flags `--use-colors` and `--no-use-colors` to `dbt run` command to enable or disable log colorization from the command line ([#2708](https://github.com/fishtown-analytics/dbt/pull/2708)) | |||
- Specify all three logging levels (`INFO`, `WARNING`, `ERROR`) in result logs for commands `test`, `seed`, `run`, `snapshot` and `source snapshot-freshness` |
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.
- Specify all three logging levels (`INFO`, `WARNING`, `ERROR`) in result logs for commands `test`, `seed`, `run`, `snapshot` and `source snapshot-freshness` | |
- Specify all three logging levels (`INFO`, `WARNING`, `ERROR`) in result logs for commands `test`, `seed`, `run`, `snapshot` and `source snapshot-freshness` ([#2680](https://github.com/fishtown-analytics/dbt/pull/2680), [#2723](https://github.com/fishtown-analytics/dbt/pull/2723)) |
Could you:
- merge changelog conflicts
- move this entry to v0.18.1
- create a Contributors section
- add yourself!
resolves #2680
Description
I've added an argument
logger_fn
to the functionprint_fancy_output_line
of moduleprinter.py
, that determines the logging level used to print logs. Then I've used it accordingly where the function is called. Also, I've modified the functionget_printable_result
from this module to determine alogger_fn
from model / seed / snapshot results.I have not added tests because this module was not tested, and I don't really know how to test logging functions yet. Tell me if you think it is better to add some.
Checklist
CHANGELOG.md
and added information about my change to the "dbt next" section.