From 99a09f76610cac0aaa55bf20d0e99ce595cc41f9 Mon Sep 17 00:00:00 2001 From: Saravanan Date: Wed, 11 Dec 2024 01:04:27 +0530 Subject: [PATCH] fix: logs for lineage error (#1517) * fix: logs for lineage error * chore: extra log --- src/manifest/dbtWorkspaceFolder.ts | 3 +++ src/webview_provider/newLineagePanel.ts | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/manifest/dbtWorkspaceFolder.ts b/src/manifest/dbtWorkspaceFolder.ts index 00428a002..34bb6a2d8 100755 --- a/src/manifest/dbtWorkspaceFolder.ts +++ b/src/manifest/dbtWorkspaceFolder.ts @@ -82,11 +82,14 @@ export class DBTWorkspaceFolder implements Disposable { } async discoverProjects() { + // Ignore dbt_packages and venv/site-packages/dbt project folders + const excludePattern = "**/{dbt_packages,site-packages}"; const dbtProjectFiles = await workspace.findFiles( new RelativePattern( this.workspaceFolder, `**/${DBTProject.DBT_PROJECT_FILE}`, ), + new RelativePattern(this.workspaceFolder, excludePattern), ); this.dbtTerminal.info( "discoverProjects", diff --git a/src/webview_provider/newLineagePanel.ts b/src/webview_provider/newLineagePanel.ts index 7b4d38db6..ada8156f8 100644 --- a/src/webview_provider/newLineagePanel.ts +++ b/src/webview_provider/newLineagePanel.ts @@ -460,6 +460,11 @@ export class NewLineagePanel .getProject() ?.throwDiagnosticsErrorIfAvailable(); } catch (err) { + this.dbtTerminal.error( + "Lineage:getMissingLineageMessage", + (err as Error).message, + err, + ); return { message: (err as Error).message, type: "error" }; } @@ -476,6 +481,7 @@ export class NewLineagePanel const aiEnabled = this.altimate.enabled(); const event = this.queryManifestService.getEventByCurrentProject(); if (!event?.event) { + this.dbtTerminal.info("Lineage:getStartingNode", "No event found"); return { aiEnabled, missingLineageMessage: this.getMissingLineageMessage(), @@ -485,6 +491,10 @@ export class NewLineagePanel const tableName = this.getFilename(); const _node = nodeMetaMap.lookupByBaseName(tableName); if (!_node) { + this.dbtTerminal.info( + "Lineage:getStartingNode", + `No node found for ${tableName}`, + ); return { aiEnabled, missingLineageMessage: this.getMissingLineageMessage(),