-
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
[Bug] Using dbt deps on a git package with a branch name hardpins to the current branch commit #9796
Comments
This may be a regression not a bug, it maybe seems to be an extension/side effect of the behaviour that was agreed upon in the deps lock PR in particular:
While I find this behaviour a bit unexpected in general (given patch releases are often used to fix bugs, I would think the purpose of using a range would be to ensure you got the latest version...), I think in the case of a git branch this is even more unexpected, as I have specified a specific branch but the commit being used is no longer aligned with the actual head of the branch. |
Sorry just reading through that PR a bit more, it seems like I guess my question is why is this not the default behaviour so that it would have been a non-breaking change (and why isn't it listed as a breaking change in the changelog), and that I can't find this flag detailed anywhere in the docs https://docs.getdbt.com/docs/build/packages |
Thanks for reaching out about this and doing this research @rlh1994 ! 🙏 Good call that this this can be surprising so we should document this in both the migration guide for v1.7 and anywhere else it is applicable (like here or here). Closing this issue in favor of updating the docs in dbt-labs/docs.getdbt.com#5140 |
A note to anyone who got here from Google. It's I found this thread reference above: The most useful for understanding the change. |
Is this a new bug in dbt-core?
Current Behavior
When I use a branch name as the
revision
for a git package, as detailed in the docs https://docs.getdbt.com/docs/build/packages#git-packages, thepackage-lock.yml
translates this to a hardpinned commit hash. When further commits are added to this branch, despite callingdbt clean
anddbt deps
again, this remains hard pinned to the earlier commit and I have to delete the package lock file to get it to fetch the latest commit on the branch instead.Expected Behavior
I would expect it to find the latest commit hash for that branch and pull this. This is a common use case for testing and getting access to preview features.
Steps To Reproduce
my_branch
my_branch
dbt deps
my_branch
dbt clean
anddbt deps
dbt_packages
folder, note that the change you made in your branch is not reflected hereRelevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: