dbt-core icon indicating copy to clipboard operation
dbt-core copied to clipboard

Fix macro namespace search packages

Open dbeatty10 opened this issue 3 years ago • 4 comments

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 new to create a changelog entry

dbeatty10 avatar Sep 09 '22 22:09 dbeatty10

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.

github-actions[bot] avatar Sep 09 '22 22:09 github-actions[bot]

@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?

dbeatty10 avatar Sep 14 '22 13:09 dbeatty10

@gshank Maybe this an example to follow? https://github.com/dbt-labs/dbt-core/commit/98c015b7754779793e44e056905614296c6e4527#diff-afbd4157cc43828072521462ad9c0100ec311f34f6086ca95a1341d1b47efda6R405-R416

dbeatty10 avatar Sep 14 '22 13:09 dbeatty10

Yes, there seem to be some two-argument adapter.dispatch calls in tests/functional/schema_tests.

gshank avatar Sep 14 '22 14:09 gshank

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.

github-actions[bot] avatar Mar 14 '23 01:03 github-actions[bot]

Although we are closing this PR as stale, it can still be reopened to continue development. Just add a comment to notify the maintainers.

github-actions[bot] avatar Mar 21 '23 01:03 github-actions[bot]

@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 :)

😂

dbeatty10 avatar Jun 23 '23 18:06 dbeatty10