Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] #4114 #4117

Merged
merged 2 commits into from
Oct 22, 2021
Merged

[Backport] #4114 #4117

merged 2 commits into from
Oct 22, 2021

Conversation

jtcohen6
Copy link
Contributor

No description provided.

* Add project name to default search packages

We prefer macros in the project over the ones in the namespace (package)

* Add change to change log

* Use project_name instead of project

* Raise compilation error if no macros are found

* Update change log line

* Add test for package macro override

* Add JCZuurmond to contributor

* Fix typos

* Add test that should not over ride the package

* Add doc string to tests
@jtcohen6 jtcohen6 requested a review from leahwicz October 22, 2021 13:18
@cla-bot cla-bot bot added the cla:yes label Oct 22, 2021
@leahwicz
Copy link
Contributor

@jtcohen6 does this seem backport worthy? It doesn't seem like a bug or regression

@jtcohen6
Copy link
Contributor Author

@leahwicz This was technically a regression in behavior from v0.20, reported in both #4029 + #4098.

In v0.21.0, users are no longer able to override the adapter-specific implementations of built-in macros in the simple way they had previously. There are two easy workarounds for it (remove the adapter prefix, or add a dispatch config to dbt_project.yml).

We ended up figuring out a "win-win" way to restore the previous behavior by default, which is why I think we should backport. Users upgrading from v0.20.latest to v0.21.latest will now have their existing code "just work", no workaround needed, while still gaining access to the net-new functionality in v0.21 (to which the regression was related).

@jtcohen6 jtcohen6 merged commit ae45ee0 into 0.21.latest Oct 22, 2021
@jtcohen6 jtcohen6 deleted the backport-4114 branch October 22, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants