Skip to content
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

Fire skipped events at debug level #9371

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240113-073615.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Convert "Skipping model due to fail_fast" message to DEBUG level
time: 2024-01-13T07:36:15.836294-00:00
custom:
Author: scottgigante
Issue: "8774"
17 changes: 13 additions & 4 deletions core/dbt/task/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
)
from dbt_common.events.functions import fire_event
from dbt_common.events.types import Formatting
from dbt.events.base_types import EventLevel
from dbt.events.types import (
RunResultWarning,
RunResultWarningMessage,
Expand Down Expand Up @@ -75,11 +76,10 @@ def print_run_status_line(results) -> None:


def print_run_result_error(result, newline: bool = True, is_warning: bool = False) -> None:
if newline:
with TextOnly():
fire_event(Formatting(""))

if result.status == NodeStatus.Fail or (is_warning and result.status == NodeStatus.Warn):
if newline:
with TextOnly():
fire_event(Formatting(""))
if is_warning:
fire_event(
RunResultWarning(
Expand Down Expand Up @@ -115,7 +115,16 @@ def print_run_result_error(result, newline: bool = True, is_warning: bool = Fals
fire_event(Formatting(""))
fire_event(CheckNodeTestFailure(relation_name=result.node.relation_name))

elif result.status == NodeStatus.Skipped and result.message is not None:
if newline:
with TextOnly():
fire_event(Formatting(""), level=EventLevel.DEBUG)
fire_event(RunResultError(msg=result.message), level=EventLevel.DEBUG)

elif result.message is not None:
if newline:
with TextOnly():
fire_event(Formatting(""))
fire_event(RunResultError(msg=result.message))


Expand Down
Loading