-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature] Fail during dbt parse
when any dependency is not installed via dbt deps
#10760
Comments
I added the The Cloud IDE has a feature that automatically runs deps for users when needed. However, this feature depends on parse failing with the error message about missing dependencies. When parse comes back clean but a dependency is missing, this feature no does not work. |
I don't believe that this is a bug. Parsing processes the project files. If none of them reference a project that's been added to dependencies, then there is no error. This is a feature request. It seems like a reasonable feature request from Cloud's perspective, but what you're asking for is that "parsing" do a kind of mini-deps command. |
@gshank I see what you are saying, but I there is an inconsistency in behavior that lead me to file this as a bug. In some circumstances,
I'm not sure exactly what you mean by a "mini-deps command." Because of the compilation error I pasted above, I am not expecting parse to install dependencies for me. But I am expecting it to detect when I am missing installed dependencies. Basically, I'm saying that that CompilationError has set that expectation, which is then not always upheld. Thus my take that this is a bug. |
The code does a count of packages in packages.yml and compares that against the count of dependencies, which is where that error comes from. The problem is that there is no easy connection between the packages specified in packages.yml and the "dependencies" that are loaded. The actual name of the package comes from the dbt_project.yml file, not from the "name" of the package that's specified. We could store more information about the loaded dependencies for a better comparison, which is probably a good idea, but it's not "fixable" with what we have currently. |
Per @gshank's feedback, I'm going to recategorize this as a feature request (we can always switch it back to a bug report if that seems appropriate). |
dbt parse
when any dependency is not installed via dbt deps
An update to this should be a be behind behavior flag |
Is this a new bug in dbt-core?
Current Behavior
dbt parse
succeeds when a package specified in packages.yml is not installedExpected Behavior
dbt parse
should fail and instruct me to run dbt depsSteps To Reproduce
You can watch along with the reproduction in this Zoom clip.
dbt parse
. Notice that it succeeds.packages.yml
. Make it look like this:dbt deps
packages.yml
to add another package:dbt parse
(Do not rundbt deps
first)Relevant log output
No response
Environment
Which database adapter are you using with dbt?
other (mention it in "Additional Context")
Additional Context
dbt-duckdb 1.8.1
Looks like Feature Request #4557 would be one way of resolving this bug?
The text was updated successfully, but these errors were encountered: