Skip to content

acc: converge ssh/connection tunnel test onto a local websocket route#5919

Closed
radakam wants to merge 2 commits into
acc-local-ssh-connectionfrom
acc-local-ssh-connection-ws
Closed

acc: converge ssh/connection tunnel test onto a local websocket route#5919
radakam wants to merge 2 commits into
acc-local-ssh-connectionfrom
acc-local-ssh-connection-ws

Conversation

@radakam

@radakam radakam commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Changes

Follow-up to #5907. Converges the Go proxy echo test and the ssh/connection acceptance test into a single acceptance test that exercises the driver-proxy tunnel end to end locally.

  • Product fix (experimental/ssh/internal/client/websockets.go): derive the websocket scheme from the workspace host (httpws, otherwise wss) instead of hardcoding wss, so the client can dial the plaintext local test server.
  • Test server (libs/testserver): add Router.HandleRaw (connection-hijacking registration) and a driver-proxy /ssh websocket route that echoes binary frames, standing in for the tunnel server a real cluster runs. In-process, so it also works on Windows.

acceptance/ssh/connection now runs a single local ssh connect --proxy --cluster=... that submits the same dedicated-cluster bootstrap job and pipes stdin/stdout over the tunnel, asserting both the job payload and the echoed bytes. Proxy mode skips the ssh subprocess, so there's no hang looping a handshake against the echo.

Tests

  • acceptance/ssh/connection (bootstrap job payload + tunnel echo over ws://)
  • TestBuildProxyWebsocketURL (ws/wss scheme selection)

Follow-up to #5907. The dedicated-cluster acceptance test only asserted the
bootstrap job the CLI submits; the actual driver-proxy tunnel was covered
separately by the Go proxy echo tests because the client hardcoded a wss://
scheme and the test server had no websocket route.

Two changes let the local acceptance run exercise the tunnel end to end:

- Product fix: derive the websocket scheme from the workspace host (http -> ws,
  else wss) instead of forcing wss, so the client can dial the plaintext local
  test server. Add a unit test for the URL builder.
- Test server: add a raw (connection-hijacking) handler registration and a
  driver-proxy /ssh websocket route that echoes binary frames, standing in for
  the SSH tunnel server a real cluster runs. In-process, so it also works on
  Windows.

acceptance/ssh/connection now runs a single `ssh connect --proxy` locally: it
submits the same dedicated-cluster bootstrap job and pipes stdin/stdout over the
tunnel, asserting both the job payload and the echoed bytes. Proxy mode skips
the ssh subprocess, so it doesn't hang looping a handshake against the echo.
@radakam radakam temporarily deployed to test-trigger-is July 14, 2026 08:04 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is July 14, 2026 08:04 — with GitHub Actions Inactive
Apply the same convergence to the serverless-GPU acceptance test (follow-up to
#5878, where the review asked to fold the two test styles into one acceptance
test). Locally it now runs a single `ssh connect --proxy` that submits the same
serverless-GPU bootstrap job and pipes stdin/stdout over the driver-proxy
websocket echo route, asserting both the job payload and the echoed bytes.
@radakam radakam temporarily deployed to test-trigger-is July 14, 2026 08:11 — with GitHub Actions Inactive
@radakam radakam temporarily deployed to test-trigger-is July 14, 2026 08:11 — with GitHub Actions Inactive
@radakam radakam closed this Jul 14, 2026
@radakam radakam deleted the acc-local-ssh-connection-ws branch July 14, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant