microsoft / microsoft/vscode-remote-release

[Remote-SSH Bug]: Include port in data folder cache name

Open
#10,234 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug ssh
Dominant language
Dockerfile
Stars
4.2k
Forks
469
Avg merge
1d 1h
Merged PRs (30d)
1

Description

VSCode Version: 1.92.1 (Universal) Commit: eaa41d57266683296de7d118f574d0c2652e1fc4
Local OS Version: Darwin arm64 23.4.0

Setup: We have server machines that have docker instances on it. When we create docker instance, we create port on server machine where SSH connection to docker instance lives. For example: my-server:12345, this connects to docker image on server named my-server.
Problem: If I connect to multiple docker instances on the same server, I get terminal from the first docker instance I was connected to.
Investigation: It boils down to cache that is created within Remote-SSH extension.
globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host- name refers to machine (my-server) that is hashed with fast1a32hex and since we are sharing same server to represent multiple machines using different port, this cache is bad.
Mitigation: When opening Visual Studio Code session, we would delete data.json file located in mentioned cache directory. This doesn't solve when "Developer: Reload Window" is called as it we again need to delete data.json file...

Is there a way to disable caching?
Or better solution would be to also include port in caching path....

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing connections to multiple Docker instances on one server through different ports, then trace how the Remote-SSH extension creates the globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host cache and its data.json file. Done means sessions using different ports no longer reuse the same cached data, including after Developer: Reload Window.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, vscode
Domain
devtools, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.