Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code data about a previously opened workspace is cached in the browser when switching workspaces #22338

Closed
cgruver opened this issue Jun 30, 2023 · 1 comment
Assignees
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.

Comments

@cgruver
Copy link

cgruver commented Jun 30, 2023

Describe the bug

When switching workspaces, or deleting and re-creating a workspace, data from previously opened workspaces is still cached in the browser and used by VS Code.

See the below screenshot:

Screenshot 2023-06-30 at 7 36 03 AM

If I click on any of those links under Recent, I will get an error because those are reference to code-workspaces, files, and folders from other Che Workspaces.

Potentially related to: #22289

Che version

7.69

Steps to reproduce

  1. Open a Che Workspace with VS Code as the editor (Don't know if IntelliJ is impacted)
  2. Open files, folders, or a code-workspace
  3. Close the Che Workspace
  4. Open a different Che Workspace
  5. Observe that the Recent list includes items from the closed Che Workspace.

Expected behavior

Cache is not retained after a workspace is closed.

Note: This expected behavior may also have negative UX impacts... There may be some level of caching needed for a good UX.

Perhaps, cache should be workspace unique, and deleted if a workspace is deleted...

Runtime

OpenShift

Screenshots

No response

Installation method

OperatorHub

Environment

macOS

Eclipse Che Logs

No response

Additional context

No response

@cgruver cgruver added the kind/bug Outline of a bug - must adhere to the bug report template. label Jun 30, 2023
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Jun 30, 2023
@azatsarynnyy
Copy link
Member

It looks like we're facing this problem again.
IIRC, previously, DevWorkspace ID was part of a workspace URL, so this solution worked well for Che. Now, the DevWorkspace's name is part of the URL instead, but not ID anymore, we need to adapt Che-Code to this change.

We have the DEVWORKSPACE_ID environment variable. But we can't read it directly from VS Code Core.
To fix this, we can try to pass DEVWORKSPACE_ID through the workbenchWebConfiguration from the backend to frontend to read it in the Workbench.

@azatsarynnyy azatsarynnyy added severity/P1 Has a major impact to usage or development of the system. area/editor/vscode Issues related to the Code OSS editor of Che and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Jul 3, 2023
@vitaliy-guliy vitaliy-guliy self-assigned this Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/vscode Issues related to the Code OSS editor of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

4 participants