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

Ct 738/dbt debug log fix #6541

Merged
merged 18 commits into from
Jan 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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/Features-20230107-003157.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Features
body: Have dbt debug spit out structured json logs with flags enabled.
time: 2023-01-07T00:31:57.516063-08:00
custom:
Author: versusfacit
Issue: "5353"
104 changes: 104 additions & 0 deletions core/dbt/events/proto_types.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 79 additions & 0 deletions core/dbt/events/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1289,6 +1289,85 @@ message NoNodesSelected {
EventInfo info = 1;
}

// Q039
message DebugEnvironmentDetails {
EventInfo info = 1;
string msg = 2;
}

// Q040
message DebugDependenciesDetails {
EventInfo info = 1;
string msg = 2;
}

// Q041
message DebugDependenciesSuccess {
EventInfo info = 1;
string msg = 2;
}

// Q042
message DebugDependenciesFailure {
EventInfo info = 1;
string msg = 2;
}

// Q043
message DebugConfigurationDetails {
EventInfo info = 1;
string msg = 2;
}

// Q044
message DebugConfigurationSuccess {
EventInfo info = 1;
string msg = 2;
}

// QO45
message DebugConfigurationFailure {
EventInfo info = 1;
string msg = 2;
}

// Q046
message DebugConnectionDetails {
EventInfo info = 1;
string msg = 2;
}

// Q047
message DebugConnectionSuccess {
EventInfo info = 1;
string msg = 2;
}

// Q048
message DebugConnectionFailure {
EventInfo info = 1;
string msg = 2;
}

// Q049
message DebugRunSuccess {
EventInfo info = 1;
string msg = 2;
}

// Q050
message DebugRunFailure {
EventInfo info = 1;
string msg = 2;
}

// Q051
message DebugMiscMessages {
EventInfo info = 1;
string msg = 2;
}


// W - Node testing

// Skipped W001
Expand Down
117 changes: 117 additions & 0 deletions core/dbt/events/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,123 @@ def message(self) -> str:
return "No nodes selected!"


@dataclass
class DebugEnvironmentDetails(InfoLevel, pt.DebugEnvironmentDetails):
def code(self):
return "Q039"

def message(self) -> str:
return self.msg


@dataclass
class DebugDependenciesDetails(InfoLevel, pt.DebugDependenciesDetails):
def code(self):
return "Q040"

def message(self) -> str:
return self.msg


@dataclass
class DebugDependenciesSuccess(InfoLevel, pt.DebugDependenciesSuccess):
def code(self):
return "Q041"

def message(self) -> str:
return self.msg


@dataclass
class DebugDependenciesFailure(ErrorLevel, pt.DebugDependenciesFailure):
def code(self):
return "Q042"

def message(self) -> str:
return self.msg


@dataclass
class DebugConfigurationDetails(InfoLevel, pt.DebugConfigurationDetails):
def code(self):
return "Q043"

def message(self) -> str:
return self.msg


@dataclass
class DebugConfigurationSuccess(InfoLevel, pt.DebugConfigurationSuccess):
def code(self):
return "Q044"

def message(self) -> str:
return self.msg


@dataclass
class DebugConfigurationFailure(ErrorLevel, pt.DebugConfigurationFailure):
def code(self):
return "Q045"

def message(self) -> str:
return self.msg


@dataclass
class DebugConnectionDetails(ErrorLevel, pt.DebugConnectionDetails):
def code(self):
return "Q046"

def message(self) -> str:
return self.msg


@dataclass
class DebugConnectionSuccess(ErrorLevel, pt.DebugConnectionSuccess):
def code(self):
return "Q047"

def message(self) -> str:
return self.msg


@dataclass
class DebugConnectionFailure(ErrorLevel, pt.DebugConnectionFailure):
def code(self):
return "Q048"

def message(self) -> str:
return self.msg


@dataclass
class DebugRunSuccess(ErrorLevel, pt.DebugRunSuccess):
def code(self):
return "Q049"

def message(self) -> str:
return self.msg


@dataclass
class DebugRunFailure(ErrorLevel, pt.DebugRunFailure):
def code(self):
return "Q050"

def message(self) -> str:
return self.msg


@dataclass
class DebugMiscMessages(ErrorLevel, pt.DebugMiscMessages):
def code(self):
return "Q051"

def message(self) -> str:
return self.msg


# =======================================================
# W - Node testing
# =======================================================
Expand Down
Loading