Skip to content

exec-chaining: devcontainer on remote ssh - #2

Merged
MythreyaK merged 9 commits into
devfrom
exec-server
Sep 25, 2026
Merged

MythreyaK merged 9 commits into
devfrom
exec-server

Conversation

@MythreyaK

@MythreyaK MythreyaK commented Aug 30, 2026 •

Copy link
Copy Markdown
Owner

Adds support for devcontainers on remote ssh machines.

SSH extension counterpart is at jeanp413/open-remote-ssh#291.

To test, download the CI build and install the SSH extension from the linked PR.

Note: Merged, but ssh extension with exec-chaining support is required to test devcontainers on a remote host.

@MythreyaK
MythreyaK changed the base branch from main to dev August 30, 2026 22:22
@MythreyaK
MythreyaK force-pushed the exec-server branch 2 times, most recently from ba812b7 to cd181b0 Compare September 4, 2026 23:33
@MythreyaK MythreyaK added the enhancement New feature or request label Sep 4, 2026
- add localCtx and remoteCtx interfaces for local/remote
  spawn support
- misc code cleanup for spawn and run opts
Add `FsCtx` and `ExecCtx` over execServer and local
for a common runner interface over local and remote
contexts.

`RemoteExecCtx` wraps execServer. `LocalExecCtx` is just
a wrapper around `vscode.workspace.fs*` for filesystem ops
and native spawn when on a local machine.

On remote session (say ssh), `vscode.Uri` resolves files
correctly, but native spawn won't work. So explicitly
request execServer into `LocalExecCtx` for spawn when
on a remote.

All fs and exec/spawn ops now go through `LocalExecCtx`
and `RemoteExecCtx`.

Window reload/create now correctly appends chain when a
remote is detected.
- `getSettings` fetches remote machine's global
  settings through `execServer` when exec chaining
  because vscode's `getConfiguration` returns local
  global settings
- update tests / simplify a little
  skips all the async `getSettings` logic, since they
  always run with local ctx. remote is TODO.
- add `fmtErr` helper for `Error`
- command to open devcontainer.json config (`showDevcontainerFile`)
  file now opens it in the active workspace (say, in container)
  correctly, instead of attempting to open it on the host
- config watcher improvements:
  - extract config watcher to a cmd and reuse that
  - set up file watcher only after workspace is ready, using
    the previously added `onWorkspaceReady`
  - 500ms debounce to the file watcher
- tweak imports in commands.ts
- fix LocalExecCtx's kind. was incorrectly swapped
- fix shared `TextDecoder` in `spawnRemote`. `stdout`
  and `stderr` now have their own decoders
- `getRemoteserverConfiguration` fixes:
  - pass hostname instead of authority to `findSSHServerInstallPath`
  - SSHDestination.parse takes in just the encoded bit, without
    the authority
all settings queries now happen through execCtx interface,
removing a lot of bad spaghetti mamma mia 🤌
sometimes container builds take too long
because of network activity or server
delays
@MythreyaK
MythreyaK merged commit 6f742fb into dev Sep 25, 2026
5 checks passed
@MythreyaK
MythreyaK deleted the exec-server branch September 25, 2026 04:33
This was referenced Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant