-
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
Fix dbt deps issues (#778 #994 #895) #1110
Conversation
109c24a
to
24a4224
Compare
4532425
to
af52ebf
Compare
docker: &py36 | ||
- image: python:3.6 | ||
docker: &containers | ||
- image: fishtownjacob/test-container |
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.
is this built by Dockerfile
in this repo?
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.
Yeah. I use this gross and lame shell script to do it:
#!/bin/bash
set -xeuo pipefail
commit_message="$1"
shift
if [[ -z ${commit_message} ]]; then
echo 'no commit message'
exit 1
fi
docker build --tag 'test-container:latest' .
container_id="$(docker run -it test-container:latest hostname | tr -d '[[:space:]]')"
docker commit -a 'Jacob Beck <jake@fishtownanalytics.com>' -m "${commit_message}" ${container_id} test-container
docker tag test-container:latest fishtownjacob/test-container:latest
docker push fishtownjacob/test-container:latest
…s about what went wrong on error
…emporary downloads directory
af52ebf
to
412b165
Compare
This looks really great @beckjake! Can you think of a good way to show a more obvious error message if
Ideally, I think we'd show:
^ We can make a section about the requirements for I'm a little confused that you're seeing the Username/Password prompt here:
I couldn't reproduce that locally -- do you think it's a git version thing? Or something else? I'll give this some spins on a Windows machine, but this is looking pretty good to me! |
for the missing git error, I can easily change it to this:
Which is what you suggested but with order reversed. Is that ok? I think the password prompt is a global git settings thing, or maybe version-dependent. it happens to me a lot when cloning a private repository from github via |
Drew asked me to test this out on Windows, here are the results: https://gist.github.com/atharvai/a302f1777a1f5b0202dffca937cb8de3 Summary: If the |
Thanks @atharvai! This is super helpful :) |
With that most recent push I believe it is now fixed. I tested on Windows with an old drive I found, and cross drive moves from both temp directories and explicit DBT_DOWNLOADS_DIR settings are working as they should. |
I tested the latest commit and can confirm all is good! Alternatively, set this log line to print full path
|
Fix some issues around dbt deps.
I think this fixes #778, fixes #994, fixes #895 - some of those are sort of judgement calls
Behavior after this PR
git
is not available, dbt is more helpful nowUses
shutil.move
instead ofos.rename
to move things out of the download directory, to handle the cross-drive issueBy default, downloads go to a temp directory
dbt-downloads-xxxxx
wherexxxxx
is some random stuff, created bytempfile.mkdtemp
that is removed viashutil.rmtree
after a successful run. This should resolve the concurrent users issue. Users can override this behavior to download to a fixed directory usingDBT_DOWNLOADS_DIR
, in which case dbt will notshutil.rmtree
the directory.dbt no longer ignores return codes and instead raises exceptions that have stderr/stdout
More explicitly log what failed and where on permissions-related execution failures, this should be especially more helpful on windows