Fix macro namespace search packages
resolves #5801
Description
Make sure that search_packages is a list with at least one entry. [None] is the desired base case.
Checklist
- [X] I have read the contributing guide and understand what's expected of me
- [X] I have signed the CLA
- [ ] I have run this code in development and it appears to resolve the stated issue
- [ ] This PR includes tests, or tests are not required/relevant for this PR
- [X] I have opened an issue to add/update docs, or docs changes are not required/relevant for this PR
- [x] I have run
changie newto create a changelog entry
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.
@gshank functional testing this would require testing the two-argument version of dispatch (to cover the 2nd, optional macro_namespace argument).
I didn't see a good place that was already testing that optional argument to utilize as a pattern.
Do you know of an example? Or do you know anyone that could implement the testing part of this PR?
@gshank Maybe this an example to follow? https://github.com/dbt-labs/dbt-core/commit/98c015b7754779793e44e056905614296c6e4527#diff-afbd4157cc43828072521462ad9c0100ec311f34f6086ca95a1341d1b47efda6R405-R416
Yes, there seem to be some two-argument adapter.dispatch calls in tests/functional/schema_tests.
This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.
Although we are closing this PR as stale, it can still be reopened to continue development. Just add a comment to notify the maintainers.
@gshank Would you be willing to give this a look? This bug fix has tests cases now 🎉
As expected you were right when you said this:
I think the fix is fine. Please submit a PR. Creating the test will probably be a lot more work than the fix :)
😂