Skip to content

Commit

Permalink
Include fails with errors in markdown logging
Browse files Browse the repository at this point in the history
  • Loading branch information
austinweisgrau committed Jul 22, 2024
1 parent 33bba79 commit 4f10c3b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions parsons/utilities/dbt/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ def format_command_result(
log_message += "\n*Summary*: `{}`".format(log_summary_str)

# Errors
if manifest.errors:
if manifest.errors or manifest.fails:
log_message += "\nError messages:\n```{}```".format(
"\n\n".join([i.node.name + ": " + i.message for i in manifest.errors])
"\n\n".join(
[i.node.name + ": " + i.message for i in [*manifest.errors, *manifest.fails]]
)
)

# Warnings
Expand Down
4 changes: 4 additions & 0 deletions parsons/utilities/dbt/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def warnings(self) -> list[NodeResult]:
def errors(self) -> list[NodeResult]:
return self.filter_results(status="error")

@property
def fails(self) -> list[NodeResult]:
return self.filter_results(status="fail")

@property
def skips(self) -> list[NodeResult]:
return self.filter_results(status="skipped")
Expand Down

0 comments on commit 4f10c3b

Please sign in to comment.