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

fix: logs for lineage error #1517

Merged
merged 2 commits into from
Dec 10, 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
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
Loading