From 8660435e486e44e8991ee2f50289af5535427da4 Mon Sep 17 00:00:00 2001 From: Jacob Beck Date: Thu, 16 Apr 2020 13:05:12 -0600 Subject: [PATCH] Support for v1/v2 config blocks - Backwards compatiblity shims from v2 to v1 configs - config merging for v2 - compatibility shim for parsing/contexts - defer var lookups as late as possible - fixed ContextConfigType to be a proper Union of the two context config types - Fix adapter configs to be proper dataclasses - fix unused config paths error - make v2 config parsing not alter its source data automatic commit by git-black, original commits: c7d8031681a454c2c23c3fd40531a2129f7fbb1e fac8a286e84ca6c0a3972f069486b4389d751b19 --- core/dbt/parser/base.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/dbt/parser/base.py b/core/dbt/parser/base.py index 762711a94da..e3bd2d7ece9 100644 --- a/core/dbt/parser/base.py +++ b/core/dbt/parser/base.py @@ -314,9 +314,7 @@ def update_parsed_node_config( get_rendered(hook.sql, context, parsed_node, capture_macros=True) def initial_config(self, fqn: List[str]) -> ContextConfig: - config_version = min( - [self.project.config_version, self.root_project.config_version] - ) + config_version = min([self.project.config_version, self.root_project.config_version]) if config_version == 2: return ContextConfig( self.root_project,