From 5a2fb97f9bc80192af8e6881d816d17f2c6271c0 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Mon, 20 Apr 2026 17:52:52 -0700 Subject: [PATCH 1/2] fix(workspace-client): preserve host path prefix in useWorkspaceWsUrl new URL(path, hostUrl) resolves absolute paths against the origin, dropping hostUrl's path component. For remote workspaces hostUrl is "https://relay.superset.sh/hosts/"; building the terminal WS URL via new URL("/terminal/", hostUrl) yielded "wss://relay.superset.sh/terminal/", which the relay 404s (only /hosts/:hostId/* is routed). Swap to string concat so the prefix survives. --- .../WorkspaceClientProvider/WorkspaceClientProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workspace-client/src/providers/WorkspaceClientProvider/WorkspaceClientProvider.tsx b/packages/workspace-client/src/providers/WorkspaceClientProvider/WorkspaceClientProvider.tsx index b0e6c5ed217..1ad9dfb12c4 100644 --- a/packages/workspace-client/src/providers/WorkspaceClientProvider/WorkspaceClientProvider.tsx +++ b/packages/workspace-client/src/providers/WorkspaceClientProvider/WorkspaceClientProvider.tsx @@ -126,7 +126,7 @@ export function useWorkspaceWsUrl( params?: Record, ): string { const { hostUrl, getWsToken } = useWorkspaceClient(); - const url = new URL(path, hostUrl); + const url = new URL(`${hostUrl}${path}`); url.protocol = url.protocol === "https:" ? "wss:" : "ws:"; if (params) { for (const [key, value] of Object.entries(params)) { From 59fd75619e0f9949a112f217bede3e1572406104 Mon Sep 17 00:00:00 2001 From: Satya Patel Date: Mon, 20 Apr 2026 17:52:59 -0700 Subject: [PATCH 2/2] fix(relay): cap to one fly machine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TunnelManager.tunnels is an in-process Map — with 2+ replicas a proxy request routed to the replica that doesn't own the tunnel returns 503 "Host not connected". Prod was running 2 machines and serving ~half of all /hosts/:hostId/* traffic as 503. Scaled down live; this commit codifies it so the next deploy doesn't recreate the second machine. Longer-term fix (shared tunnel state via Redis pub/sub) tracked in SUPER-427. --- apps/relay/fly.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/relay/fly.toml b/apps/relay/fly.toml index ae06f29dfcd..a7bb85dab68 100644 --- a/apps/relay/fly.toml +++ b/apps/relay/fly.toml @@ -13,6 +13,7 @@ primary_region = "sjc" auto_stop_machines = "off" auto_start_machines = true min_machines_running = 1 + max_machines_running = 1 [http_service.concurrency] type = "connections"