microsoft / microsoft/vscode-remote-release

Better handle remote linux-based OSs that do not follow FHS

Open
#9,855 4 comments 14 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • VSCode Version: 1.89.0
  • Local OS Version: Windows 10 22H2
  • Remote OS Version: NixOS master (2024-05-05)
  • Remote Extension/Connection Type: ?

The upgrade from Remote-SSH v0.110.0 to v0.110.1 made it especially hard to use Remote-SSH with a NixOS remote host.

As background, the node binary that Remote-SSH downloads to the Linux host does not work on NixOS because NixOS does not have an FHS environment (i.e. with /usr/lib), so NixOS users must either patchelf or replace the node binary with one of the same major version.

With v0.110.0 (I think...) and earlier, if the node binary failed to run, the server downloader on the remote host would stop, vscode would pop up a modal error dialog, and NixOS users could run a script to replace the node binary.

With v0.110.1, if the node binary fails to run, the server downloader removes the ~/.vscode-server/cli/servers/Stable-b58957e67ee1e712cebf466b995adf4c5307b2bd.staging directory and tries to download again in an apparent infinite loop. This makes it much harder to patch or replace the node binary with one that works on NixOS. The infinite loop is bad for other reasons: with enough remote projects open, the repeated downloading can saturate a gigabit of downstream.

Steps to Reproduce:

  1. Install Remote-SSH v0.110.1
  2. Connect to a remote host running NixOS (any version)
  3. Observe continuous failure to start node and nonstop downloading of the server component

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 the Remote-SSH v0.110.1 connection against a NixOS host and inspect the server downloader behavior around the failing node binary and the ~/.vscode-server/cli/servers/...staging directory. Done means a failed node launch does not trigger an apparent infinite download loop and the existing recovery workflow remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
nixos, node.js
Domain
devops, operating-systems
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.