FreshnessStatus.Error causes exit status of 1 but no error level logging.
See original GitHub issueDescribe the bug
When I run dbt --log-format=json source snapshot-freshness
and there is a SourceFreshnessResult
with status = FreshnessStatus.Error: 'error'
, the log level of the output is INFO
but message has a red ERROR
and the cli returns with status code 1.
Steps To Reproduce
As far as I can tell this will happen with any stale snapshot when you run dbt --log-format=json source snapshot-freshness
.
Expected behavior
I expect the log level of the output to be error.
Screenshots and log output
{
"timestamp": "2020-08-03T19:16:19.227088Z",
"message": "15:16:19 | 1 of 1 ERROR STALE freshness of foo.bar.............. [\u001b[31mERROR STALE\u001b[0m in 2.43s]",
"channel": "dbt", "level": 11,
"levelname": "INFO", <------------ ???
"thread_name": "Thread-1",
"process": 65779,
"extra": {"unique_id": "source.db.sch.tab", "run_state": "running"}
}
System information
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version
:
installed version: 0.16.1
latest version: 0.17.2
The operating system you’re using: MacOS Catalina
The output of python --version
: 3.8.1
Additional context
We parse the json output of a dbt run and report any ERROR level log statements to a monitoring tool, so this causes us to have a gap in our reporting.
Please let me know if I’ve mistaken a feature for a bug. Happy to contribute a fix if it is something that needs fixing.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
I’m not! Go for it 😃
resolved by #2723