Repository navigation
Duplicate globalStorage data PYTHON_GLOBAL_STORAGE_KEYS #21635
Copy link
Copy link
Closed
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 bugverifiedVerification succeededVerification succeeded
Milestone
Description
Activity
- addedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Jul 14, 2023 - assigned and unassigned
on Jul 17, 2023 - addedbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugarea-internalLabel for non-user facing issuesLabel for non-user facing issuesneeds PRReady to be worked onReady to be worked onand removedtriage-neededNeeds assignment to the proper sub-teamNeeds assignment to the proper sub-team
on Jul 17, 2023 - added a commit that references this issue
on Jul 17, 2023 - addedverification-steps-neededSteps to verify are needed for verificationSteps to verify are needed for verification
on Jul 27, 2023 - removedverification-steps-neededSteps to verify are needed for verificationSteps to verify are needed for verification
on Jul 27, 2023 Verification steps are mentioned in the comment above.
- locked as resolved and limited conversation to collaborators
on Aug 27, 2023
Metadata
Metadata
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 bugverifiedVerification succeededVerification succeeded

Type: Bug
Behaviour
Expected vs. Actual
Restarting the extension by restarting the extension host sometimes leads to duplicated entries in the
globalStorage. The field that is affected is thePYTHON_GLOBAL_STORAGE_KEYSthat contains an array of key-value pairs.The expectation would be no duplicated data in the array, where newly inserted values replace old values with the same key.
I'm well aware this is a 100% duplicate of #17488, but the issue has been locked. The issue has been originally fixed in #17627, but the bug has resurfaced a few months later in #19163.
The bug is being triggered by calling
getGlobalStoragewith adefaultValuethat cannot be compared using===. This happens here.Steps to reproduce:
Follow the instructions of #17488
Diagnostic data
python.languageServersetting: DefaultOutput for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)User Settings
Extension version: 2023.12.0
VS Code version: Code 1.80.1 (74f6148eb9ea00507ec113ec51c489d6ffb4b771, 2023-07-12T17:22:07.651Z)
OS version: Windows_NT x64 10.0.22621
Modes: