From 250b25b4cd3ff5baeadb80f7c1d1b78eacb1d4f5 Mon Sep 17 00:00:00 2001 From: anandgupta42 <93243293+anandgupta42@users.noreply.github.com> Date: Mon, 19 May 2025 08:02:24 -0700 Subject: [PATCH] fix: refresh config on profile change --- src/dbt_client/dbtCoreIntegration.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dbt_client/dbtCoreIntegration.ts b/src/dbt_client/dbtCoreIntegration.ts index 2bd5f7179..6876eae7f 100644 --- a/src/dbt_client/dbtCoreIntegration.ts +++ b/src/dbt_client/dbtCoreIntegration.ts @@ -492,10 +492,11 @@ export class DBTCoreProjectIntegration ); this.disposables.push( dbtProfileWatcher, - // when the project config changes we need to re-init the dbt project - ...setupWatcherHandler(dbtProfileWatcher, () => - this.rebuildManifest(), - ), + // when the profile changes we need to refresh the project configuration + ...setupWatcherHandler(dbtProfileWatcher, async () => { + await this.refreshProjectConfig(); + await this.rebuildManifest(); + }), ); } await this.createPythonDbtProject(this.python);