-
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
[CT-775] [Enhancement] dbt deps
does not correctly resolve local dependency of local dependency
#5410
Comments
dbt deps
does not correctly resolve local dependency of local dependencydbt deps
does not correctly resolve local dependency of local dependency
Putting the language tag since @emmyoop is more familiar with the |
I always love a good reproduction repo. ❤️ Thanks for that @skirino! I agree this is related to #4538 but I think it may have to do with I'm also going to change this to an enhancement, because similar to #5374 this was not the original intent on how this would be used. @jtcohen6 please correct me if there's something missing. |
dbt deps
does not correctly resolve local dependency of local dependencydbt deps
does not correctly resolve local dependency of local dependency
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Bumping the issue, it makes local packages in the monorepo setup completely unusable. And the above @emmyoop's statement:
is not valid anymore, as the monorepo use-case is mentioned directly in local package docs nowadays: cc: @jtcohen6, because that's absolutely critical issue for our dbt monoproject refactor |
@dbeatty10 could you re-open the issue not to create duplicates? |
@jaklan Thanks for flagging this - it's worth another look given the changes to packages/progress over the past few years. Right now, the dbt-core/core/dbt/deps/local.py Lines 44 to 48 in 71f3519
Using OP's reproduction case, So we'd need a way to get at the location of the |
@jtcohen6 thanks for picking up the issue. I fully agree it gets quite tricky when we consider mix of various installation methods, however - maybe it's worth to split it into two phases: a) temporary solution to fix the local-of-local scenario b) the final, robust one handling various combinations. I can imagine a use-case, where we install a package via
and most likely much more other not-so-obvious scenarios. But having said that, when we talk about the monorepo setup - I believe the most common scenario is the local-of-local one, and solving only that scenario would be enough to unblock most monorepo users and give you time to re-design the current approach in a more comprehensive way. |
Hi team, |
@misteliy I'm going to take a closer look at the local-of-local use-case during the next sprint. Does the example in https://github.com/skirino/dbt_local_dep_path_issue encapsulate the local-of-local use-case that you're thinking of? |
@dbeatty10 yep, based on the README - that's exactly the issue |
@dbeatty10 keep us posted - thank you! |
@jaklan and @misteliy I took a look at this and put up a draft PR: #10600 It worked when I tested it against https://github.com/skirino/dbt_local_dep_path_issue, but it's failing a couple CI tests (specifically these two). I haven't yet had a chance to dig into the reason why. |
@dbeatty10 thank you for taking care of it, highly appreciated! |
Is there an existing issue for this?
Current Behavior
Suppose there are the following local dependency relations:
pkg1
=>pkg2
=>pkg3
.Then, the directory of
pkg3
is specified bypackages.yml
file ofpkg2
. But, when runningdbt deps
inpkg1
,pkg3
is searched frompkg1
's directory, not frompkg2
's directory.Expected Behavior
The directory of
pkg3
should be resolved frompkg2
's directory, so thatpkg3
can be found regardless of the location ofpkg1
.Steps To Reproduce
I've prepared a minimal repro: https://github.com/skirino/dbt_local_dep_path_issue
git clone https://github.com/skirino/dbt_local_dep_path_issue.git
cd dbt_local_dep_path_issue/b/c
dbt deps
Relevant log output
No response
Environment
What database are you using dbt with?
snowflake
Additional Context
This is the same issue as described in #4538 (comment), but I think it deserves a separate issue.
The text was updated successfully, but these errors were encountered: