Skip to content

Duplicate globalStorage data PYTHON_GLOBAL_STORAGE_KEYS #21635

Description

@msujew

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 the PYTHON_GLOBAL_STORAGE_KEYS that 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 getGlobalStorage with a defaultValue that cannot be compared using ===. This happens here.

Steps to reproduce:

Follow the instructions of #17488

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.8
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Global
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Jedi"

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:

Activity

  1. added
    bugIssue identified by VS Code Team member as probable bug
    area-internalLabel for non-user facing issues
    needs PRReady to be worked on
    and removed
    triage-neededNeeds assignment to the proper sub-team
    on Jul 17, 2023
  2. karrtikr commented on Jul 25, 2023

    @karrtikr

    Fix should be out in the pre-release version of the extension, use the following to try it out:

    image

    Verification steps:

    Activate Python extension and verify Python logs do not contain any string similar to PYTHON_GLOBAL_STORAGE_KEYS when using default logging level.

  3. karrtikr commented on Jul 27, 2023

    @karrtikr

    Verification steps are mentioned in the comment above.

  4. locked as resolved and limited conversation to collaborators on Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-internalLabel for non-user facing issuesbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions