mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat: Add workspace agent for SSH (#318)
* feat: Add workspace agent for SSH This adds the initial agent that supports TTY and execution over SSH. It functions across MacOS, Windows, and Linux. This does not handle the coderd interaction yet, but does setup a simple path forward. * Fix pty tests on Windows * Fix log race * Lock around dial error to fix log output * Fix context return early * fix: Leaking yamux session after HTTP handler is closed Closes #317. We depended on the context canceling the yamux connection, but this isn't a sync operation. Explicitly calling close ensures the handler waits for yamux to complete before exit. * Lock around close return * Force failure with log * Fix failed handler * Upgrade dep * Fix defer inside loops * Fix context cancel for HTTP requests * Fix resize
This commit is contained in:
@ -164,7 +164,7 @@ func AwaitProjectImportJob(t *testing.T, client *codersdk.Client, organization s
|
||||
provisionerJob, err = client.ProjectImportJob(context.Background(), organization, job)
|
||||
require.NoError(t, err)
|
||||
return provisionerJob.Status.Completed()
|
||||
}, 3*time.Second, 25*time.Millisecond)
|
||||
}, 5*time.Second, 25*time.Millisecond)
|
||||
return provisionerJob
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ func AwaitWorkspaceProvisionJob(t *testing.T, client *codersdk.Client, organizat
|
||||
provisionerJob, err = client.WorkspaceProvisionJob(context.Background(), organization, job)
|
||||
require.NoError(t, err)
|
||||
return provisionerJob.Status.Completed()
|
||||
}, 3*time.Second, 25*time.Millisecond)
|
||||
}, 5*time.Second, 25*time.Millisecond)
|
||||
return provisionerJob
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user