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

Fix snapshot success message to display "INSERT 0 1" (for example) instead of "success" #8524

Merged
merged 1 commit into from
Aug 31, 2023
Merged
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-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 @@ -1689,6 +1689,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 @@ -1628,7 +1628,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
560 changes: 280 additions & 280 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
Loading