From f26d94dee5049e025755460f947af52ed56a40ed Mon Sep 17 00:00:00 2001 From: panasenco Date: Mon, 3 May 2021 17:12:21 -0700 Subject: [PATCH 1/3] Now generating a run_results.json even when no nodes are selected. --- CHANGELOG.md | 1 + core/dbt/task/runnable.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 361dac6588e..54437be6523 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Contributors: ## dbt 0.20.0b1 (May 03, 2021) ### Fixes +- Now generating a manifest and a run_result.json even when no nodes are selected ([#3313](https://github.com/fishtown-analytics/dbt/issues/3313)) - Fix exit code from dbt debug not returning a failure when one of the tests fail ([#3017](https://github.com/fishtown-analytics/dbt/issues/3017)) - Auto-generated CTEs in tests and ephemeral models have lowercase names to comply with dbt coding conventions ([#3027](https://github.com/fishtown-analytics/dbt/issues/3027), [#3028](https://github.com/fishtown-analytics/dbt/issues/3028)) - Fix incorrect error message when a selector does not match any node [#3036](https://github.com/fishtown-analytics/dbt/issues/3036)) diff --git a/core/dbt/task/runnable.py b/core/dbt/task/runnable.py index cfe46571347..98af7546c87 100644 --- a/core/dbt/task/runnable.py +++ b/core/dbt/task/runnable.py @@ -413,7 +413,7 @@ def run(self): if len(self._flattened_nodes) == 0: logger.warning("WARNING: Nothing to do. Try checking your model " "configs and model specification args") - return self.get_result( + result = self.get_result( results=[], generated_at=datetime.utcnow(), elapsed_time=0.0, @@ -421,9 +421,8 @@ def run(self): else: with TextOnly(): logger.info("") - - selected_uids = frozenset(n.unique_id for n in self._flattened_nodes) - result = self.execute_with_hooks(selected_uids) + selected_uids = frozenset(n.unique_id for n in self._flattened_nodes) + result = self.execute_with_hooks(selected_uids) if flags.WRITE_JSON: self.write_manifest() From c5eeb974215b931cfd9b83f993eaa42b0746afcc Mon Sep 17 00:00:00 2001 From: panasenco Date: Mon, 3 May 2021 17:20:35 -0700 Subject: [PATCH 2/3] Typo in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54437be6523..76206eb11db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ Contributors: ## dbt 0.20.0b1 (May 03, 2021) ### Fixes -- Now generating a manifest and a run_result.json even when no nodes are selected ([#3313](https://github.com/fishtown-analytics/dbt/issues/3313)) +- Now generating a manifest and a run_results.json even when no nodes are selected ([#3313](https://github.com/fishtown-analytics/dbt/issues/3313)) - Fix exit code from dbt debug not returning a failure when one of the tests fail ([#3017](https://github.com/fishtown-analytics/dbt/issues/3017)) - Auto-generated CTEs in tests and ephemeral models have lowercase names to comply with dbt coding conventions ([#3027](https://github.com/fishtown-analytics/dbt/issues/3027), [#3028](https://github.com/fishtown-analytics/dbt/issues/3028)) - Fix incorrect error message when a selector does not match any node [#3036](https://github.com/fishtown-analytics/dbt/issues/3036)) From 025762a3f5e610f8ab314bc44abb77a07891a077 Mon Sep 17 00:00:00 2001 From: panasenco Date: Wed, 5 May 2021 21:34:07 -0700 Subject: [PATCH 3/3] Modified changelog in accordance with @jtcohen6's suggestions. Also fixed @TeddyCr's entry. --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76206eb11db..76076a9ac92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,17 +2,18 @@ ### Fixes - Fix compiled sql for ephemeral models ([#3317](https://github.com/fishtown-analytics/dbt/issues/3317), [#3318](https://github.com/fishtown-analytics/dbt/pull/3318)) +- Now generating `run_results.json` even when no nodes are selected ([#3313](https://github.com/fishtown-analytics/dbt/issues/3313), [#3315](https://github.com/fishtown-analytics/dbt/pull/3315)) ### Under the hood -- Added logic for registry requests to raise a timeout error after a response hangs out for 30 seconds and 5 attempts have been made to reach the endpoint ([#3117](https://github.com/fishtown-analytics/dbt/issues/3177)) +- Added logic for registry requests to raise a timeout error after a response hangs out for 30 seconds and 5 attempts have been made to reach the endpoint ([#3177](https://github.com/fishtown-analytics/dbt/issues/3177), [#3275](https://github.com/fishtown-analytics/dbt/pull/3275)) Contributors: -- [@TeddyCr](https://github.com/TeddyCr) ([#3117](https://github.com/fishtown-analytics/dbt/issues/3177)) +- [@TeddyCr](https://github.com/TeddyCr) ([#3275](https://github.com/fishtown-analytics/dbt/pull/3275)) +- [@panasenco](https://github.com/panasenco) ([#3315](https://github.com/fishtown-analytics/dbt/pull/3315)) ## dbt 0.20.0b1 (May 03, 2021) ### Fixes -- Now generating a manifest and a run_results.json even when no nodes are selected ([#3313](https://github.com/fishtown-analytics/dbt/issues/3313)) - Fix exit code from dbt debug not returning a failure when one of the tests fail ([#3017](https://github.com/fishtown-analytics/dbt/issues/3017)) - Auto-generated CTEs in tests and ephemeral models have lowercase names to comply with dbt coding conventions ([#3027](https://github.com/fishtown-analytics/dbt/issues/3027), [#3028](https://github.com/fishtown-analytics/dbt/issues/3028)) - Fix incorrect error message when a selector does not match any node [#3036](https://github.com/fishtown-analytics/dbt/issues/3036))