From 48b78df8f76e402d5271495c80ca3bb218d7507d Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Tue, 10 Aug 2021 08:50:16 -0400 Subject: [PATCH 1/3] Use is_relational check for schema caching --- core/dbt/adapters/base/impl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/dbt/adapters/base/impl.py b/core/dbt/adapters/base/impl.py index 46491202f9c..1b49005a3be 100644 --- a/core/dbt/adapters/base/impl.py +++ b/core/dbt/adapters/base/impl.py @@ -310,8 +310,7 @@ def _get_cache_schemas(self, manifest: Manifest) -> Set[BaseRelation]: self.Relation.create_from(self.config, node).without_identifier() for node in manifest.nodes.values() if ( - node.resource_type in NodeType.executable() and - not node.is_ephemeral_model + node.is_relational and not node.is_ephemeral_model ) } From d28ef22b473b0b44022528dcc5ac41713eaa42a1 Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Tue, 10 Aug 2021 08:54:04 -0400 Subject: [PATCH 2/3] Fix flake8 --- core/dbt/adapters/base/impl.py | 1 - 1 file changed, 1 deletion(-) diff --git a/core/dbt/adapters/base/impl.py b/core/dbt/adapters/base/impl.py index 1b49005a3be..1d9018446e5 100644 --- a/core/dbt/adapters/base/impl.py +++ b/core/dbt/adapters/base/impl.py @@ -31,7 +31,6 @@ from dbt.contracts.graph.manifest import Manifest, MacroManifest from dbt.contracts.graph.parsed import ParsedSeedNode from dbt.exceptions import warn_or_error -from dbt.node_types import NodeType from dbt.logger import GLOBAL_LOGGER as logger from dbt.utils import filter_null_values, executor From afb5162c819fe14813f44666e3fb0c1a6198c0af Mon Sep 17 00:00:00 2001 From: Jeremy Cohen Date: Thu, 12 Aug 2021 17:58:03 -0400 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f7dd7eed11..e5b6cda7f6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ### Features - Capture changes to macros in `state:modified`. Introduce new `state:` sub-selectors: `modified.body`, `modified.configs`, `modified.persisted_descriptions`, `modified.relation`, `modified.macros` ([#2704](https://github.com/dbt-labs/dbt/issues/2704), [#3278](https://github.com/dbt-labs/dbt/issues/3278), [#3559](https://github.com/dbt-labs/dbt/issues/3559)) +### Fixes +- Fix for RPC requests that raise a RecursionError when serializing Undefined values as JSON ([#3464](https://github.com/dbt-labs/dbt/issues/3464), [#3687](https://github.com/dbt-labs/dbt/pull/3687)) +- Avoid caching schemas for tests when `store_failures` is not enabled ([#3715](https://github.com/dbt-labs/dbt/issues/3715), [#3716](https://github.com/dbt-labs/dbt/pull/3716)) + ### Under the hood - Add `build` RPC method, and a subset of flags for `build` task ([#3595](https://github.com/dbt-labs/dbt/issues/3595), [#3674](https://github.com/dbt-labs/dbt/pull/3674)) @@ -22,7 +26,6 @@ - Fix type coercion issues when fetching query result sets ([#2984](https://github.com/fishtown-analytics/dbt/issues/2984), [#3499](https://github.com/fishtown-analytics/dbt/pull/3499)) - Handle whitespace after a plus sign on the project config ([#3526](https://github.com/dbt-labs/dbt/pull/3526)) - Fix table and view materialization issue when switching from one to the other ([#2161](https://github.com/dbt-labs/dbt/issues/2161)), [#3547](https://github.com/dbt-labs/dbt/pull/3547)) -- Fix for RPC requests that raise a RecursionError when serializing Undefined values as JSON ([#3464](https://github.com/dbt-labs/dbt/issues/3464), [#3687](https://github.com/dbt-labs/dbt/pull/3687)) ### Under the hood - Add performance regression testing [#3602](https://github.com/dbt-labs/dbt/pull/3602)