From dd6443873435806884e02252cce90073b197a9be Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Sat, 23 Mar 2024 12:46:17 -0600 Subject: [PATCH 1/3] Changelog entry --- .changes/unreleased/Fixes-20240323-124558.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixes-20240323-124558.yaml diff --git a/.changes/unreleased/Fixes-20240323-124558.yaml b/.changes/unreleased/Fixes-20240323-124558.yaml new file mode 100644 index 00000000000..b36173325ba --- /dev/null +++ b/.changes/unreleased/Fixes-20240323-124558.yaml @@ -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 From d483952f1888d126962613ba01d84c1ffcbc3e70 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Sat, 23 Mar 2024 12:47:01 -0600 Subject: [PATCH 2/3] The packages-install-path should not be created by `dbt list` --- tests/functional/list/test_list.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/functional/list/test_list.py b/tests/functional/list/test_list.py index b636bf20d39..4eb8cb8e2f9 100644 --- a/tests/functional/list/test_list.py +++ b/tests/functional/list/test_list.py @@ -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"] From 24d43d3037cf696e386bd7ca8d64b3a363800bf2 Mon Sep 17 00:00:00 2001 From: Doug Beatty Date: Sat, 23 Mar 2024 13:01:14 -0600 Subject: [PATCH 3/3] Only create packages-install-path during `dbt deps` --- core/dbt/compilation.py | 1 - 1 file changed, 1 deletion(-) diff --git a/core/dbt/compilation.py b/core/dbt/compilation.py index 388713842ed..09695fc59d7 100644 --- a/core/dbt/compilation.py +++ b/core/dbt/compilation.py @@ -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