forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Extension enters duplicate data into local globalStorage sqlite db #17488
Copy link
Copy link
Labels
area-internalLabel for non-user facing issuesLabel for non-user facing issuesbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priorityregressionBug didn't exist in a previous releaseBug didn't exist in a previous releaseverifiedVerification succeededVerification succeeded
Milestone
Metadata
Metadata
Assignees
Labels
area-internalLabel for non-user facing issuesLabel for non-user facing issuesbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priorityIssue identified as high-priorityregressionBug didn't exist in a previous releaseBug didn't exist in a previous releaseverifiedVerification succeededVerification succeeded
Type
Fields
Give feedbackNo fields configured for issues without a type.
Environment data
1.60.1v2021.9.1246542782Darwin x64 20.6.0pyenv)ms-python.pythonpython.languageServersetting:PylanceExpected behaviour
Extension does not fill the local
globalStoragesqlite db (Memento) with erroneous data and maintains a list of available python interpreters.When left unchecked this can lead to the extension host behaving in unexpected ways and it was difficult to diagnose without significant effort (see #17432 for original issue).
Actual behaviour
Each reload of a window causes
PYTHON_EXTENSION_GLOBAL_STORAGE_KEYSunder thems-python.pythonkey to grow. Under most circumstances the list of environments underneath is not refreshed, i.e environments that are no longer on the machine are still shown.This is a copy of the
ms-python.pythonkey before I managed to clear the cache by deleting the extension and going through the steps listed here:globalStorage.txt
Note: There are 712 matches to
INTERPRETERS_CACHEin that file.Steps to reproduce:
Unsure how to recreate the stale environments issue (seems cache related) but for the ever growing list of
PYTHON_EXTENSION_GLOBAL_STORAGE_KEYS:delete from ItemTable where key = 'ms-python.python';in~/Library/Application\ Support/Code/User/globalStorage/state.vscdb(mac).ms-python.pythonin the db.ms-python.pythonin the db (PYTHON_EXTENSION_GLOBAL_STORAGE_KEYSwill have grown in size and contain duplicate entries).Logs
Nothing of note is captured in the logs.