From 6bc6823bbfe5b8563cd49fb7a739cf56fb18a63a Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Mon, 14 Aug 2023 18:13:10 +0100 Subject: [PATCH] Fix #8350: add connection status into list of statuses for dbt debug (#8351) (cherry picked from commit b514e4c24971b8b589b6559458a59bca9d2b6807) --- .changes/unreleased/Fixes-20230810-184859.yaml | 6 ++++++ core/dbt/task/debug.py | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixes-20230810-184859.yaml diff --git a/.changes/unreleased/Fixes-20230810-184859.yaml b/.changes/unreleased/Fixes-20230810-184859.yaml new file mode 100644 index 00000000000..03dcdffa607 --- /dev/null +++ b/.changes/unreleased/Fixes-20230810-184859.yaml @@ -0,0 +1,6 @@ +kind: Fixes +body: Add connection status into list of statuses for dbt debug +time: 2023-08-10T18:48:59.221344+01:00 +custom: + Author: aranke + Issue: "8350" diff --git a/core/dbt/task/debug.py b/core/dbt/task/debug.py index 769c7fd8cad..43ba492eec1 100644 --- a/core/dbt/task/debug.py +++ b/core/dbt/task/debug.py @@ -149,13 +149,14 @@ def run(self) -> bool: dependencies_statuses = self.test_dependencies() # Test connection - self.test_connection() + connection_status = self.test_connection() # Log messages from any fails all_statuses: List[SubtaskStatus] = [ load_profile_status, load_project_status, *dependencies_statuses, + connection_status, ] all_failing_statuses: List[SubtaskStatus] = list( filter(lambda status: status.run_status == RunStatus.Error, all_statuses)