vscode-dbt-power-user
vscode-dbt-power-user copied to clipboard
Documentation Editor does not release lock on DuckDB file
Expected behavior
After using the Documentation Editor, dbt commands and database access should succeed.
Actual behavior
Commands fail with IO error (see below), and the database cannot be accessed until the extension or window is restarted.
When using dbt-duckdb, the documentation editor retains the connection/puts a lock on the .duckdb file, disabling all other interactions with the database (such as dbt run, or attempting to open the database in another program)- even some features within the documentation editor fail, e.g. auto-populating an 'accepted_values' test with unique values from the database.
Behaviour/error is similar to that described in issue #1184
Steps To Reproduce
- Create dbt project with the dbt-duckdb adapter and the database location within project directory
- Define a source and a model (e.g. use an arbitrary csv)
- Run the model
- Open documentation editor
- Next to 'Columns' click 'sync with database'
- Re-run the model; fails with IO error
Log output/Screenshots
Runtime Error
IO Error: File is already open in
C:\Users\<username>\AppData\Local\miniforge3\envs\<envname>\pythonw.exe (PID 18696)
Operating System
Microsoft Windows [Version 10.0.26100.3476]
dbt version
1.9.3
dbt Adapter
dbt-duckdb v1.9.2
dbt Power User version
0.55.13
Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
@killickm is this still an issue?
@anandgupta42 checked just now, yes, still an issue. Currently using Power User for dbt v 0.57.0