Skip to content

Commit

Permalink
fix: logs for lineage error (#1517)
Browse files Browse the repository at this point in the history
* fix: logs for lineage error

* chore: extra log
  • Loading branch information
saravmajestic authored Dec 10, 2024
1 parent f9042e7 commit 99a09f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/manifest/dbtWorkspaceFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions src/webview_provider/newLineagePanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" };
}

Expand All @@ -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(),
Expand All @@ -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(),
Expand Down

0 comments on commit 99a09f7

Please sign in to comment.