If an adapter plugin macro and a macro defined in dbt-core have the same name, dbt gives a bad error:
'ParsedMacro' object has no attribute 'namespace'
This happens because dbt.exceptions.raise_duplicate_macro_name accesses macro_1.namespace. It should be macro_1.name.
Create an adapter plugin with a macro that has a name the same as one in core (or another plugin). For example, is_incremental. Install that plugin, run dbt.
I should get an error indicating that two macros that ended up in the same namespace have the same name.
N/A
Which database are you using dbt with?
The output of dbt --version:
0.16.0
The operating system you're using:
any
The output of python --version:
any
This issue is a real pain to surface and writing a real integration test for it would be a real chore, but we could at least unit test it!
I would like to get this into 0.16.1, if possible. It's a small fix and buggy error handling is always embarrassing.
@beckjake just added this to the 0.16.1 milestone if you think we can sneak it in!
fixed by #2293
For what it is worth, I ran into this problem today with a fresh install of dbt 0.16.0 and dbt-sqlserver adapter (0.15.1). Thanks @beckjake for finding this and fixing it!