question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FreshnessStatus.Error causes exit status of 1 but no error level logging.

See original GitHub issue

Describe 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:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wrgoldsteincommented, Aug 10, 2020

I’m not! Go for it 😃

0reactions
jtcohen6commented, Sep 10, 2020

resolved by #2723

Read more comments on GitHub >

github_iconTop Results From Across the Web

FreshnessStatus.Error causes exit status of 1 but no error level ...
When I run dbt --log-format=json source snapshot-freshness and there is a SourceFreshnessResult with status = FreshnessStatus.Error: 'error' ...
Read more >
How to Fix 'Terminated With Exit Code 1' Error - Komodor
In Kubernetes, container exit codes can help you diagnose issues with pods. Learn how to investigate and resolve 'exit code 1' related issues....
Read more >
How to debug "exit status 1" error when running exec ...
The solution is to use the Stderr property of the Command object. This can be done like this: cmd := exec.Command("find", "/", "-maxdepth" ......
Read more >
Troubleshooting 'terminated with exit code 1' error - ContainIQ
In this article we'll look at some of the possible causes, show how to identify when a pod terminates with exit code 1,...
Read more >
Job is failed with Exit code 1
The exit code is zero in agent log because the script was ran successfully by the agent without any errors. The reason why...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found