-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CT-2049: Add CommandCompleted event (#7180)
* add protobuf message/class for new CommandCompleted event For [CT-2049](#6878) we concluded that we wanted a new event type, [CommandCompleted](#6878 (comment)) with [four (4) values](#6878 (comment)): which command was run, whether the command succeeded, the timestamp that the command finished, and how long the command took. This commit adds the new event proto defition, the auto generated proto_types, and the instantiatable even type. * begin emitting CommandCompleted event in the preflight decorator The [preflight decorator](https://github.com/dbt-labs/dbt-core/blob/4186f99b742b47e0e95aca4f604cc09e5c67a449/core/dbt/cli/requires.py#L19) runs at the start of every CLI invocation. Thus is a perfect candidate for emitting the CommandCompleted event. This is noted in the [dicussion on CT-2049](#6878 (comment)). * add CommandCompleted event to event unit tests * Add: changelog entry * fire CommandCompleted event reguardless of upstream exceptions Previously, if `--fail-fast` was specified and an issue was run into or an unhandled issue became an exception, the CommandCompleted event would not get fired because at this point in the stack we'd be in exception thrown handling mode. If an exception does reach this point, we want to still fire the event and also continue to propogate the exception. Hence the bare `raise` exists to reraise the caught exception * Update CommandCompleted event to be a `Debug` level event We don't actually "always" need this event to be logged. Thus we've updated it to `Debug` level. [Discussion Context](#7180 (comment))
- Loading branch information
Showing
6 changed files
with
82 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Under the Hood | ||
body: Add CommandCompleted event, and fire it upon completion of every command | ||
time: 2023-03-16T12:33:05.696752-07:00 | ||
custom: | ||
Author: QMalcolm | ||
Issue: "6878" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters