-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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/dbt deps tarball #4689
Feature/dbt deps tarball #4689
Conversation
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
@cla-bot check |
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
The cla-bot has been summoned, and re-checked this pull request! |
@timle2 thanks for opening up the PR with your new username! I've double checked and you did indeed sign the CLA. We have your username listed in the correct format. Looks like you may need to configure with your email to get our bot to process it.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
3 similar comments
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
Issues referenced no longer apply to revision 3 - leaving for history
✅ Switched all the logging over to the Events / fire_event.
✅ Moved over to properly defined exceptions. For the most part leveraging dbt.exceptions.DependencyException.
|
I agree that this is rare, but it does happen. The user will still find out the tar file is invalid if that is indeed the issue and not a transmission error we could recover from. This will be rare but worth protecting against. In dbt Cloud deps are installed every time a job runs so we want to ensure if there is a transmission error we can recover from with a simple retry, we do so as not to fail an entire job. Unrelated: You'll want to pull in the latest on the main branch as we've added some auto formatting/checking and that is why you have a failing test. You can read more about it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great progress! I know you're not done yet but I've left a few comments to change course a bit. Let me know if you have any questions!
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
1 similar comment
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
57c4659
to
cc74085
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Tim Leonard.
|
core/dbt/deps/base.py
Outdated
def _install(self, project, renderer): | ||
metadata = self.fetch_metadata(project, renderer) | ||
|
||
tar_name = "{}.{}.tar.gz".format(self.package, self.version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor detail: We prefer using the more modern f-string style python string formatting for new commits to dbt-core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Ian - I've changed it over to f-string with 8787ba4
core/dbt/deps/base.py
Outdated
metadata = self.fetch_metadata(project, renderer) | ||
|
||
tar_name = "{}.{}.tar.gz".format(self.package, self.version) | ||
tar_path = os.path.realpath(os.path.join(get_downloads_path(), tar_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor detail: We're trying to avoid using os.path
for new commits to dbt-core (preferring Pathlib instead). THis is due to the many odd caveats when running in non-posix environments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is refactored from [core/dbt/deps/registry](https://github.com/dbt-labs/dbt-core/blob/16f529e1d4e067bdbb6a659a622bead442f24b4e/core/dbt/deps/registry.py#L62)
. I'm not certain it's my place to be doing this os.path -> pathlib conversion, since I'm far from the expert on downstream effects on registry.py
. But took a stab with b06a662, and we can revert if you change your mind on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the few mentioned minor details.
Edit, removed approval since this was tagged as language-- @emmyoop's got you covered (it'd be nice to fix the f-strings and pathlib bits though)
'tarball' as version so that the temp files format nicely: [tempfile_location]/dbt_utils_2..tar.gz # old vs [tempfile_location]/dbt_utils_1.tarball.tar.gz # current
Changes look great @timle2! Just left one minor comment to lowercase "tarball" in the output! |
@timle2 we'll do some investigation and troubleshooting on our end for the two CI tests that aren't passing:
|
👍 After investigation, we are good from the perspective of CI tests. JustificationConfirmed with @emmyoop and @stu-k that The windows-latest |
Thanks for this Doug! 🙏 |
@emmyoop I think we are complete on the PR. Lmk if there is anything needed from me before Merge! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timle2 thank you again for all your work (and persistence) on this! This is such a great community contribution! We'll be including it in the 1.4 release!
Amazing! Thanks to you as well for your patience and guiding me through all the first time contributor stuff. Looking forward to making some more (and much smoother) contributions in the future! |
Nice work team !! |
resolves #4205
add new dbt.deps type: url to internally hosted tarball #420
Continued from
#4220
Revision 3 added Nov 6 2022
Proposed solution for feature request 4205
Description
Enable direct linking to tarball urls in
packages.yml
, for example:Rational:
Sketching out doc changes here:
https://github.com/timle2/docs.getdbt.com/blob/dbt-docs-tarball-package-updates/website/docs/docs/building-a-dbt-project/package-management.md#tar-files
Checklist
changie new
to create a changelog entry, or docs changes are not required/relevant for this PRdbt deps
withinpackages.yml
docs.getdbt.com#2474