Skip to content

Duplicate globalStorage data PYTHON_GLOBAL_STORAGE_KEYS #21635

Closed

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
    triage-needed
    on Jul 14, 2023
  2. added
    bug
    area-internal
    needs PR
    and removed
    triage-needed
    on Jul 17, 2023
  3. removed
    needs PR
    on Jul 17, 2023
  4. 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.

  5. added
    verification-steps-needed
    on Jul 27, 2023
  6. removed
    verification-steps-needed
    on Jul 27, 2023
  7. karrtikr commented on Jul 27, 2023

    @karrtikr

    Verification steps are mentioned in the comment above.

  8. 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-internalbugverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions