-
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
Deps lock by justbldwn #8408
Merged
Merged
Deps lock by justbldwn #8408
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
also leave dbt deps as just a new click group
change deps command to deps install
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #8408 +/- ##
==========================================
- Coverage 86.54% 86.43% -0.11%
==========================================
Files 176 176
Lines 25856 26009 +153
==========================================
+ Hits 22376 22481 +105
- Misses 3480 3528 +48
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
MichelleArk
reviewed
Oct 6, 2023
MichelleArk
reviewed
Oct 6, 2023
MichelleArk
reviewed
Oct 6, 2023
MichelleArk
reviewed
Oct 6, 2023
MichelleArk
reviewed
Oct 6, 2023
MichelleArk
reviewed
Oct 6, 2023
MichelleArk
approved these changes
Oct 9, 2023
Opened a new issue in dbt-labs/docs.getdbt.com: dbt-labs/docs.getdbt.com#4235 |
3 tasks
1 task
5 tasks
3 tasks
dbeatty10
added a commit
to dbt-labs/docs.getdbt.com
that referenced
this pull request
Nov 15, 2023
[Preview](https://docs-getdbt-com-git-dbeatty-fix-dbt-deps-add-package-dbt-labs.vercel.app/reference/commands/deps) ## What are you changing in this pull request and why? Fixing the code examples per dbt-labs/dbt-core#9076 by using test examples from dbt-labs/dbt-core#8408 ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) and [About versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version) so my content adheres to these guidelines. - [x] I've checked that the code examples work - [x] I've confirmed that the preview renders correctly
This was referenced Dec 5, 2023
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #6643
This is work from @justbldwn. original PR at #6735.
We(core team) are working on getting it up-to-date with the changes made recently about dependencies.yml and updating some small things to get it into ready to merge state.
We would like this to be a non breaking change, which means
dbt deps
will behave the same(-ish, caveat below). With this in mind, considering the constrain of how click commands are structured, also talked to Jerco about the philosophy of CLI commands of dbt-core, we are updating thedbt deps add
anddbt deps lock
to justdbt deps --add
anddbt deps --lock
. @justbldwn let us know if you feel strongly about it should be sub command vs a flag.The caveat with the current implementation:
Previously, running
dbt deps
will upgrade packages is version is specified as range and new version come out. For example, local package A is version 0.1.1, specified version [> 0.1.0, < 0.2.0]. Latest version is 0.1.5, running deps previously will install 0.1.5, but now with the lock file approach it will actually still install 0.1.1. @dbeatty10 how you feel about it?Description of behavior
dbt deps
first time will generatepackage-lock.yml
that contains all resolved packagesdbt deps
with package spec indepenedencies.yml
orpackages.yml
not updated, dbt-core will just install frompackage-lock.yml
.(hence the caveat above)--add
flag, when specified, along with--package
and--version
, dbt-core will try to update the package spec and run deps depending on whether--dry-run
is specified. The original PR provide better examples. Remember--dry-run
is not a flag and you do not need to say--dry-run True
, just--dry-run
.--update
which can be used when you have packaged specified in version range and want to try to update to the new package available. Previous Deps behavior is actuallydbt deps --update
after this change.--lock
which will generate the new lock file but not actually install any packages.TODO for this PR
Add logic to store the hash of the previous defined packages there to automatically run deps when content packages got updated.
Add a
--upgrade
flag to upgrade the locks file if user specified version bound and there's new versions releasedAdd a
--lock
flag to only generate a new lock file without actually installmake sure
--add
works withdependencies.yml
reorganize lock and add as args so
deps
will not be a breaking change, and we keep the consistent way of CLI commands where the commands are mostly verbs, and we alter the behavior of command with flags.reformat the saved yml file
confirm how many times we will have to pull down a git repo when running deps with packages-lock not exist, and determine optimizing/not (Behavior here is the same as before, it will pull down git packages during resolution).
fix unittest
TODO for opening follow up PR
There's a set of optimizations mentioned in #6643 that is enabled by the new lock yml. We should open follow up PRs about it
Checklist