AltimateAI / AltimateAI/vscode-dbt-power-user

Unable to parse manifest.json

Aperta
#1,579 0 commenti 0 reazioni 1 assegnatario Rivendicata da @mdesmet Vedi su GitHub
bug
Lingua principale
JavaScript
Stelle
585
Fork
121
Merge medio
5g 39m
PR unite (30g)
4

Descrizione

### Expected behavior

When my manifest gets rebuilt, the lineage should show up properly.

### Actual behavior

I'm running into issues where the extension's lineage feature isn't working - nothing gets displayed and the UI shows the "Please open a model, seed, etc." dialog even when I have a valid model open. Inspecting the logs (listed below) seems to indicate why the extension isn't picking up the model file in the lineage panel (manifest parsing failure).

### Steps To Reproduce

I'm not really sure how to reproduce, as I believe this is probably a race condition between the `dbt` command generating the `manifest.json` file and the extension trying to parse it. Essentially, you'll need a large dbt project running on a slow machine to reproduce it from what I'm gathering.

### Log output/Screenshots

Here's an example log from the extension output panel. As you can see, these errors popped up in rapid succession. All of this occurs while the underlying `dbt` commands are building the `manifest.json` file.

```
2025-02-13 06:55:23.459 [error] ManifestParser:Could not read manifest file at c:\...\target\manifest.json, ignoring error:Expected double-quoted property name in JSON at position 850931 (line 1 column 850932) []
2025-02-13 06:55:23.622 [error] ManifestParser:Could not read manifest file at c:\...\manifest.json, ignoring error:Expected ',' or '}' after property value in JSON at position 3549342 (line 1 column 3549343) []
2025-02-13 06:55:26.399 [error] ManifestParser:Could not read manifest file at c:\...\target\manifest.json, ignoring error:Expected ':' after property name in JSON at position 3145142 (line 1 column 3145143) []
```

As mentioned, it seems like the extension is trying to read the manifest prior to it being fully written to disk. I'm unfortunately stuck running this on remote machine that has pretty limited system resources, despite this project being very large and complex (500+ models, dozens of source databases, etc.), so I imagine that has something to do with the issue.

I feel like a possibly "easy" solution would be to allow the user to trigger a "re-read" of the manifest manually at some point (or refresh the cache in the extension memory, if I'm understanding the code correctly).

### Operating System

Windows Server 2022

### dbt version

1.8.9

### dbt Adapter

dbt-sqlserver

### dbt Power User version

0.53.0

### Are you willing to submit PR?

- [ ] Yes I am willing to submit a PR!

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.