microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 276 forks source link

Support `code-exploration` #10202

Open meganrogge opened 2 weeks ago

meganrogge commented 2 weeks ago

Testing microsoft/vscode#226399

  1. Remote SSH: Connect to Host (I just used localhost)
  2. It fails with /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e don't exist when it should be looking for the code-exploration build.

Full output from Remote - SSH below:

[07:21:31.594] Log Level: 2
[07:21:31.612] SSH Resolver called for "ssh-remote+localhost", attempt 1
[07:21:31.613] "remote.SSH.useLocalServer": true
[07:21:31.613] "remote.SSH.useExecServer": true
[07:21:31.614] "remote.SSH.path": undefined
[07:21:31.614] "remote.SSH.configFile": undefined
[07:21:31.614] "remote.SSH.useFlock": true
[07:21:31.614] "remote.SSH.lockfilesInTmp": false
[07:21:31.614] "remote.SSH.localServerDownload": auto
[07:21:31.614] "remote.SSH.remoteServerListenOnSocket": false
[07:21:31.615] "remote.SSH.showLoginTerminal": false
[07:21:31.615] "remote.SSH.defaultExtensions": []
[07:21:31.615] "remote.SSH.loglevel": 2
[07:21:31.615] "remote.SSH.enableDynamicForwarding": true
[07:21:31.616] "remote.SSH.enableRemoteCommand": false
[07:21:31.616] "remote.SSH.serverPickPortsFromRange": {}
[07:21:31.616] "remote.SSH.serverInstallPath": {}
[07:21:31.616] "remote.SSH.permitPtyAllocation": false
[07:21:31.617] "remote.SSH.preferredLocalPortRange: undefined
[07:21:31.617] "remote.SSH.useCurlAndWgetConfigurationFiles: false
[07:21:31.624] VS Code version: 1.93.0-exploration
[07:21:31.624] Remote-SSH version: remote-ssh@0.114.2024082315
[07:21:31.624] darwin x64
[07:21:31.625] SSH Resolver called for host: localhost
[07:21:31.626] Setting up SSH remote "localhost"
[07:21:31.629] Acquiring local install lock: /var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode-remote-ssh-0150773a-install.lock
[07:21:31.631] Looking for existing server data file at /Users/meganrogge/Library/Application Support/Code - Exploration/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0150773a-ff7a154d5e5e9034914f0466420f0f1407f0c95e-0.114.2024082315-es/data.json
[07:21:31.631] No existing data file
[07:21:31.632] Using commit id "ff7a154d5e5e9034914f0466420f0f1407f0c95e" and quality "exploration" for server
[07:21:31.634] Script variables:
 {
  "InstallExitCode.24": "AlreadyInProgress",
  "InstallExitCode.25": "ServerDownloadFailed",
  "InstallExitCode.26": "NoDownloaderAvailable",
  "InstallExitCode.27": "UnsupportedArch",
  "InstallExitCode.28": "StatusCheckFailed",
  "InstallExitCode.29": "NeedInsidersArch",
  "InstallExitCode.30": "NoDownloaderAvailableForStatusCheck",
  "InstallExitCode.31": "ServerTransferFailed",
  "InstallExitCode.32": "ServerFailedToStart",
  "InstallExitCode.33": "NeedInsidersWindows",
  "InstallExitCode.34": "CreateInstallDirFailed",
  "InstallExitCode.35": "UnsupportedPlatform",
  "InstallExitCode.36": "ServerTerminatedCVE20201416",
  "InstallExitCode.37": "UnpackFailed",
  "InstallExitCode.AlreadyInProgress": "24",
  "InstallExitCode.ServerDownloadFailed": "25",
  "InstallExitCode.NoDownloaderAvailable": "26",
  "InstallExitCode.NoDownloaderAvailableForStatusCheck": "30",
  "InstallExitCode.UnsupportedArch": "27",
  "InstallExitCode.StatusCheckFailed": "28",
  "InstallExitCode.NeedInsidersArch": "29",
  "InstallExitCode.ServerTransferFailed": "31",
  "InstallExitCode.ServerFailedToStart": "32",
  "InstallExitCode.NeedInsidersWindows": "33",
  "InstallExitCode.CreateInstallDirFailed": "34",
  "InstallExitCode.UnsupportedPlatform": "35",
  "InstallExitCode.ServerTerminatedCVE20201416": "36",
  "InstallExitCode.UnpackFailed": "37",
  "InstallUnpackCode.Success": "success",
  "InstallUnpackCode.Error": "error",
  "InstallUnpackCode.MissingFiles": "missingFiles",
  "uuid": "4049e935236a",
  "startMarker": "4049e935236a: running",
  "commitId": "ff7a154d5e5e9034914f0466420f0f1407f0c95e",
  "quality": "exploration",
  "token": "047d4eda-9704-4b10-abd8-80306d9d68e5",
  "vscodeAgentFolder": "$HOME/.vscode-server-exploration",
  "allowClientDownload": "1",
  "forceClientDownload": "0",
  "cliNameInArchive": "code-insiders",
  "ignoreWgetConfigFlag": " --no-config ",
  "ignoreCurlConfigFlag": " --disable ",
  "wgetTriesSegment": "--tries=1",
  "listenArgs": "--on-host=127.0.0.1 --on-port",
  "printArgs": "echo -e SSH_AUTH_SOCK==$SSH_AUTH_SOCK==\\nDISPLAY==$DISPLAY==",
  "getDownloadServerStartTrigger": "4049e935236a:trigger_server_download",
  "getDownloadServerEndTrigger": "4049e935236a:trigger_server_download_end",
  "getProgressDownloading": "4049e935236a%%1%%",
  "getProgressInstalling": "4049e935236a%%2%%"
}
[07:21:31.637] Install and start server if needed
[07:21:31.645] PATH: /Users/meganrogge/.nvm/versions/node/v20.13.1/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/node_modules:/usr/local/lib/node_modules/vsce/vsce:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
[07:21:31.646] Checking ssh with "ssh -V"
[07:21:31.657] > OpenSSH_9.7p1, LibreSSL 3.3.6

