microsoft / microsoft/vscode-pgsql
Deep refresh error: Failed to deep refresh: An item with the provided index does not exist
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 395
- Forks
- 33
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 3
Description
Describe the bug
Trying to refresh an object which already doesn't exist in DB results in an error.
To Reproduce
Steps to reproduce the behavior:
- Expand to a table in a db.
- Drop the table.
- Click the refresh icon on the table
- See the table has not disappeared and VS shows an error: "[9:37:09 PM] [ObjectExplorerService] [Error]: Deep refresh error: Failed to deep refresh: An item with the provided index does not exist"
Expected behavior
Try to refresh each root until a root that exists is found or go up to refreshing the whole connection.
BTW. The behavior seems to be different for columns and tables. If I click refresh on a column that is already deleted, I see no issue and the column disappears (see "getting children for node" on the screenshot). I go upwards and try to refresh the table which contained the column and get the error.
Screenshots
Click refresh on a table:
VS Code version
1.116.0
Extension Logs
Version: 1.20.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the table-refresh sequence in the ObjectExplorerService shown in the extension logs, then compare it with the reported column-refresh behavior. Trace how refresh handles a deleted table and verify that it searches upward for an existing root or refreshes the connection without the reported error, while removing the stale table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100