Skip to content
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

Only create the packages-install-path / dbt_packages folder during dbt deps #9810

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240323-124558.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Only create the packages-install-path / dbt_packages folder during dbt deps
time: 2024-03-23T12:45:58.159017-06:00
custom:
Author: dbeatty10
Issue: 6985 9584
1 change: 0 additions & 1 deletion core/dbt/compilation.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def __init__(self, config) -> None:

def initialize(self):
make_directory(self.config.project_target_path)
make_directory(self.config.packages_install_path)

# creates a ModelContext which is converted to
# a dict for jinja rendering of SQL
Expand Down
7 changes: 7 additions & 0 deletions tests/functional/list/test_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ def project_config_update(self):
},
}

def test_packages_install_path_does_not_exist(self, project):
run_dbt(["list"])
packages_install_path = "dbt_packages"

# the packages-install-path should not be created by `dbt list`
assert not os.path.exists(packages_install_path)

def run_dbt_ls(self, args=None, expect_pass=True):
log_manager.stdout_console()
full_args = ["ls"]
Expand Down