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

Fix an error in exception handling for duplicate macros (#2288) #2293

Merged
merged 2 commits into from
Apr 3, 2020

Conversation

beckjake
Copy link
Contributor

@beckjake beckjake commented Apr 3, 2020

resolves #2288

Description

Use name, not namespace (which does not exist), for the macro name. Added a test.

Checklist

  • 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
  • I have updated the CHANGELOG.md and added information about my change to the "dbt next" section.

@cla-bot cla-bot bot added the cla:yes label Apr 3, 2020
@beckjake beckjake requested a review from drewbanin April 3, 2020 16:33
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment and then this will be ready to roll

assert 'dbt-myadapter' in str(exc.value)
assert 'some_macro' in str(exc.value)
assert 'namespace "dbt"' in str(exc.value)
assert '("dbt" and "dbt-myadapter" are both in the "dbt" namespace)'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you're missing an in str(..) here?

@beckjake beckjake force-pushed the fix/duplicate-plugin-macros branch from dea30ae to be0e12e Compare April 3, 2020 16:53
Copy link
Contributor

@drewbanin drewbanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ship it when the tests pass :)

@beckjake
Copy link
Contributor Author

beckjake commented Apr 3, 2020

Merging before the current checks pass - the previous ones passed, this commit is just a CHANGELOG.md conflict

@beckjake beckjake merged commit 1e94b1f into dev/0.16.1 Apr 3, 2020
@beckjake beckjake deleted the fix/duplicate-plugin-macros branch April 3, 2020 18:16
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.

2 participants