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 for deps that depend on other local deps #1123

Merged
merged 1 commit into from
Nov 19, 2018

Conversation

drewbanin
Copy link
Contributor

dbt currently fails if a dep depends on a different local dep. I kind of found myself with a stacktrace by accident, as this is a pretty strange situation to find yourself in.

I added a simple test for a local package, since i don't think we currently have one of those. We should add another test to test the error case fixed by this PR though.

This originally failed with:

2018-11-13 21:43:24,828 (MainThread): __init__() takes 1 positional argument but 2 were given
2018-11-13 21:43:24,835 (MainThread): Traceback (most recent call last):
  File "/Users/drew/fishtown/dbt/dbt/main.py", line 76, in main
    results, succeeded = handle_and_check(args)
  File "/Users/drew/fishtown/dbt/dbt/main.py", line 126, in handle_and_check
    task, res = run_from_args(parsed)
  File "/Users/drew/fishtown/dbt/dbt/main.py", line 181, in run_from_args
    results = run_from_task(task, cfg, parsed)
  File "/Users/drew/fishtown/dbt/dbt/main.py", line 189, in run_from_task
    result = task.run()
  File "/Users/drew/fishtown/dbt/dbt/task/deps.py", line 438, in run
    final_deps.incorporate(package)
  File "/Users/drew/fishtown/dbt/dbt/task/deps.py", line 334, in incorporate
    self[package.name] = self[package.name].incorporate(package)
  File "/Users/drew/fishtown/dbt/dbt/task/deps.py", line 261, in incorporate
    return LocalPackage(self.local)
  File "/Users/drew/fishtown/dbt/dbt/task/deps.py", line 31, in __init__
    super(Package, self).__init__(*args, **kwargs)
TypeError: __init__() takes 1 positional argument but 2 were given

Copy link
Contributor

@beckjake beckjake left a comment

Choose a reason for hiding this comment

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

Good find, nice test!

@drewbanin drewbanin merged commit 3bdebba into dev/grace-kelly Nov 19, 2018
@drewbanin drewbanin deleted the fix/local-packages branch November 19, 2018 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants