Skip to content

Commit

Permalink
Fix snapshot success message to display "INSERT 0 1" (for example) in…
Browse files Browse the repository at this point in the history
…stead of success (#8524) (#8531)
  • Loading branch information
gshank authored Aug 31, 2023
1 parent 42addaf commit 3be943e
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 289 deletions.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20230830-150803.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Fix snapshot success message
time: 2023-08-30T15:08:03.429373-04:00
custom:
Author: gshank
Issue: "7583"
1 change: 1 addition & 0 deletions core/dbt/events/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,7 @@ message LogSnapshotResult {
int32 total = 5;
float execution_time = 6;
map<string, string> cfg = 7;
string result_message = 8;
}

message LogSnapshotResultMsg {
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@ def message(self) -> str:
status = red(self.status.upper())
else:
info = "OK snapshotted"
status = green(self.status)
status = green(self.result_message)

msg = "{info} {description}".format(info=info, description=self.description, **self.cfg)
return format_fancy_output_line(
Expand Down
576 changes: 288 additions & 288 deletions core/dbt/events/types_pb2.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions core/dbt/task/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def print_result_line(self, result):
total=self.num_nodes,
execution_time=result.execution_time,
node_info=model.node_info,
result_message=result.message,
),
level=level,
)
Expand Down

0 comments on commit 3be943e

Please sign in to comment.