You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today, tailnet clients connect to exactly one workspace Agent known at start of day. In order to support a desktop native VPN to Coder workspaces, we need a new tailnet RPC that delivers a stream of updates about workspaces being created, started, stopped and deleted, so that the native RPC can automatically connect to available agents.
The RPC will be part of the Tailnet API, and adds the following messages and RPC calls:
Because the RPC is not tied to a specific agent, it will not be available on the existing api/v2/workspaceagents/<agent>/coordinate HTTP endpoint, and needs to be added to a new api/v2/users/me/tailnet endpoint.
Since this workspace status isn't an existing type, I assume it's to be set using the provisioner job status and the build transition? I'm proposing:
WHEN job_status = 'running' AND transition = 'start' THEN 'starting'
WHEN job_status = 'succeeded' AND transition = 'start' THEN 'running'
WHEN job_status = 'running' AND transition = 'stop' THEN 'stopping'
WHEN job_status = 'succeeded' AND transition = 'stop' THEN 'stopped'
WHEN job_status = 'succeeded' AND transition = 'delete' THEN 'deleted'
WHEN job_status = 'running' AND transition = 'delete' THEN 'deleting'
WHEN job_status = 'pending' THEN 'pending'
WHEN job_status = 'failed' THEN 'failed'
WHEN job_status = 'canceling' THEN 'canceling'
WHEN job_status = 'canceled' THEN 'canceled'
ELSE 'unknown'
Activity
ethanndickson commentedon Sep 24, 2024
Since this workspace status isn't an existing type, I assume it's to be set using the provisioner job status and the build transition? I'm proposing:
spikecurtis commentedon Sep 24, 2024
There is a derived type and conversion algorithm:
coder/coderd/workspacebuilds.go
Line 980 in e086d78
chore: send workspace pubsub events by owner id (#14964)
chore: add db query to retrieve workspaces & their agents (#14792)
feat: add WorkspaceUpdates tailnet RPC (#14847)