-
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
[CT-2063] [Regression] Console Logging in dbt 1.4.1 is not interactive #6901
Comments
There were significant revisions to dbt's logging infrastructure in 1.4, including to the mechanism for writing to stdout. We previously used Python's logging.StreamHandler class, but now we're writing to stdout directly. Unlike the StreamHandler implementation, we do not call flush() after every log entry is written. So we have a strong lead on he root cause, however I have not been able to reproduce the behavior. @ajbosco Could you let us know what OS you are on, and the nature of the dbt_hook.py wrapper it looks like you are using? In the meantime, I will prepare a changeset which adds the flush() after every write. Not flushing between writes was definitely an oversight. |
@jtcohen6 Does that sound like the right approach to you? |
@peterallenwebb That sounds like a good approach to me! Thanks for digging into this, and coming up with a probable lead. |
This was closed because of the merge to main, but I am still working on the backport to 1.4.latest. |
This fix will ship with dbt-core 1.4.2. |
Thanks @peterallenwebb is there a timeline for when 1.4.2 might ship? |
@ajbosco We cut a release candidate of v1.4.2 yesterday:
Should be picked up by:
Could you take it for a spin, and confirm that it fixes your issue? |
@jtcohen6 Just confirmed this fix worked for our issue. |
Hello Guys, |
Is this a regression in a recent version of dbt-core?
Current Behavior
We recently upgraded to dbt 1.4.1 and noticed the console logging (both locally and when we run commands via Airflow) is not interactive/real-time anymore.
Notice the dbt command started running at 8:01 but didn't log until 9:27 when it was fully complete.
Expected/Previous Behavior
This is how it logged previously in real-time
Which database adapter are you using with dbt?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: