Skip to content

Commit

Permalink
Merge pull request #357 from duckdb/jwills_fix_md_plugin_bug
Browse files Browse the repository at this point in the history
Fix module field reference on PluginConfig for MD
  • Loading branch information
jwills authored Mar 7, 2024
2 parents 9eedc6d + f076433 commit 15fa28d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbt/adapters/duckdb/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def __post_init__(self):
if self.is_motherduck:
if self.plugins is None:
self.plugins = []
if "motherduck" not in [plugin["module"] for plugin in self.plugins]:
if "motherduck" not in [plugin.module for plugin in self.plugins]:
self.plugins.append(PluginConfig(module="motherduck"))

@property
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/plugins/test_motherduck.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from dbt.adapters.duckdb.credentials import DuckDBCredentials
from dbt.adapters.duckdb.credentials import PluginConfig
from dbt.adapters.duckdb.plugins.motherduck import Plugin
from dbt.adapters.duckdb.__version__ import version as plugin_version
from dbt.version import __version__

random_logs_sql = """
Expand Down Expand Up @@ -138,7 +139,7 @@ def test_motherduck_user_agent(dbt_profile_target, mock_plugins, mock_creds):
kwargs = {
'read_only': False,
'config': {
'custom_user_agent': f'dbt/{__version__} downstream-dep',
'custom_user_agent': f'dbt/{__version__} dbt-duckdb/{plugin_version} downstream-dep',
'motherduck_token': 'quack'
}
}
Expand Down

0 comments on commit 15fa28d

Please sign in to comment.