-
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
Dbt downloads directory same across different users #895
Comments
Thanks for the report @brian-bk! I think we're going to make it possible to override the temp dir in the I think that rather than trying to get really clever with temp dir creation, dbt should just let the user decide where the temporary dir should be, either with a profile config or a command line argument. I'm super happy to discuss, and keen to hear if you think this is an appropriate fix for your issue. |
At least for a git package, the project is cloned to Unless there's a plan to use the temp directory as a cache, to me it makes the most sense to create a temp directory that is removed after use. That's why I recommend mkdtemp, because you can create something like |
On Windows in GitBash |
Wanted to drop my own experiences with this issue as well- my team is running dbt from Jenkins and typically has multiple jobs running
and
Both of which (I think) are related to the same underlying issue of git running into permissions/concurrency problems. |
Thanks for the info @paulgraff! This is in our Stephen Girard milestone, which is in part focused on cleaning up the rough edges around |
Awesome, thanks @drewbanin! Would be happy to help test this out- definitely ping me 😄 Also, let me know if there are any other logs I can pull or tests I can run on my end to help with investigation. |
As of #1110, dbt uses the user's TEMP directory (via python's |
Issue
Dbt downloads temporary directory cannot be shared between users.
Issue description
The
dbt deps
command, creates a folder/tmp/dbt-downloads
if it needs to download anything. See deps.pyResults
If there are more than one users that may run dbt, the folder persists and is owned by whoever created it first. Later, if another user runs dbt and dbt needs to download something, it causes a permissions error and the second user cannot use dbt in that way.
System information
The output of
dbt --version
:Steps to reproduce
If you have a
packages.yml
withJust run
dbt deps
as one user and then a different user.I recommend using something along the lines of
tempfile.mkdtemp
instead, but of course there's so many ways this can be done.The text was updated successfully, but these errors were encountered: