From 855dd98c62c90bc6b9747452aa0347f9feea7d9b Mon Sep 17 00:00:00 2001 From: Spencer Carrucciu Date: Mon, 1 Jun 2020 07:37:33 -0400 Subject: [PATCH 1/2] Fix --dependency arg bug in create_adapter_plugin Fix bug in create_adapter_plugin when a dependency is not passed in. --- core/scripts/create_adapter_plugins.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/scripts/create_adapter_plugins.py b/core/scripts/create_adapter_plugins.py index cd40fba30f4..9be47de2acc 100644 --- a/core/scripts/create_adapter_plugins.py +++ b/core/scripts/create_adapter_plugins.py @@ -248,11 +248,12 @@ def parse_args(argv=None): parsed.title_case = parsed.adapter.title() if parsed.set_dependency: + + prefix = '\n ' + if parsed.dependency: # ['a', 'b'] => "'a',\n 'b'"; ['a'] -> "'a'," - - prefix = '\n ' - + parsed.dependency = prefix + prefix.join( "'{}',".format(d) for d in parsed.dependency ) From 2dd7ef5302700b28ed7387fe1c1f67966a7c3f9e Mon Sep 17 00:00:00 2001 From: Spencer Carrucciu Date: Mon, 1 Jun 2020 12:47:15 -0400 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 846673591c2..4de3051b686 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,13 @@ - Added intersection syntax for model selector ([#2167](https://github.com/fishtown-analytics/dbt/issues/2167), [#2417](https://github.com/fishtown-analytics/dbt/pull/2417)) - Extends model selection syntax with at most n-th parent/children `dbt run --models 3+m1+2` ([#2052](https://github.com/fishtown-analytics/dbt/issues/2052), [#2485](https://github.com/fishtown-analytics/dbt/pull/2485)) +### Fixes +- Fixed an error in create_adapter_plugins.py script when -dependency arg not passed ([#2507](https://github.com/fishtown-analytics/dbt/issues/2507), [#2508](https://github.com/fishtown-analytics/dbt/pull/2508)) + Contributors: - [@raalsky](https://github.com/Raalsky) ([#2417](https://github.com/fishtown-analytics/dbt/pull/2417), [#2485](https://github.com/fishtown-analytics/dbt/pull/2485)) - - [@alf-mindshift](https://github.com/alf-mindshift) ([#2431](https://github.com/fishtown-analytics/dbt/pull/2431) + - [@alf-mindshift](https://github.com/alf-mindshift) ([#2431](https://github.com/fishtown-analytics/dbt/pull/2431)) + - [@scarrucciu](https://github.com/scarrucciu) ([#2508](https://github.com/fishtown-analytics/dbt/pull/2508)) ## dbt 0.17.0 (Release TBD)