[07:21:31.661] askpass server listening on /var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode-ssh-askpass-68c7c43f2b71c3df9ec34c0baf00461fd605c2f2.sock
[07:21:31.662] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode-ssh-askpass-2760ce768b7aae75f73407c1866c084c348c7a13.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","51827","-o","ConnectTimeout=15","localhost"],"serverDataFolderName":".vscode-server-exploration","dataFilePath":"/Users/meganrogge/Library/Application Support/Code - Exploration/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-0150773a-ff7a154d5e5e9034914f0466420f0f1407f0c95e-0.114.2024082315-es/data.json"}
[07:21:31.663] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.qLqNFu3hLx/Listeners","SHELL":"/bin/bash","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/private/var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/AppTranslocation/637C3302-B377-48E5-B041-401DA6672846/d/Visual Studio Code - Exploration.app/Contents/Frameworks/Code - Exploration Helper (Plugin).app/Contents/MacOS/Code - Exploration Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode-ssh-askpass-68c7c43f2b71c3df9ec34c0baf00461fd605c2f2.sock"}
[07:21:31.664] Spawned 54171
[07:21:31.841] > local-server-1> Running ssh connection command: ssh -v -T -D 51827 -o ConnectTimeout=15 localhost
[07:21:31.845] > local-server-1> Spawned ssh, pid=54177
[07:21:31.852] stderr> OpenSSH_9.7p1, LibreSSL 3.3.6
[07:21:31.922] stderr> debug1: Server host key: ssh-ed25519 SHA256:9CQPnm70XV5H1Y9rUQ65cWA3hqHP6lw3SaNabFdki/I
[07:21:32.124] Got askpass request: {"request":" Enter passphrase for key '/Users/meganrogge/.ssh/id_ed25519': "}
[07:21:32.125] Detected passphrase message
[07:21:32.127] Listening for interwindow password on /var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode-ssh-askpass-ca56975306ed362d28df2cdec40e4a61ad44dac8.sock
[07:21:32.127] Writing password prompt to globalState
[07:21:34.937] Got passphrase response
[07:21:34.938] Interactor gave response: **********
[07:21:34.938] Cleaning up other-window auth server
[07:21:35.173] stderr> Authenticated to localhost ([::1]:22) using "publickey".
[07:21:35.192] > ready: 4049e935236a
[07:21:35.196] > Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:00 PDT 2024; root:xnu-10063.141.2~1/RELEASE_X86_64
[07:21:35.196] Platform: macOS
[07:21:35.197] > /bin/bash
[07:21:35.197] Shell: bash
[07:21:35.197] Creating bash subshell inside "bash"
[07:21:35.202] > bash version:  3.2.57(1)-release
[07:21:35.210] > 4049e935236a: running
[07:21:35.246] > Installing to /Users/meganrogge/.vscode-server-exploration...
[07:21:35.254] > 4049e935236a%%1%%
[07:21:35.272] > Downloading with curl
[07:21:35.289] stderr>   % Total    % Received % Xferd  Average Speed   Time    Time     Time  C
[07:21:35.289] stderr> urrent
[07:21:35.289] stderr>                                  Dload  Upload   Total   Spent    Left  Speed
[07:21:35.289] stderr>   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[07:21:35.360] stderr> 100   164  100   164    0     0   2298      0 --:--:-- --:--:-- --:--:--  2309
[07:21:35.552] stderr> 100 6473k  100 6473k    0     0  24.0M      0 --:--:-- --:--:-- --:--:-- 24.0M
[07:21:35.554] > Download complete
[07:21:35.568] > 4049e935236a%%2%%
> tar --version:
[07:21:35.576] > bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 
[07:21:35.637] stderr> mv: rename code-insiders to /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e: No such file or directory
[07:21:35.638] stderr> bash: line 283: /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e: No such file or directory
[07:21:35.639] > ERROR: /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e don't exist
> Trigger local server download
> 4049e935236a:trigger_server_download
> artifact==cli-darwin-x64==
> destFolder==/Users/meganrogge/.vscode-server-exploration==
> destFolder2==/vscode-cli-ff7a154d5e5e9034914f0466420f0f1407f0c95e.tar.gz==
> 4049e935236a:trigger_server_download_end
> Waiting for client to transfer server archive...
> Waiting for /Users/meganrogge/.vscode-server-exploration/vscode-cli-ff7a154d5e5e9034914f0466420f0f1407f0c95e.tar.gz.done and vscode-server.tar.gz to exist
[07:21:35.639] Got request to download on client for {"artifact":"cli-darwin-x64","destPath":"/Users/meganrogge/.vscode-server-exploration/vscode-cli-ff7a154d5e5e9034914f0466420f0f1407f0c95e.tar.gz"}
[07:21:35.640] server download URL: https://update.code.visualstudio.com/commit:ff7a154d5e5e9034914f0466420f0f1407f0c95e/cli-darwin-x64/exploration
[07:21:35.640] Downloading VS Code server locally...
[07:21:35.640] >  
[07:21:35.823] Downloaded VS Code server to /var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/264cacce-d733-4f93-bd9a-712f69b81d20
[07:21:35.824] Renamed VS Code server to /var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode_server_1724768495823/vscode-cli-ff7a154d5e5e9034914f0466420f0f1407f0c95e.tar.gz
[07:21:35.827] PATH: /Users/meganrogge/.nvm/versions/node/v20.13.1/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/lib/node_modules:/usr/local/lib/node_modules/vsce/vsce:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
[07:21:35.827] Checking ssh with "ssh -V"
[07:21:35.837] > OpenSSH_9.7p1, LibreSSL 3.3.6

