From 6eac7510df6ca353ac71f0e02fa941b7ea9ac63c Mon Sep 17 00:00:00 2001 From: Rachel Daniel Date: Fri, 5 Nov 2021 15:29:19 -0500 Subject: [PATCH 1/3] Clears adapters before registering to fix dbt-server cacheing behavior --- core/dbt/lib.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/dbt/lib.py b/core/dbt/lib.py index 4a6a2c03a6b..6269c991357 100644 --- a/core/dbt/lib.py +++ b/core/dbt/lib.py @@ -21,6 +21,9 @@ def get_dbt_config(project_dir, single_threaded=False): config = RuntimeConfig.from_args(RuntimeArgs( project_dir, profiles_dir, single_threaded )) + # Clear previously registered adapters-- + # this fixes cacheing behavior on the dbt-server + dbt.adapters.factory.reset_adapters() # Load the relevant adapter dbt.adapters.factory.register_adapter(config) From 31bc217cc15276e7980ff85a61e6586c86a0ec46 Mon Sep 17 00:00:00 2001 From: Rachel Daniel Date: Mon, 8 Nov 2021 09:09:02 -0600 Subject: [PATCH 2/3] Adds entry to changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a318ada61b..77f5ee5a7c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ ### Under the hood - Bump artifact schema versions for 1.0.0: manifest v4, run results v4, sources v3. Notable changes: schema test + data test nodes are renamed to generic test + singular test nodes; freshness threshold default values ([#4191](https://github.com/dbt-labs/dbt-core/pull/4191)) - Speed up node selection by skipping `incorporate_indirect_nodes` if not needed ([#4213](https://github.com/dbt-labs/dbt-core/issues/4213), [#4214](https://github.com/dbt-labs/dbt-core/issues/4214)) +- Clear adapters before registering in lib module config generation +([#4218](https://github.com/dbt-labs/dbt-core/pull/4218)) Contributors: - [@kadero](https://github.com/kadero) ([3955](https://github.com/dbt-labs/dbt-core/pull/3955)) From 8b874cccce9a4e17ceb3fe935417a22a97f9a8eb Mon Sep 17 00:00:00 2001 From: Rachel Daniel Date: Mon, 8 Nov 2021 09:10:01 -0600 Subject: [PATCH 3/3] Removes new line --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77f5ee5a7c7..e8899d77569 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,7 @@ ### Under the hood - Bump artifact schema versions for 1.0.0: manifest v4, run results v4, sources v3. Notable changes: schema test + data test nodes are renamed to generic test + singular test nodes; freshness threshold default values ([#4191](https://github.com/dbt-labs/dbt-core/pull/4191)) - Speed up node selection by skipping `incorporate_indirect_nodes` if not needed ([#4213](https://github.com/dbt-labs/dbt-core/issues/4213), [#4214](https://github.com/dbt-labs/dbt-core/issues/4214)) -- Clear adapters before registering in lib module config generation -([#4218](https://github.com/dbt-labs/dbt-core/pull/4218)) +- Clear adapters before registering in lib module config generation ([#4218](https://github.com/dbt-labs/dbt-core/pull/4218)) Contributors: - [@kadero](https://github.com/kadero) ([3955](https://github.com/dbt-labs/dbt-core/pull/3955))