[07:21:35.838] Testing scp with "scp"
[07:21:35.847] scp exited with code: 1
[07:21:35.847] Got stderr from scp: usage: scp [-346ABCOpqRrsTv] [-c cipher] [-D sftp_server_path] [-F ssh_config]
           [-i identity_file] [-J destination] [-l limit] [-o ssh_option]
           [-P port] [-S program] [-X sftp_option] source ... target
[07:21:35.848] Copying file to remote with scp -o ConnectTimeout=15 'vscode-cli-ff7a154d5e5e9034914f0466420f0f1407f0c95e.tar.gz' 'vscode-cli-ff7a154d5e5e9034914f0466420f0f1407f0c95e.tar.gz.done' localhost:'/Users/meganrogge/.vscode-server-exploration'
[07:21:35.848] Using cwd: file:///var/folders/z0/4rn5qgjs1nj6f4532y8qvzs40000gn/T/vscode_server_1724768495823
[07:21:36.101] > Enter passphrase for key '/Users/meganrogge/.ssh/id_ed25519': 
[07:21:36.102] Detected passphrase message
[07:21:38.532] Got passphrase response
[07:21:38.533] "Copy server to host" wrote data to terminal: "**********"
[07:21:38.555] > 
[07:21:38.644] >  
[07:21:38.798] > vscode-cli-ff7a154d5e5e9034914f0466420f0f1407   0%    0     0.0KB/s   --:-- ETA
[07:21:38.832] > vscode-cli-ff7a154d5e5e9034914f0466420f0f1407 100% 6473KB 184.5MB/s   00:00    
> vscode-cli-ff7a154d5e5e9034914f0466420f0f1407   0%    0     0.0KB/s   --:-- ETAvscode-cli-ff7a154d5e5e9034914f0466420f0f1407 100%    9    27.2KB/s   00:00    
[07:21:39.082] "Copy server to host" terminal command done
[07:21:39.082] User entered passphrase
[07:21:39.084] Passphrase was entered and ssh config entry was found - adding SSH key to agent
[07:21:39.085] Executing add-ssh-key:

INSTALL_SCRIPT=`mktemp`.sh
cat << 'EOF' > $INSTALL_SCRIPT
    # expand the key path to be absolute
    KEY="`echo `"
    echo SHELL-SCRIPT: KEY=$KEY
    echo SHELL-SCRIPT: adding key to ssh-agent
    ssh-add 
    if (( $? > 0 ))
    then
        echo 323ea9fc7d5f##5##
    fi
EOF

chmod +x $INSTALL_SCRIPT

/bin/bash -ilc $INSTALL_SCRIPT

[07:21:39.733] > SHELL-SCRIPT: KEY=
> SHELL-SCRIPT: adding key to ssh-agent
[07:21:39.742] > Enter passphrase for /Users/meganrogge/.ssh/id_rsa: 
[07:21:39.742] Detected passphrase message
[07:21:39.742] Got passphrase response
[07:21:39.743] "add-ssh-key" wrote data to terminal: "**********"
[07:21:39.759] > 
[07:21:39.943] > Identity added: /Users/meganrogge/.ssh/id_rsa (meganrogge@Megans-MacBook-Pro.local)
[07:21:40.130] > Identity added: /Users/meganrogge/.ssh/id_ed25519 (meganrogge@Megans-MacBook-Pro.local)
[07:21:40.375] "add-ssh-key" terminal command done
[07:21:41.648] > Found flag and server on host
[07:21:41.661] > 4049e935236a%%2%%
> tar --version:
[07:21:41.669] > bsdtar 3.5.3 - libarchive 3.5.3 zlib/1.2.12 liblzma/5.4.3 bz2lib/1.0.8 
[07:21:41.737] stderr> mv: rename code-insiders to /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e: No such file or directory
[07:21:41.738] stderr> bash: line 283: /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e: No such file or directory
[07:21:41.738] > ERROR: /Users/meganrogge/.vscode-server-exploration/code-insiders-ff7a154d5e5e9034914f0466420f0f1407f0c95e don't exist
> Already attempted local download, failing
> 4049e935236a: start
> exitCode==37==
> listeningOn====
> osReleaseId==Darwin==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/tmp==
> platform==macOS==
> unpackResult==missingFiles==
> didLocalDownload==1==
> downloadTime==0==
> installTime==0==
> serverStartTime====
[07:21:41.738] > execServerToken==111a1aaa-1111-1a11-aaa1-11111a1a11a1==
> 4049e935236a: end
[07:21:41.739] Received install output: 
exitCode==37==
listeningOn====
osReleaseId==Darwin==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/tmp==
platform==macOS==
unpackResult==missingFiles==
didLocalDownload==1==
downloadTime==0==
installTime==0==
serverStartTime====execServerToken==111a1aaa-1111-1a11-aaa1-11111a1a11a1==

[07:21:41.739] Terminating local server
[07:21:41.742] Resolver error: Error: Failed to install the VS Code Server
    at v.ServerInstallError (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:501296)
    at h (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:494847)
    at t.handleInstallOutput (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:496775)
    at e (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:553041)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:575207
    at async t.withShowDetailsEvent (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:578826)
    at async /Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:549746
    at async T (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:547797)
    at async t.resolveWithLocalServer (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:549286)
    at async k (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:572339)
    at async t.resolve (/Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:576237)
    at async /Users/meganrogge/.vscode-exploration/extensions/ms-vscode-remote.remote-ssh-0.114.2024082315/out/extension.js:2:844358
[07:21:41.747] ------

[07:21:41.750] Local server exit: 15
bpasero commented 2 weeks ago

From the logs, there seems to be hardcoded references to code-insiders, even though we are in code-exploration context, so I think this is missing to account for our "third" quality: exploration

roblourens commented 2 weeks ago

We're probably already reading the right quality from product.json, we just need to respect it to download the exploration cli.